diff options
author | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-02-08 21:59:48 -0600 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-03-12 12:58:13 -0500 |
commit | f290f1970f01287eaaffc798a677594a57ebd65e (patch) | |
tree | 534b3ab262c3c791f80c8fd32dee7192395973dc /include/scsi/scsi_cmnd.h | |
parent | 97218a1499391b174ea95e05b7a40fbb73e79813 (diff) | |
download | op-kernel-dev-f290f1970f01287eaaffc798a677594a57ebd65e.zip op-kernel-dev-f290f1970f01287eaaffc798a677594a57ebd65e.tar.gz |
[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.h | 15 |
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 */ |