⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ips.h

📁 Linux内核源代码 为压缩文件 是<<Linux内核>>一书中的源代码
💻 H
📖 第 1 页 / 共 3 页
字号:
} IPS_CONF, *PIPS_CONF;typedef struct {   u32        signature;   u8         reserved;   u8         adapter_slot;   u16        adapter_type;   u8         bios_high[4];   u8         bios_low[4];   u16        reserved2;   u8         reserved3;   u8         operating_system;   u8         driver_high[4];   u8         driver_low[4];   u8         reserved4[100];} IPS_NVRAM_P5, *PIPS_NVRAM_P5;typedef struct _IPS_SUBSYS {   u32        param[128];} IPS_SUBSYS, *PIPS_SUBSYS;/* * Inquiry Data Format */typedef struct {   u8        DeviceType:5;   u8        DeviceTypeQualifier:3;   u8        DeviceTypeModifier:7;   u8        RemoveableMedia:1;   u8        Versions;   u8        ResponseDataFormat;   u8        AdditionalLength;   u16       Reserved;   u8        SoftReset:1;   u8        CommandQueue:1;   u8        Reserved2:1;   u8        LinkedCommands:1;   u8        Synchronous:1;   u8        Wide16Bit:1;   u8        Wide32Bit:1;   u8        RelativeAddressing:1;   u8        VendorId[8];   u8        ProductId[16];   u8        ProductRevisionLevel[4];   u8        VendorSpecific[20];   u8        Reserved3[40];} IPS_INQ_DATA, *PIPS_INQ_DATA;/* * Read Capacity Data Format */typedef struct {   u32       lba;   u32       len;} IPS_CAPACITY;/* * Sense Data Format */typedef struct {   u8        pg_pc:6;       /* Page Code                    */   u8        pg_res1:2;     /* Reserved                     */   u8        pg_len;        /* Page Length                  */   u16       pg_trk_z;      /* Tracks per zone              */   u16       pg_asec_z;     /* Alternate sectors per zone   */   u16       pg_atrk_z;     /* Alternate tracks per zone    */   u16       pg_atrk_v;     /* Alternate tracks per volume  */   u16       pg_sec_t;      /* Sectors per track            */   u16       pg_bytes_s;    /* Bytes per physical sectors   */   u16       pg_intl;       /* Interleave                   */   u16       pg_trkskew;    /* Track skew factor            */   u16       pg_cylskew;    /* Cylinder Skew Factor         */   u32       pg_res2:27;    /* Reserved                     */   u32       pg_ins:1;      /* Inhibit Slave                */   u32       pg_surf:1;     /* Allocate Surface Sectors     */   u32       pg_rmb:1;      /* Removeable                   */   u32       pg_hsec:1;     /* Hard sector formatting       */   u32       pg_ssec:1;     /* Soft sector formatting       */} IPS_DADF;typedef struct {   u8        pg_pc:6;        /* Page Code                     */   u8        pg_res1:2;      /* Reserved                      */   u8        pg_len;         /* Page Length                   */   u16       pg_cylu;        /* Number of cylinders (upper)   */   u8        pg_cyll;        /* Number of cylinders (lower)   */   u8        pg_head;        /* Number of heads               */   u16       pg_wrpcompu;    /* Write precomp (upper)         */   u32       pg_wrpcompl:8;  /* Write precomp (lower)         */   u32       pg_redwrcur:24; /* Reduced write current         */   u32       pg_drstep:16;   /* Drive step rate               */   u32       pg_landu:16;    /* Landing zone cylinder (upper) */   u32       pg_landl:8;     /* Landing zone cylinder (lower) */   u32       pg_res2:24;     /* Reserved                      */} IPS_RDDG;struct ips_blk_desc {   u8       bd_dencode;   u8       bd_nblks1;   u8       bd_nblks2;   u8       bd_nblks3;   u8       bd_res;   u8       bd_blen1;   u8       bd_blen2;   u8       bd_blen3;};typedef struct {   u8       plh_len;   /* Data length             */   u8       plh_type;  /* Medium type             */   u8       plh_res:7; /* Reserved                */   u8       plh_wp:1;  /* Write protect           */   u8       plh_bdl;   /* Block descriptor length */} ips_sense_plh_t;typedef struct {   ips_sense_plh_t     plh;   struct ips_blk_desc blk_desc;   union {      IPS_DADF      pg3;      IPS_RDDG      pg4;   } pdata;} ips_mdata_t;/* * Scatter Gather list format */typedef struct ips_sglist {   u32       address;   u32       length;} IPS_SG_LIST, *PIPS_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 {   u32       residue_len;   u32       scb_addr;} ips_stat_t;/* * SCB Queue Format */typedef struct ips_scb_queue {   struct ips_scb *head;   struct ips_scb *tail;   u32             count;   u32             cpu_flags;   spinlock_t      lock;} ips_scb_queue_t;/* * Wait queue_format */typedef struct ips_wait_queue {   Scsi_Cmnd      *head;   Scsi_Cmnd      *tail;   u32             count;   u32             cpu_flags;   spinlock_t      lock;} ips_wait_queue_t;typedef struct ips_copp_wait_item {   Scsi_Cmnd                 *scsi_cmd;   struct semaphore          *sem;   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;   u32                        count;   u32                        cpu_flags;   spinlock_t                 lock;} 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 *, int);   int  (*verifybios)(struct ips_ha *, char *, int);   u32  (*statupd)(struct ips_ha *);   void (*statinit)(struct ips_ha *);   void (*intr)(struct ips_ha *);   void (*enableint)(struct ips_ha *);} ips_hw_func_t;typedef struct ips_ha {   u8                 ha_id[IPS_MAX_CHANNELS+1];   u32                dcdb_active[IPS_MAX_CHANNELS];   u32                io_addr;            /* Base I/O address           */   u8                 irq;                /* IRQ for adapter            */   u8                 ntargets;           /* Number of targets          */   u8                 nbus;               /* Number of buses            */   u8                 nlun;               /* Number of Luns             */   u16                ad_type;            /* Adapter type               */   u16                host_num;           /* Adapter number             */   u32                max_xfer;           /* Maximum Xfer size          */   u32                max_cmds;           /* Max concurrent commands    */   u32                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_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            */   u32                ioctl_datasize;     /* IOCTL data size            */   u32                cmd_in_progress;    /* Current command in progress*/   long               flags;              /* HA flags                   */   u8                 waitflag;           /* are we waiting for cmd     */   u8                 active;   u16                reset_count;        /* number of resets           */   u32                last_ffdc;          /* last time we sent ffdc info*/   u8                 revision_id;        /* Revision level             */   u16                device_id;          /* PCI device ID              */   u8                 reserved;   u32                mem_addr;           /* Memory mapped address      */   u32                io_len;             /* Size of IO Address         */   u32                mem_len;            /* Size of memory address     */   char              *mem_ptr;            /* Memory mapped Ptr          */   char              *ioremap_ptr;        /* ioremapped memory pointer  */   ips_hw_func_t      func;               /* hw function pointers       */   struct pci_dev    *pcidev;             /* PCI device handle          */   spinlock_t         scb_lock;   spinlock_t         copp_lock;   spinlock_t         ips_lock;} 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;   u8                target_id;   u8                bus;   u8                lun;   u8                cdb[12];   u32               scb_busaddr;   u32               data_busaddr;   u32               timeout;   u8                basic_status;   u8                extended_status;   u16               breakup;   u32               data_len;   u32               sg_len;   u32               flags;   u32               op_code;   IPS_SG_LIST      *sg_list;   Scsi_Cmnd        *scsi_cmd;   struct ips_scb   *q_next;   ips_scb_callback  callback;   struct semaphore *sem;} ips_scb_t;typedef struct ips_scb_pt {   IPS_HOST_COMMAND  cmd;   IPS_DCDB_TABLE    dcdb;   u8                target_id;   u8                bus;   u8                lun;   u8                cdb[12];   u32               scb_busaddr;   u32               data_busaddr;   u32               timeout;   u8                basic_status;   u8                extended_status;   u16               breakup;   u32               data_len;   u32               sg_len;   u32               flags;   u32               op_code;   IPS_SG_LIST      *sg_list;   Scsi_Cmnd        *scsi_cmd;   struct ips_scb   *q_next;   ips_scb_callback  callback;} ips_scb_pt_t;/* * Passthru Command Format */typedef struct {   u8            CoppID[4];   u32           CoppCmd;   u32           PtBuffer;   u8           *CmdBuffer;   u32           CmdBSize;   ips_scb_pt_t  CoppCP;   u32           TimeOut;   u8            BasicStatus;   u8            ExtendedStatus;   u16           reserved;} ips_passthru_t;#endif/* * 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -