aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/cpqfcTSioctl.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/scsi/cpqfcTSioctl.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'drivers/scsi/cpqfcTSioctl.h')
-rw-r--r--drivers/scsi/cpqfcTSioctl.h94
1 files changed, 94 insertions, 0 deletions
diff --git a/drivers/scsi/cpqfcTSioctl.h b/drivers/scsi/cpqfcTSioctl.h
new file mode 100644
index 000000000000..825536969126
--- /dev/null
+++ b/drivers/scsi/cpqfcTSioctl.h
@@ -0,0 +1,94 @@
1// for user apps, make sure data size types are defined
2// with
3
4
5#define CCPQFCTS_IOC_MAGIC 'Z'
6
7typedef struct
8{
9 __u8 bus;
10 __u8 dev_fn;
11 __u32 board_id;
12} cpqfc_pci_info_struct;
13
14typedef __u32 DriverVer_type;
15/*
16typedef union
17{
18 struct // Peripheral Unit Device
19 {
20 __u8 Bus:6;
21 __u8 Mode:2; // b00
22 __u8 Dev;
23 } PeripDev;
24 struct // Volume Set Address
25 {
26 __u8 DevMSB:6;
27 __u8 Mode:2; // b01
28 __u8 DevLSB;
29 } LogDev;
30 struct // Logical Unit Device (SCSI-3, SCC-2 defined)
31 {
32 __u8 Targ:6;
33 __u8 Mode:2; // b10
34 __u8 Dev:5;
35 __u8 Bus:3;
36
37 } LogUnit;
38} SCSI3Addr_struct;
39
40
41typedef struct
42{
43 SCSI3Addr_struct FCP_Nexus;
44 __u8 cdb[16];
45} PassThru_Command_struct;
46*/
47
48/* this is nearly duplicated in idashare.h */
49typedef 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;
56
57
58typedef 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;
68
69/*
70** Defines for the IOCTLS.
71*/
72
73#define VENDOR_READ_OPCODE 0x26
74#define VENDOR_WRITE_OPCODE 0x27
75
76#define CPQFCTS_GETPCIINFO _IOR( CCPQFCTS_IOC_MAGIC, 1, cpqfc_pci_info_struct)
77#define CPQFCTS_GETDRIVVER _IOR( CCPQFCTS_IOC_MAGIC, 9, DriverVer_type)
78
79#define CPQFCTS_SCSI_PASSTHRU _IOWR( CCPQFCTS_IOC_MAGIC,11, VENDOR_IOCTL_REQ)
80
81/* We would rather have equivalent generic, low-level driver agnostic
82ioctls that do what CPQFC_IOCTL_FC_TARGET_ADDRESS and
83CPQFC_IOCTL_FC_TDR 0x5388 do, but currently, we do not have them,
84consequently applications would have to know they are talking to cpqfc. */
85
86/* Used to get Fibre Channel WWN and port_id from device */
87// #define CPQFC_IOCTL_FC_TARGET_ADDRESS 0x5387
88#define CPQFC_IOCTL_FC_TARGET_ADDRESS \
89 _IOR( CCPQFCTS_IOC_MAGIC, 13, Scsi_FCTargAddress)
90
91/* Used to invoke Target Defice Reset for Fibre Channel */
92// #define CPQFC_IOCTL_FC_TDR 0x5388
93#define CPQFC_IOCTL_FC_TDR _IO( CCPQFCTS_IOC_MAGIC, 15)
94