summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/cpqfcTSioctl.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 15:20:36 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 15:20:36 -0700
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/scsi/cpqfcTSioctl.h
downloadlinux-1da177e4c3f41524e886b7f1b8a0c1fc7321cac2.tar.bz2
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 @@
+// for user apps, make sure data size types are defined
+// with
+
+
+#define CCPQFCTS_IOC_MAGIC 'Z'
+
+typedef struct
+{
+ __u8 bus;
+ __u8 dev_fn;
+ __u32 board_id;
+} cpqfc_pci_info_struct;
+
+typedef __u32 DriverVer_type;
+/*
+typedef union
+{
+ struct // Peripheral Unit Device
+ {
+ __u8 Bus:6;
+ __u8 Mode:2; // b00
+ __u8 Dev;
+ } PeripDev;
+ struct // Volume Set Address
+ {
+ __u8 DevMSB:6;
+ __u8 Mode:2; // b01
+ __u8 DevLSB;
+ } LogDev;
+ struct // Logical Unit Device (SCSI-3, SCC-2 defined)
+ {
+ __u8 Targ:6;
+ __u8 Mode:2; // b10
+ __u8 Dev:5;
+ __u8 Bus:3;
+
+ } LogUnit;
+} SCSI3Addr_struct;
+
+
+typedef struct
+{
+ SCSI3Addr_struct FCP_Nexus;
+ __u8 cdb[16];
+} PassThru_Command_struct;
+*/
+
+/* this is nearly duplicated in idashare.h */
+typedef struct {
+ int lc; /* Controller number */
+ int node; /* Node (box) number */
+ int ld; /* Logical Drive on this box, if required */
+ __u32 nexus; /* SCSI Nexus */
+ void *argp; /* Argument pointer */
+} VENDOR_IOCTL_REQ;
+
+
+typedef struct {
+ char cdb[16]; /* SCSI CDB for the pass-through */
+ ushort bus; /* Target bus on the box */
+ ushort pdrive; /* Physical drive on the box */
+ int len; /* Length of the data area of the CDB */
+ int sense_len; /* Length of the sense data */
+ char sense_data[40]; /* Sense data */
+ void *bufp; /* Data area for the CDB */
+ char rw_flag; /* Read CDB or Write CDB */
+} cpqfc_passthru_t;
+
+/*
+** Defines for the IOCTLS.
+*/
+
+#define VENDOR_READ_OPCODE 0x26
+#define VENDOR_WRITE_OPCODE 0x27
+
+#define CPQFCTS_GETPCIINFO _IOR( CCPQFCTS_IOC_MAGIC, 1, cpqfc_pci_info_struct)
+#define CPQFCTS_GETDRIVVER _IOR( CCPQFCTS_IOC_MAGIC, 9, DriverVer_type)
+
+#define CPQFCTS_SCSI_PASSTHRU _IOWR( CCPQFCTS_IOC_MAGIC,11, VENDOR_IOCTL_REQ)
+
+/* We would rather have equivalent generic, low-level driver agnostic
+ioctls that do what CPQFC_IOCTL_FC_TARGET_ADDRESS and
+CPQFC_IOCTL_FC_TDR 0x5388 do, but currently, we do not have them,
+consequently applications would have to know they are talking to cpqfc. */
+
+/* Used to get Fibre Channel WWN and port_id from device */
+// #define CPQFC_IOCTL_FC_TARGET_ADDRESS 0x5387
+#define CPQFC_IOCTL_FC_TARGET_ADDRESS \
+ _IOR( CCPQFCTS_IOC_MAGIC, 13, Scsi_FCTargAddress)
+
+/* Used to invoke Target Defice Reset for Fibre Channel */
+// #define CPQFC_IOCTL_FC_TDR 0x5388
+#define CPQFC_IOCTL_FC_TDR _IO( CCPQFCTS_IOC_MAGIC, 15)
+