#define MBOX_BUSY_WAIT 10/* wait for up to 10 usec for
mailbox to be free */ #define DEFAULT_INITIATOR_ID 7
#define MAX_SGLIST 64/* max supported in f/w */ #define MIN_SGLIST 26/* guaranteed to support these many */ #define MAX_COMMANDS 126 #define CMDID_INT_CMDS MAX_COMMANDS+1/* make sure CMDID_INT_CMDS islessthanmaxcommands
supported by any f/w */
#define MAX_CDB_LEN 10 #define MAX_EXT_CDB_LEN 16/* we support cdb length up to 16 */
/* *Flagstofollowthescbasittransitionsbetweenvariousstages
*/ #define SCB_FREE 0x0000 /* on the free list */ #define SCB_ACTIVE 0x0001 /* off the free list */ #define SCB_PENDQ 0x0002 /* on the pending queue */ #define SCB_ISSUED 0x0004 /* issued - owner f/w */ #define SCB_ABORT 0x0008 /* Got an abort for this one */ #define SCB_RESET 0x0010 /* Got a reset for this one */
/* *Utilitiesdeclarethisstrcturesizeas1024bytes.Somorefieldscan *beaddedinfuture.
*/ typedefstruct {
u32 data_size; /* current size in bytes (not including resvd) */
u32 config_signature; /* Current value is 0x00282008 *0x28=MAX_LOGICAL_DRIVES, *0x20=Numberofstripesand
* 0x08=Number of spans */
struct notify {
u32 global_counter; /* Any change increments this counter */
u8 param_counter; /* Indicates any params changed */
u8 param_id; /* Param modified - defined below */
u16 param_val; /* New val of last param modified */
u8 ldrv_op_counter; /* Indicates ldrv op started/completed */
u8 ldrv_opid; /* ldrv num */
u8 ldrv_opcmd; /* ldrv operation - defined below */
u8 ldrv_opstatus; /* status of the operation */
u8 ldrv_state_counter; /* Indicates change of ldrv state */
u8 ldrv_state_id; /* ldrv num */
u8 ldrv_state_new; /* New state */
u8 ldrv_state_old; /* old state */
u8 pdrv_state_counter; /* Indicates change of ldrv state */
u8 pdrv_state_id; /* pdrv id */
u8 pdrv_state_new; /* New state */
u8 pdrv_state_old; /* old state */
u8 pdrv_fmt_counter; /* Indicates pdrv format started/over */
u8 pdrv_fmt_id; /* pdrv id */
u8 pdrv_fmt_val; /* format started/over */
u8 pdrv_fmt_rsvd;
u8 targ_xfer_counter; /* Indicates SCSI-2 Xfer rate change */
u8 targ_xfer_id; /* pdrv Id */
u8 targ_xfer_val; /* new Xfer params of last pdrv */
u8 targ_xfer_rsvd;
u8 fcloop_id_chg_counter; /* Indicates loopid changed */
u8 fcloopid_pdrvid; /* pdrv id */
u8 fcloop_id0; /* loopid on fc loop 0 */
u8 fcloop_id1; /* loopid on fc loop 1 */
u8 fcloop_state_counter; /* Indicates loop state changed */
u8 fcloop_state0; /* state of fc loop 0 */
u8 fcloop_state1; /* state of fc loop 1 */
u8 fcloop_state_rsvd;
} __attribute__ ((packed));
u8 battery_status;
u8 num_ldrv; /* No. of Log Drives configured */
u8 recon_state[MAX_LOGICAL_DRIVES_40LD / 8]; /* State of
reconstruct */
u16 ldrv_op_status[MAX_LOGICAL_DRIVES_40LD / 8]; /* logdrv
Status */
u32 ldrv_size[MAX_LOGICAL_DRIVES_40LD];/* Size of each log drv */
u8 ldrv_prop[MAX_LOGICAL_DRIVES_40LD];
u8 ldrv_state[MAX_LOGICAL_DRIVES_40LD];/* State of log drives */
u8 pdrv_state[FC_MAX_PHYSICAL_DEVICES];/* State of phys drvs. */
u16 pdrv_format[FC_MAX_PHYSICAL_DEVICES / 16];
typedefstruct {
u8 type; /* Type of the device */
u8 cur_status; /* current status of the device */
u8 tag_depth; /* Level of tagging */
u8 sync_neg; /* sync negotiation - ENABLE or DISABLE */
u32 size; /* configurable size in terms of 512 byte
blocks */
}__attribute__ ((packed)) phys_drv;
typedefstruct {
u8 nlog_drives; /* number of logical drives */
u8 resvd[3];
logdrv_40ld ldrv[MAX_LOGICAL_DRIVES_40LD];
phys_drv pdrv[MAX_PHYSICAL_DRIVES];
}__attribute__ ((packed)) disk_array_40ld;
typedefstruct {
u8 nlog_drives; /* number of logical drives */
u8 resvd[3];
logdrv_8ld ldrv[MAX_LOGICAL_DRIVES_8LD];
phys_drv pdrv[MAX_PHYSICAL_DRIVES];
}__attribute__ ((packed)) disk_array_8ld;
/* *ioctlopcodes
*/ #define MBOX_CMD 0x00000 /* DCMD or passthru command */ #define GET_DRIVER_VER 0x10000 /* Get driver version */ #define GET_N_ADAP 0x20000 /* Get number of adapters */ #define GET_ADAP_INFO 0x30000 /* Get information about a adapter */ #define GET_CAP 0x40000 /* Get ioctl capabilities */ #define GET_STATS 0x50000 /* Get statistics, including error info */
/* *Theioctlstructure. *MBOXmacroconvertsanitioctl_tstructuretomegacmd_tpointerand *MBOX_Pmacroconvertsanitioctl_tpointertomegacmd_tpointer.
*/ typedefstruct { char signature[8]; /* Must contain "MEGANIT" */
u32 opcode; /* opcode for the command */
u32 adapno; /* adapter number */ union {
u8 __raw_mbox[18]; void __user *__uaddr; /* xferaddr for non-mbox cmds */
}__ua;
u32 xferlen; /* xferlen for DCMD and non-mbox
commands */
u32 flags; /* data direction flags */
}nitioctl_t;
/* *I/OstatisticsforsomeapplicationslikeSNMPagent.Thecallermust *providethenumberoflogicaldrivesforwhichstatusshouldbereported.
*/ typedefstruct { int num_ldrv; /* Number for logical drives for which the
status should be reported. */
u32 nreads[MAX_LOGICAL_DRIVES_40LD]; /* number of reads for
each logical drive */
u32 nreadblocks[MAX_LOGICAL_DRIVES_40LD]; /* number of blocks readforeachlogical
drive */
u32 nwrites[MAX_LOGICAL_DRIVES_40LD]; /* number of writes foreachlogical
drive */
u32 nwriteblocks[MAX_LOGICAL_DRIVES_40LD]; /* number of blocks writesforeach
logical drive */
u32 rd_errors[MAX_LOGICAL_DRIVES_40LD]; /* number of read errorsforeach
logical drive */
u32 wr_errors[MAX_LOGICAL_DRIVES_40LD]; /* number of write errorsforeach
logical drive */
}megastat_t;
struct private_bios_data {
u8 geometry:4; /* *bits0-3-BIOSgeometry *0x0001-1GB *0x0010-2GB *0x1000-8GB *Othersvaluesareinvalid
*/
u8 unused:4; /* bits 4-7 are unused */
u8 boot_drv; /* *logicaldrivesetasbootdrive *0..7-for8LDcards *0..39-for40LDcards
*/
u8 rsvd[12];
u16 cksum; /* 0-(sum of first 13 bytes of this structure) */
} __attribute__ ((packed));
int has_64bit_addr; /* are we using 64-bit addressing */ int support_ext_cdb; int boot_ldrv_enabled; int boot_ldrv; int boot_pdrv_enabled; /* boot from physical drive */ int boot_pdrv_ch; /* boot physical drive channel */ int boot_pdrv_tgt; /* boot physical drive target */
int support_random_del; /* Do we support random deletion of
logdrvs */ int read_ldidmap; /* set after logical drive deltion. The logicaldrivenumbermustbereadfromthe
map */
atomic_t quiescent; /* a stage reached when delete logical driveneedstobedone.Stop sendingrequeststothehbatill
delete operation is completed */
spinlock_t lock;
u8 logdrv_chan[MAX_CHANNELS+NVIRT_CHAN]; /* logical drive are on
what channels. */ int mega_ch_class;
u8 sglen; /* f/w supported scatter-gather list length */
scb_t int_scb; struct mutex int_mtx; /* To synchronize the internal
commands */ int int_status; /* status of internal cmd */ struct completion int_waitq; /* wait queue for internal
cmds */
int has_cluster; /* cluster support on this HBA */
}adapter_t;
struct mega_hbas { int is_bios_enabled;
adapter_t *hostdata_addr;
};
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.21Angebot
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-09-28)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.