diff options
Diffstat (limited to 'drivers/scsi/vmw_pvscsi.h')
-rw-r--r-- | drivers/scsi/vmw_pvscsi.h | 109 |
1 files changed, 85 insertions, 24 deletions
diff --git a/drivers/scsi/vmw_pvscsi.h b/drivers/scsi/vmw_pvscsi.h index 62e36e75715e..3546e8662e30 100644 --- a/drivers/scsi/vmw_pvscsi.h +++ b/drivers/scsi/vmw_pvscsi.h | |||
@@ -17,7 +17,7 @@ | |||
17 | * along with this program; if not, write to the Free Software | 17 | * along with this program; if not, write to the Free Software |
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
19 | * | 19 | * |
20 | * Maintained by: Alok N Kataria <akataria@vmware.com> | 20 | * Maintained by: Arvind Kumar <arvindkumar@vmware.com> |
21 | * | 21 | * |
22 | */ | 22 | */ |
23 | 23 | ||
@@ -26,7 +26,7 @@ | |||
26 | 26 | ||
27 | #include <linux/types.h> | 27 | #include <linux/types.h> |
28 | 28 | ||
29 | #define PVSCSI_DRIVER_VERSION_STRING "1.0.1.0-k" | 29 | #define PVSCSI_DRIVER_VERSION_STRING "1.0.2.0-k" |
30 | 30 | ||
31 | #define PVSCSI_MAX_NUM_SG_ENTRIES_PER_SEGMENT 128 | 31 | #define PVSCSI_MAX_NUM_SG_ENTRIES_PER_SEGMENT 128 |
32 | 32 | ||
@@ -39,28 +39,45 @@ | |||
39 | * host adapter status/error codes | 39 | * host adapter status/error codes |
40 | */ | 40 | */ |
41 | enum HostBusAdapterStatus { | 41 | enum HostBusAdapterStatus { |
42 | BTSTAT_SUCCESS = 0x00, /* CCB complete normally with no errors */ | 42 | BTSTAT_SUCCESS = 0x00, /* CCB complete normally with no errors */ |
43 | BTSTAT_LINKED_COMMAND_COMPLETED = 0x0a, | 43 | BTSTAT_LINKED_COMMAND_COMPLETED = 0x0a, |
44 | BTSTAT_LINKED_COMMAND_COMPLETED_WITH_FLAG = 0x0b, | 44 | BTSTAT_LINKED_COMMAND_COMPLETED_WITH_FLAG = 0x0b, |
45 | BTSTAT_DATA_UNDERRUN = 0x0c, | 45 | BTSTAT_DATA_UNDERRUN = 0x0c, |
46 | BTSTAT_SELTIMEO = 0x11, /* SCSI selection timeout */ | 46 | BTSTAT_SELTIMEO = 0x11, /* SCSI selection timeout */ |
47 | BTSTAT_DATARUN = 0x12, /* data overrun/underrun */ | 47 | BTSTAT_DATARUN = 0x12, /* data overrun/underrun */ |
48 | BTSTAT_BUSFREE = 0x13, /* unexpected bus free */ | 48 | BTSTAT_BUSFREE = 0x13, /* unexpected bus free */ |
49 | BTSTAT_INVPHASE = 0x14, /* invalid bus phase or sequence requested by target */ | 49 | BTSTAT_INVPHASE = 0x14, /* invalid bus phase or sequence |
50 | BTSTAT_LUNMISMATCH = 0x17, /* linked CCB has different LUN from first CCB */ | 50 | * requested by target */ |
51 | BTSTAT_SENSFAILED = 0x1b, /* auto request sense failed */ | 51 | BTSTAT_LUNMISMATCH = 0x17, /* linked CCB has different LUN from |
52 | BTSTAT_TAGREJECT = 0x1c, /* SCSI II tagged queueing message rejected by target */ | 52 | * first CCB */ |
53 | BTSTAT_BADMSG = 0x1d, /* unsupported message received by the host adapter */ | 53 | BTSTAT_INVPARAM = 0x1a, /* invalid parameter in CCB or segment |
54 | BTSTAT_HAHARDWARE = 0x20, /* host adapter hardware failed */ | 54 | * list */ |
55 | BTSTAT_NORESPONSE = 0x21, /* target did not respond to SCSI ATN, sent a SCSI RST */ | 55 | BTSTAT_SENSFAILED = 0x1b, /* auto request sense failed */ |
56 | BTSTAT_SENTRST = 0x22, /* host adapter asserted a SCSI RST */ | 56 | BTSTAT_TAGREJECT = 0x1c, /* SCSI II tagged queueing message |
57 | BTSTAT_RECVRST = 0x23, /* other SCSI devices asserted a SCSI RST */ | 57 | * rejected by target */ |
58 | BTSTAT_DISCONNECT = 0x24, /* target device reconnected improperly (w/o tag) */ | 58 | BTSTAT_BADMSG = 0x1d, /* unsupported message received by the |
59 | BTSTAT_BUSRESET = 0x25, /* host adapter issued BUS device reset */ | 59 | * host adapter */ |
60 | BTSTAT_ABORTQUEUE = 0x26, /* abort queue generated */ | 60 | BTSTAT_HAHARDWARE = 0x20, /* host adapter hardware failed */ |
61 | BTSTAT_HASOFTWARE = 0x27, /* host adapter software error */ | 61 | BTSTAT_NORESPONSE = 0x21, /* target did not respond to SCSI ATN, |
62 | BTSTAT_HATIMEOUT = 0x30, /* host adapter hardware timeout error */ | 62 | * sent a SCSI RST */ |
63 | BTSTAT_SCSIPARITY = 0x34, /* SCSI parity error detected */ | 63 | BTSTAT_SENTRST = 0x22, /* host adapter asserted a SCSI RST */ |
64 | BTSTAT_RECVRST = 0x23, /* other SCSI devices asserted a SCSI | ||
65 | * RST */ | ||
66 | BTSTAT_DISCONNECT = 0x24, /* target device reconnected improperly | ||
67 | * (w/o tag) */ | ||
68 | BTSTAT_BUSRESET = 0x25, /* host adapter issued BUS device reset */ | ||
69 | BTSTAT_ABORTQUEUE = 0x26, /* abort queue generated */ | ||
70 | BTSTAT_HASOFTWARE = 0x27, /* host adapter software error */ | ||
71 | BTSTAT_HATIMEOUT = 0x30, /* host adapter hardware timeout error */ | ||
72 | BTSTAT_SCSIPARITY = 0x34, /* SCSI parity error detected */ | ||
73 | }; | ||
74 | |||
75 | /* | ||
76 | * SCSI device status values. | ||
77 | */ | ||
78 | enum ScsiDeviceStatus { | ||
79 | SDSTAT_GOOD = 0x00, /* No errors. */ | ||
80 | SDSTAT_CHECK = 0x02, /* Check condition. */ | ||
64 | }; | 81 | }; |
65 | 82 | ||
66 | /* | 83 | /* |
@@ -114,6 +131,29 @@ struct PVSCSICmdDescResetDevice { | |||
114 | } __packed; | 131 | } __packed; |
115 | 132 | ||
116 | /* | 133 | /* |
134 | * Command descriptor for PVSCSI_CMD_CONFIG -- | ||
135 | */ | ||
136 | |||
137 | struct PVSCSICmdDescConfigCmd { | ||
138 | u64 cmpAddr; | ||
139 | u64 configPageAddress; | ||
140 | u32 configPageNum; | ||
141 | u32 _pad; | ||
142 | } __packed; | ||
143 | |||
144 | enum PVSCSIConfigPageType { | ||
145 | PVSCSI_CONFIG_PAGE_CONTROLLER = 0x1958, | ||
146 | PVSCSI_CONFIG_PAGE_PHY = 0x1959, | ||
147 | PVSCSI_CONFIG_PAGE_DEVICE = 0x195a, | ||
148 | }; | ||
149 | |||
150 | enum PVSCSIConfigPageAddressType { | ||
151 | PVSCSI_CONFIG_CONTROLLER_ADDRESS = 0x2120, | ||
152 | PVSCSI_CONFIG_BUSTARGET_ADDRESS = 0x2121, | ||
153 | PVSCSI_CONFIG_PHY_ADDRESS = 0x2122, | ||
154 | }; | ||
155 | |||
156 | /* | ||
117 | * Command descriptor for PVSCSI_CMD_ABORT_CMD -- | 157 | * Command descriptor for PVSCSI_CMD_ABORT_CMD -- |
118 | * | 158 | * |
119 | * - currently does not support specifying the LUN. | 159 | * - currently does not support specifying the LUN. |
@@ -332,6 +372,27 @@ struct PVSCSIRingCmpDesc { | |||
332 | u32 _pad[2]; | 372 | u32 _pad[2]; |
333 | } __packed; | 373 | } __packed; |
334 | 374 | ||
375 | struct PVSCSIConfigPageHeader { | ||
376 | u32 pageNum; | ||
377 | u16 numDwords; | ||
378 | u16 hostStatus; | ||
379 | u16 scsiStatus; | ||
380 | u16 reserved[3]; | ||
381 | } __packed; | ||
382 | |||
383 | struct PVSCSIConfigPageController { | ||
384 | struct PVSCSIConfigPageHeader header; | ||
385 | u64 nodeWWN; /* Device name as defined in the SAS spec. */ | ||
386 | u16 manufacturer[64]; | ||
387 | u16 serialNumber[64]; | ||
388 | u16 opromVersion[32]; | ||
389 | u16 hwVersion[32]; | ||
390 | u16 firmwareVersion[32]; | ||
391 | u32 numPhys; | ||
392 | u8 useConsecutivePhyWWNs; | ||
393 | u8 reserved[3]; | ||
394 | } __packed; | ||
395 | |||
335 | /* | 396 | /* |
336 | * Interrupt status / IRQ bits. | 397 | * Interrupt status / IRQ bits. |
337 | */ | 398 | */ |