diff options
Diffstat (limited to 'include/scsi/scsi.h')
-rw-r--r-- | include/scsi/scsi.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index 1bc67520141..84a6d5fe092 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h @@ -429,4 +429,10 @@ struct scsi_lun { /* Used to obtain the PCI location of a device */ #define SCSI_IOCTL_GET_PCI 0x5387 +/* Pull a u32 out of a SCSI message (using BE SCSI conventions) */ +static inline u32 scsi_to_u32(u8 *ptr) +{ + return (ptr[0]<<24) + (ptr[1]<<16) + (ptr[2]<<8) + ptr[3]; +} + #endif /* _SCSI_SCSI_H */ |