- Kai Germaschewski: ISDN update (including Makefiles)
[davej-history.git] / drivers / scsi / cpqfcTSioctl.h
blobd883b4dbd04ec85c8e318665bf867cf54c312495
1 // for user apps, make sure data size types are defined
2 // with
5 #define CCPQFCTS_IOC_MAGIC 'Z'
7 typedef struct
9 __u8 bus;
10 __u8 dev_fn;
11 __u32 board_id;
12 } cpqfc_pci_info_struct;
14 typedef __u32 DriverVer_type;
16 typedef union
18 struct // Peripheral Unit Device
20 __u8 Bus:6;
21 __u8 Mode:2; // b00
22 __u8 Dev;
23 } PeripDev;
24 struct // Volume Set Address
26 __u8 DevMSB:6;
27 __u8 Mode:2; // b01
28 __u8 DevLSB;
29 } LogDev;
30 struct // Logical Unit Device (SCSI-3, SCC-2 defined)
32 __u8 Targ:6;
33 __u8 Mode:2; // b10
34 __u8 Dev:5;
35 __u8 Bus:3;
37 } LogUnit;
38 } SCSI3Addr_struct;
41 typedef struct
43 SCSI3Addr_struct FCP_Nexus;
44 __u8 cdb[16];
45 } PassThru_Command_struct;
48 /* this is nearly duplicated in idashare.h */
49 typedef struct {
50 int lc; /* Controller number */
51 int node; /* Node (box) number */
52 int ld; /* Logical Drive on this box, if required */
53 __u32 nexus; /* SCSI Nexus */
54 void *argp; /* Argument pointer */
55 } VENDOR_IOCTL_REQ;
58 typedef struct {
59 char cdb[16]; /* SCSI CDB for the pass-through */
60 ushort bus; /* Target bus on the box */
61 ushort pdrive; /* Physical drive on the box */
62 int len; /* Length of the data area of the CDB */
63 int sense_len; /* Length of the sense data */
64 char sense_data[40]; /* Sense data */
65 void *bufp; /* Data area for the CDB */
66 char rw_flag; /* Read CDB or Write CDB */
67 } cpqfc_passthru_t;
73 ** Defines for the IOCTLS.
76 #define VENDOR_READ_OPCODE 0x26
77 #define VENDOR_WRITE_OPCODE 0x27
79 #define CPQFCTS_GETPCIINFO _IOR( CCPQFCTS_IOC_MAGIC, 1, cpqfc_pci_info_struct)
80 #define CPQFCTS_GETDRIVVER _IOR( CCPQFCTS_IOC_MAGIC, 9, DriverVer_type)
82 #define CPQFCTS_SCSI_PASSTHRU _IOWR( CCPQFCTS_IOC_MAGIC,11, VENDOR_IOCTL_REQ)