summaryrefslogtreecommitdiffstats
path: root/include/scsi/scsi.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-18 22:00:54 +0200
committerIngo Molnar <mingo@elte.hu>2008-07-18 22:00:54 +0200
commitbb2c018b09b681d43f5e08124b83e362647ea82b (patch)
treed794902c78f9fdd04ed88a4b8d451ed6f9292ec0 /include/scsi/scsi.h
parent82638844d9a8581bbf33201cc209a14876eca167 (diff)
parent5b664cb235e97afbf34db9c4d77f08ebd725335e (diff)
downloadlinux-stable-bb2c018b09b681d43f5e08124b83e362647ea82b.tar.gz
linux-stable-bb2c018b09b681d43f5e08124b83e362647ea82b.tar.bz2
linux-stable-bb2c018b09b681d43f5e08124b83e362647ea82b.zip
Merge branch 'linus' into cpus4096
Conflicts: drivers/acpi/processor_throttling.c Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/scsi/scsi.h')
-rw-r--r--include/scsi/scsi.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h
index 32742c4563de..00137a7769ee 100644
--- a/include/scsi/scsi.h
+++ b/include/scsi/scsi.h
@@ -9,6 +9,7 @@
#define _SCSI_SCSI_H
#include <linux/types.h>
+#include <scsi/scsi_cmnd.h>
/*
* The maximum number of SG segments that we will put inside a
@@ -400,6 +401,7 @@ struct scsi_lun {
#define SOFT_ERROR 0x2005
#define ADD_TO_MLQUEUE 0x2006
#define TIMEOUT_ERROR 0x2007
+#define SCSI_RETURN_NOT_HANDLED 0x2008
/*
* Midlevel queue return values.
@@ -424,6 +426,22 @@ struct scsi_lun {
#define driver_byte(result) (((result) >> 24) & 0xff)
#define suggestion(result) (driver_byte(result) & SUGGEST_MASK)
+static inline void set_msg_byte(struct scsi_cmnd *cmd, char status)
+{
+ cmd->result |= status << 8;
+}
+
+static inline void set_host_byte(struct scsi_cmnd *cmd, char status)
+{
+ cmd->result |= status << 16;
+}
+
+static inline void set_driver_byte(struct scsi_cmnd *cmd, char status)
+{
+ cmd->result |= status << 24;
+}
+
+
#define sense_class(sense) (((sense) >> 4) & 0x7)
#define sense_error(sense) ((sense) & 0xf)
#define sense_valid(sense) ((sense) & 0x80);