ips.h
来自「linux 内核源代码」· C头文件 代码 · 共 1,266 行 · 第 1/3 页
H
1,266 行
uint8_t Flags; uint8_t Information[4]; uint8_t AdditionalLength; uint8_t CommandSpecific[4]; uint8_t AdditionalSenseCode; uint8_t AdditionalSenseCodeQual; uint8_t FRUCode; uint8_t SenseKeySpecific[3];} IPS_SCSI_REQSEN;/* * Sense Data Format - Page 3 */typedef struct { uint8_t PageCode; uint8_t PageLength; uint16_t TracksPerZone; uint16_t AltSectorsPerZone; uint16_t AltTracksPerZone; uint16_t AltTracksPerVolume; uint16_t SectorsPerTrack; uint16_t BytesPerSector; uint16_t Interleave; uint16_t TrackSkew; uint16_t CylinderSkew; uint8_t flags; uint8_t reserved[3];} IPS_SCSI_MODE_PAGE3;/* * Sense Data Format - Page 4 */typedef struct { uint8_t PageCode; uint8_t PageLength; uint16_t CylindersHigh; uint8_t CylindersLow; uint8_t Heads; uint16_t WritePrecompHigh; uint8_t WritePrecompLow; uint16_t ReducedWriteCurrentHigh; uint8_t ReducedWriteCurrentLow; uint16_t StepRate; uint16_t LandingZoneHigh; uint8_t LandingZoneLow; uint8_t flags; uint8_t RotationalOffset; uint8_t Reserved; uint16_t MediumRotationRate; uint8_t Reserved2[2];} IPS_SCSI_MODE_PAGE4;/* * Sense Data Format - Page 8 */typedef struct { uint8_t PageCode; uint8_t PageLength; uint8_t flags; uint8_t RetentPrio; uint16_t DisPrefetchLen; uint16_t MinPrefetchLen; uint16_t MaxPrefetchLen; uint16_t MaxPrefetchCeiling;} IPS_SCSI_MODE_PAGE8;/* * Sense Data Format - Block Descriptor (DASD) */typedef struct { uint32_t NumberOfBlocks; uint8_t DensityCode; uint16_t BlockLengthHigh; uint8_t BlockLengthLow;} IPS_SCSI_MODE_PAGE_BLKDESC;/* * Sense Data Format - Mode Page Header */typedef struct { uint8_t DataLength; uint8_t MediumType; uint8_t Reserved; uint8_t BlockDescLength;} IPS_SCSI_MODE_PAGE_HEADER;typedef struct { IPS_SCSI_MODE_PAGE_HEADER hdr; IPS_SCSI_MODE_PAGE_BLKDESC blkdesc; union { IPS_SCSI_MODE_PAGE3 pg3; IPS_SCSI_MODE_PAGE4 pg4; IPS_SCSI_MODE_PAGE8 pg8; } pdata;} IPS_SCSI_MODE_PAGE_DATA;/* * Scatter Gather list format */typedef struct ips_sglist { uint32_t address; uint32_t length;} IPS_STD_SG_LIST;typedef struct ips_enh_sglist { uint32_t address_lo; uint32_t address_hi; uint32_t length; uint32_t reserved;} IPS_ENH_SG_LIST;typedef union { void *list; IPS_STD_SG_LIST *std_list; IPS_ENH_SG_LIST *enh_list;} IPS_SG_LIST;typedef struct _IPS_INFOSTR { char *buffer; int length; int offset; int pos; int localpos;} IPS_INFOSTR;typedef struct { char *option_name; int *option_flag; int option_value;} IPS_OPTION;/* * Status Info */typedef struct ips_stat { uint32_t residue_len; void *scb_addr; uint8_t padding[12 - sizeof(void *)];} ips_stat_t;/* * SCB Queue Format */typedef struct ips_scb_queue { struct ips_scb *head; struct ips_scb *tail; int count;} ips_scb_queue_t;/* * Wait queue_format */typedef struct ips_wait_queue { struct scsi_cmnd *head; struct scsi_cmnd *tail; int count;} ips_wait_queue_t;typedef struct ips_copp_wait_item { struct scsi_cmnd *scsi_cmd; struct ips_copp_wait_item *next;} ips_copp_wait_item_t;typedef struct ips_copp_queue { struct ips_copp_wait_item *head; struct ips_copp_wait_item *tail; int count;} ips_copp_queue_t;/* forward decl for host structure */struct ips_ha;typedef struct { int (*reset)(struct ips_ha *); int (*issue)(struct ips_ha *, struct ips_scb *); int (*isinit)(struct ips_ha *); int (*isintr)(struct ips_ha *); int (*init)(struct ips_ha *); int (*erasebios)(struct ips_ha *); int (*programbios)(struct ips_ha *, char *, uint32_t, uint32_t); int (*verifybios)(struct ips_ha *, char *, uint32_t, uint32_t); void (*statinit)(struct ips_ha *); int (*intr)(struct ips_ha *); void (*enableint)(struct ips_ha *); uint32_t (*statupd)(struct ips_ha *);} ips_hw_func_t;typedef struct ips_ha { uint8_t ha_id[IPS_MAX_CHANNELS+1]; uint32_t dcdb_active[IPS_MAX_CHANNELS]; uint32_t io_addr; /* Base I/O address */ uint8_t irq; /* IRQ for adapter */ uint8_t ntargets; /* Number of targets */ uint8_t nbus; /* Number of buses */ uint8_t nlun; /* Number of Luns */ uint16_t ad_type; /* Adapter type */ uint16_t host_num; /* Adapter number */ uint32_t max_xfer; /* Maximum Xfer size */ uint32_t max_cmds; /* Max concurrent commands */ uint32_t num_ioctl; /* Number of Ioctls */ ips_stat_t sp; /* Status packer pointer */ struct ips_scb *scbs; /* Array of all CCBS */ struct ips_scb *scb_freelist; /* SCB free list */ ips_wait_queue_t scb_waitlist; /* Pending SCB list */ ips_copp_queue_t copp_waitlist; /* Pending PT list */ ips_scb_queue_t scb_activelist; /* Active SCB list */ IPS_IO_CMD *dummy; /* dummy command */ IPS_ADAPTER *adapt; /* Adapter status area */ IPS_LD_INFO *logical_drive_info; /* Adapter Logical Drive Info */ dma_addr_t logical_drive_info_dma_addr; /* Logical Drive Info DMA Address */ IPS_ENQ *enq; /* Adapter Enquiry data */ IPS_CONF *conf; /* Adapter config data */ IPS_NVRAM_P5 *nvram; /* NVRAM page 5 data */ IPS_SUBSYS *subsys; /* Subsystem parameters */ char *ioctl_data; /* IOCTL data area */ uint32_t ioctl_datasize; /* IOCTL data size */ uint32_t cmd_in_progress; /* Current command in progress*/ int flags; /* */ uint8_t waitflag; /* are we waiting for cmd */ uint8_t active; int ioctl_reset; /* IOCTL Requested Reset Flag */ uint16_t reset_count; /* number of resets */ time_t last_ffdc; /* last time we sent ffdc info*/ uint8_t revision_id; /* Revision level */ uint16_t device_id; /* PCI device ID */ uint8_t slot_num; /* PCI Slot Number */ uint16_t subdevice_id; /* Subsystem device ID */ int ioctl_len; /* size of ioctl buffer */ dma_addr_t ioctl_busaddr; /* dma address of ioctl buffer*/ uint8_t bios_version[8]; /* BIOS Revision */ uint32_t mem_addr; /* Memory mapped address */ uint32_t io_len; /* Size of IO Address */ uint32_t mem_len; /* Size of memory address */ char __iomem *mem_ptr; /* Memory mapped Ptr */ char __iomem *ioremap_ptr;/* ioremapped memory pointer */ ips_hw_func_t func; /* hw function pointers */ struct pci_dev *pcidev; /* PCI device handle */ char *flash_data; /* Save Area for flash data */ int flash_len; /* length of flash buffer */ u32 flash_datasize; /* Save Area for flash data size */ dma_addr_t flash_busaddr; /* dma address of flash buffer*/ dma_addr_t enq_busaddr; /* dma address of enq struct */ uint8_t requires_esl; /* Requires an EraseStripeLock */} ips_ha_t;typedef void (*ips_scb_callback) (ips_ha_t *, struct ips_scb *);/* * SCB Format */typedef struct ips_scb { IPS_HOST_COMMAND cmd; IPS_DCDB_TABLE dcdb; uint8_t target_id; uint8_t bus; uint8_t lun; uint8_t cdb[12]; uint32_t scb_busaddr; uint32_t old_data_busaddr; // Obsolete, but kept for old utility compatibility uint32_t timeout; uint8_t basic_status; uint8_t extended_status; uint8_t breakup; uint8_t sg_break; uint32_t data_len; uint32_t sg_len; uint32_t flags; uint32_t op_code; IPS_SG_LIST sg_list; struct scsi_cmnd *scsi_cmd; struct ips_scb *q_next; ips_scb_callback callback; uint32_t sg_busaddr; int sg_count; dma_addr_t data_busaddr;} ips_scb_t;typedef struct ips_scb_pt { IPS_HOST_COMMAND cmd; IPS_DCDB_TABLE dcdb; uint8_t target_id; uint8_t bus; uint8_t lun; uint8_t cdb[12]; uint32_t scb_busaddr; uint32_t data_busaddr; uint32_t timeout; uint8_t basic_status; uint8_t extended_status; uint16_t breakup; uint32_t data_len; uint32_t sg_len; uint32_t flags; uint32_t op_code; IPS_SG_LIST *sg_list; struct scsi_cmnd *scsi_cmd; struct ips_scb *q_next; ips_scb_callback callback;} ips_scb_pt_t;/* * Passthru Command Format */typedef struct { uint8_t CoppID[4]; uint32_t CoppCmd; uint32_t PtBuffer; uint8_t *CmdBuffer; uint32_t CmdBSize; ips_scb_pt_t CoppCP; uint32_t TimeOut; uint8_t BasicStatus; uint8_t ExtendedStatus; uint8_t AdapterType; uint8_t reserved;} ips_passthru_t;#endif/* The Version Information below gets created by SED during the build process. *//* Do not modify the next line; it's what SED is looking for to do the insert. *//* Version Info *//*************************************************************************** VERSION.H -- version numbers and copyright notices in various formats**************************************************************************/#define IPS_VER_MAJOR 7#define IPS_VER_MAJOR_STRING __stringify(IPS_VER_MAJOR)#define IPS_VER_MINOR 12#define IPS_VER_MINOR_STRING __stringify(IPS_VER_MINOR)#define IPS_VER_BUILD 05#define IPS_VER_BUILD_STRING __stringify(IPS_VER_BUILD)#define IPS_VER_STRING IPS_VER_MAJOR_STRING "." \ IPS_VER_MINOR_STRING "." IPS_VER_BUILD_STRING#define IPS_RELEASE_ID 0x00020000#define IPS_BUILD_IDENT 761#define IPS_LEGALCOPYRIGHT_STRING "(C) Copyright IBM Corp. 1994, 2002. All Rights Reserved."#define IPS_ADAPTECCOPYRIGHT_STRING "(c) Copyright Adaptec, Inc. 2002 to 2004. All Rights Reserved."#define IPS_DELLCOPYRIGHT_STRING "(c) Copyright Dell 2004. All Rights Reserved."#define IPS_NT_LEGALCOPYRIGHT_STRING "(C) Copyright IBM Corp. 1994, 2002."/* Version numbers for various adapters */#define IPS_VER_SERVERAID1 "2.25.01"#define IPS_VER_SERVERAID2 "2.88.13"#define IPS_VER_NAVAJO "2.88.13"#define IPS_VER_SERVERAID3 "6.10.24"#define IPS_VER_SERVERAID4H "7.12.02"#define IPS_VER_SERVERAID4MLx "7.12.02"#define IPS_VER_SARASOTA "7.12.02"#define IPS_VER_MARCO "7.12.02"#define IPS_VER_SEBRING "7.12.02"#define IPS_VER_KEYWEST "7.12.02"/* Compatability IDs for various adapters */#define IPS_COMPAT_UNKNOWN ""#define IPS_COMPAT_CURRENT "KW710"#define IPS_COMPAT_SERVERAID1 "2.25.01"#define IPS_COMPAT_SERVERAID2 "2.88.13"#define IPS_COMPAT_NAVAJO "2.88.13"#define IPS_COMPAT_KIOWA "2.88.13"#define IPS_COMPAT_SERVERAID3H "SB610"#define IPS_COMPAT_SERVERAID3L "SB610"#define IPS_COMPAT_SERVERAID4H "KW710"#define IPS_COMPAT_SERVERAID4M "KW710"#define IPS_COMPAT_SERVERAID4L "KW710"#define IPS_COMPAT_SERVERAID4Mx "KW710"#define IPS_COMPAT_SERVERAID4Lx "KW710"#define IPS_COMPAT_SARASOTA "KW710"#define IPS_COMPAT_MARCO "KW710"#define IPS_COMPAT_SEBRING "KW710"#define IPS_COMPAT_TAMPA "KW710"#define IPS_COMPAT_KEYWEST "KW710"#define IPS_COMPAT_BIOS "KW710"#define IPS_COMPAT_MAX_ADAPTER_TYPE 18#define IPS_COMPAT_ID_LENGTH 8#define IPS_DEFINE_COMPAT_TABLE(tablename) \ char tablename[IPS_COMPAT_MAX_ADAPTER_TYPE] [IPS_COMPAT_ID_LENGTH] = { \ IPS_COMPAT_UNKNOWN, \ IPS_COMPAT_SERVERAID1, \ IPS_COMPAT_SERVERAID2, \ IPS_COMPAT_NAVAJO, \ IPS_COMPAT_KIOWA, \ IPS_COMPAT_SERVERAID3H, \ IPS_COMPAT_SERVERAID3L, \ IPS_COMPAT_SERVERAID4H, \ IPS_COMPAT_SERVERAID4M, \ IPS_COMPAT_SERVERAID4L, \ IPS_COMPAT_SERVERAID4Mx, \ IPS_COMPAT_SERVERAID4Lx, \ IPS_COMPAT_SARASOTA, /* one-channel variety of SARASOTA */ \ IPS_COMPAT_SARASOTA, /* two-channel variety of SARASOTA */ \ IPS_COMPAT_MARCO, \ IPS_COMPAT_SEBRING, \ IPS_COMPAT_TAMPA, \ IPS_COMPAT_KEYWEST \ }/* * Overrides for Emacs so that we almost follow Linus's tabbing style. * Emacs will notice this stuff at the end of the file and automatically * adjust the settings for this buffer only. This must remain at the end * of the file. * --------------------------------------------------------------------------- * Local variables: * c-indent-level: 2 * c-brace-imaginary-offset: 0 * c-brace-offset: -2 * c-argdecl-indent: 2 * c-label-offset: -2 * c-continued-statement-offset: 2 * c-continued-brace-offset: 0 * indent-tabs-mode: nil * tab-width: 8 * End: */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?