aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/scsi.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/scsi/scsi.h')
-rw-r--r--include/scsi/scsi.h19
1 files changed, 2 insertions, 17 deletions
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h
index 80d7f60e2663..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
13struct 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
@@ -439,22 +440,6 @@ static inline int scsi_is_wlun(unsigned int lun)
439#define host_byte(result) (((result) >> 16) & 0xff) 440#define host_byte(result) (((result) >> 16) & 0xff)
440#define driver_byte(result) (((result) >> 24) & 0xff) 441#define driver_byte(result) (((result) >> 24) & 0xff)
441 442
442static inline void set_msg_byte(struct scsi_cmnd *cmd, char status)
443{
444 cmd->result |= status << 8;
445}
446
447static inline void set_host_byte(struct scsi_cmnd *cmd, char status)
448{
449 cmd->result |= status << 16;
450}
451
452static inline void set_driver_byte(struct scsi_cmnd *cmd, char status)
453{
454 cmd->result |= status << 24;
455}
456
457
458#define sense_class(sense) (((sense) >> 4) & 0x7) 443#define sense_class(sense) (((sense) >> 4) & 0x7)
459#define sense_error(sense) ((sense) & 0xf) 444#define sense_error(sense) ((sense) & 0xf)
460#define sense_valid(sense) ((sense) & 0x80); 445#define sense_valid(sense) ((sense) & 0x80);