diff options
Diffstat (limited to 'include/scsi/scsi.h')
-rw-r--r-- | include/scsi/scsi.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index c60b8ff2f5e4..84a6d5fe0920 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h | |||
@@ -25,13 +25,6 @@ extern const unsigned char scsi_command_size[8]; | |||
25 | #define COMMAND_SIZE(opcode) scsi_command_size[((opcode) >> 5) & 7] | 25 | #define COMMAND_SIZE(opcode) scsi_command_size[((opcode) >> 5) & 7] |
26 | 26 | ||
27 | /* | 27 | /* |
28 | * SCSI device types | ||
29 | */ | ||
30 | |||
31 | #define MAX_SCSI_DEVICE_CODE 15 | ||
32 | extern const char *const scsi_device_types[MAX_SCSI_DEVICE_CODE]; | ||
33 | |||
34 | /* | ||
35 | * Special value for scanning to specify scanning or rescanning of all | 28 | * Special value for scanning to specify scanning or rescanning of all |
36 | * possible channels, (target) ids, or luns on a given shost. | 29 | * possible channels, (target) ids, or luns on a given shost. |
37 | */ | 30 | */ |
@@ -225,6 +218,9 @@ static inline int scsi_status_is_good(int status) | |||
225 | #define TYPE_RBC 0x0e | 218 | #define TYPE_RBC 0x0e |
226 | #define TYPE_NO_LUN 0x7f | 219 | #define TYPE_NO_LUN 0x7f |
227 | 220 | ||
221 | /* Returns a human-readable name for the device */ | ||
222 | extern const char * scsi_device_type(unsigned type); | ||
223 | |||
228 | /* | 224 | /* |
229 | * standard mode-select header prepended to all mode-select commands | 225 | * standard mode-select header prepended to all mode-select commands |
230 | */ | 226 | */ |
@@ -433,4 +429,10 @@ struct scsi_lun { | |||
433 | /* Used to obtain the PCI location of a device */ | 429 | /* Used to obtain the PCI location of a device */ |
434 | #define SCSI_IOCTL_GET_PCI 0x5387 | 430 | #define SCSI_IOCTL_GET_PCI 0x5387 |
435 | 431 | ||
432 | /* Pull a u32 out of a SCSI message (using BE SCSI conventions) */ | ||
433 | static inline u32 scsi_to_u32(u8 *ptr) | ||
434 | { | ||
435 | return (ptr[0]<<24) + (ptr[1]<<16) + (ptr[2]<<8) + ptr[3]; | ||
436 | } | ||
437 | |||
436 | #endif /* _SCSI_SCSI_H */ | 438 | #endif /* _SCSI_SCSI_H */ |