more changes on original files
[linux-2.4.git] / drivers / scsi / cpqfcTSioctl.h
1 // for user apps, make sure data size types are defined
2 // with 
3
4
5 #define CCPQFCTS_IOC_MAGIC 'Z'
6
7 typedef struct {
8         __u8 bus;
9         __u8 dev_fn;
10         __u32 board_id;
11 } cpqfc_pci_info_struct;
12
13 typedef __u32 DriverVer_type;
14
15 /* this is nearly duplicated in idashare.h */
16 typedef struct {
17         int lc;                 /* Controller number */
18         int node;               /* Node (box) number */
19         int ld;                 /* Logical Drive on this box, if required */
20         __u32 nexus;            /* SCSI Nexus */
21         void *argp;             /* Argument pointer */
22 } VENDOR_IOCTL_REQ;
23
24
25 typedef struct {
26         char cdb[16];           /* SCSI CDB for the pass-through */
27         ushort bus;             /* Target bus on the box */
28         ushort pdrive;          /* Physical drive on the box */
29         int len;                /* Length of the data area of the CDB */
30         int sense_len;          /* Length of the sense data */
31         char sense_data[40];    /* Sense data */
32         void *bufp;             /* Data area for the CDB */
33         char rw_flag;           /* Read CDB or Write CDB */
34 } cpqfc_passthru_t;
35
36 /*
37  * Defines for the IOCTLS.
38  */
39
40 #define VENDOR_READ_OPCODE                      0x26
41 #define VENDOR_WRITE_OPCODE                     0x27
42
43 #define CPQFCTS_GETPCIINFO _IOR( CCPQFCTS_IOC_MAGIC, 1, cpqfc_pci_info_struct)
44 #define CPQFCTS_GETDRIVVER _IOR( CCPQFCTS_IOC_MAGIC, 9, DriverVer_type)
45
46 #define CPQFCTS_SCSI_PASSTHRU _IOWR( CCPQFCTS_IOC_MAGIC,11, VENDOR_IOCTL_REQ)
47
48 /*
49  *      We would rather have equivalent generic, low-level driver agnostic 
50  *      ioctls that do what CPQFC_IOCTL_FC_TARGET_ADDRESS and 
51  *      CPQFC_IOCTL_FC_TDR 0x5388 do, but currently, we do not have them, 
52  *      consequently applications would have to know they are talking to cpqfc.
53  */
54
55 /*
56  *      Used to get Fibre Channel WWN and port_id from device
57  */
58
59 #define CPQFC_IOCTL_FC_TARGET_ADDRESS \
60         _IOR( CCPQFCTS_IOC_MAGIC, 13, Scsi_FCTargAddress)
61
62 /*
63  *      Used to invoke Target Defice Reset for Fibre Channel
64  */
65  
66 #define CPQFC_IOCTL_FC_TDR _IO( CCPQFCTS_IOC_MAGIC, 15)