summaryrefslogtreecommitdiffstats
path: root/include/scsi/scsi_cmnd.h
diff options
context:
space:
mode:
authorJames Bottomley2009-02-09 04:59:48 +0100
committerJames Bottomley2009-03-12 18:58:13 +0100
commitf290f1970f01287eaaffc798a677594a57ebd65e (patch)
tree534b3ab262c3c791f80c8fd32dee7192395973dc /include/scsi/scsi_cmnd.h
parent[SCSI] libosd: Fix NULL dereference BUG when target is not OSD conformant (diff)
downloadkernel-qcow2-linux-f290f1970f01287eaaffc798a677594a57ebd65e.tar.gz
kernel-qcow2-linux-f290f1970f01287eaaffc798a677594a57ebd65e.tar.xz
kernel-qcow2-linux-f290f1970f01287eaaffc798a677594a57ebd65e.zip
[SCSI] Make scsi.h independent of the rest of the scsi includes
This allows it to compile and be used on the ps3 platform that wants to use the #define values in scsi.h without actually having CONFIG_SCSI set. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'include/scsi/scsi_cmnd.h')
-rw-r--r--include/scsi/scsi_cmnd.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h
index 855bf95963e7..43b50d36925c 100644
--- a/include/scsi/scsi_cmnd.h
+++ b/include/scsi/scsi_cmnd.h
@@ -291,4 +291,19 @@ static inline struct scsi_data_buffer *scsi_prot(struct scsi_cmnd *cmd)
#define scsi_for_each_prot_sg(cmd, sg, nseg, __i) \
for_each_sg(scsi_prot_sglist(cmd), sg, nseg, __i)
+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;
+}
+
#endif /* _SCSI_SCSI_CMND_H */