summaryrefslogtreecommitdiff
path: root/include/scsi/scsi_cmnd.h
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@HansenPartnership.com>2009-02-09 03:59:48 (GMT)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-03-12 17:58:13 (GMT)
commitf290f1970f01287eaaffc798a677594a57ebd65e (patch)
tree534b3ab262c3c791f80c8fd32dee7192395973dc /include/scsi/scsi_cmnd.h
parent97218a1499391b174ea95e05b7a40fbb73e79813 (diff)
downloadlinux-f290f1970f01287eaaffc798a677594a57ebd65e.tar.xz
[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 855bf95..43b50d3 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 */