diff options
Diffstat (limited to 'include/scsi/scsi.h')
-rw-r--r-- | include/scsi/scsi.h | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index a109165714d6..084478e14d24 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h | |||
@@ -9,7 +9,8 @@ | |||
9 | #define _SCSI_SCSI_H | 9 | #define _SCSI_SCSI_H |
10 | 10 | ||
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | #include <scsi/scsi_cmnd.h> | 12 | |
13 | struct scsi_cmnd; | ||
13 | 14 | ||
14 | /* | 15 | /* |
15 | * The maximum number of SG segments that we will put inside a | 16 | * The maximum number of SG segments that we will put inside a |
@@ -263,6 +264,7 @@ static inline int scsi_status_is_good(int status) | |||
263 | #define TYPE_RAID 0x0c | 264 | #define TYPE_RAID 0x0c |
264 | #define TYPE_ENCLOSURE 0x0d /* Enclosure Services Device */ | 265 | #define TYPE_ENCLOSURE 0x0d /* Enclosure Services Device */ |
265 | #define TYPE_RBC 0x0e | 266 | #define TYPE_RBC 0x0e |
267 | #define TYPE_OSD 0x11 | ||
266 | #define TYPE_NO_LUN 0x7f | 268 | #define TYPE_NO_LUN 0x7f |
267 | 269 | ||
268 | /* SCSI protocols; these are taken from SPC-3 section 7.5 */ | 270 | /* SCSI protocols; these are taken from SPC-3 section 7.5 */ |
@@ -402,16 +404,6 @@ static inline int scsi_is_wlun(unsigned int lun) | |||
402 | #define DRIVER_HARD 0x07 | 404 | #define DRIVER_HARD 0x07 |
403 | #define DRIVER_SENSE 0x08 | 405 | #define DRIVER_SENSE 0x08 |
404 | 406 | ||
405 | #define SUGGEST_RETRY 0x10 | ||
406 | #define SUGGEST_ABORT 0x20 | ||
407 | #define SUGGEST_REMAP 0x30 | ||
408 | #define SUGGEST_DIE 0x40 | ||
409 | #define SUGGEST_SENSE 0x80 | ||
410 | #define SUGGEST_IS_OK 0xff | ||
411 | |||
412 | #define DRIVER_MASK 0x0f | ||
413 | #define SUGGEST_MASK 0xf0 | ||
414 | |||
415 | /* | 407 | /* |
416 | * Internal return values. | 408 | * Internal return values. |
417 | */ | 409 | */ |
@@ -447,23 +439,6 @@ static inline int scsi_is_wlun(unsigned int lun) | |||
447 | #define msg_byte(result) (((result) >> 8) & 0xff) | 439 | #define msg_byte(result) (((result) >> 8) & 0xff) |
448 | #define host_byte(result) (((result) >> 16) & 0xff) | 440 | #define host_byte(result) (((result) >> 16) & 0xff) |
449 | #define driver_byte(result) (((result) >> 24) & 0xff) | 441 | #define driver_byte(result) (((result) >> 24) & 0xff) |
450 | #define suggestion(result) (driver_byte(result) & SUGGEST_MASK) | ||
451 | |||
452 | static inline void set_msg_byte(struct scsi_cmnd *cmd, char status) | ||
453 | { | ||
454 | cmd->result |= status << 8; | ||
455 | } | ||
456 | |||
457 | static inline void set_host_byte(struct scsi_cmnd *cmd, char status) | ||
458 | { | ||
459 | cmd->result |= status << 16; | ||
460 | } | ||
461 | |||
462 | static inline void set_driver_byte(struct scsi_cmnd *cmd, char status) | ||
463 | { | ||
464 | cmd->result |= status << 24; | ||
465 | } | ||
466 | |||
467 | 442 | ||
468 | #define sense_class(sense) (((sense) >> 4) & 0x7) | 443 | #define sense_class(sense) (((sense) >> 4) & 0x7) |
469 | #define sense_error(sense) ((sense) & 0xf) | 444 | #define sense_error(sense) ((sense) & 0xf) |