Merge by hand (conflicts in sd.c)
[pandora-kernel.git] / include / scsi / scsi_eh.h
index 4b71095..fabd879 100644 (file)
@@ -26,6 +26,14 @@ struct scsi_sense_hdr {              /* See SPC-3 section 4.5 */
        u8 additional_length;   /* always 0 for fixed sense format */
 };
 
+static inline int scsi_sense_valid(struct scsi_sense_hdr *sshdr)
+{
+       if (!sshdr)
+               return 0;
+
+       return (sshdr->response_code & 0x70) == 0x70;
+}
+
 
 extern void scsi_report_bus_reset(struct Scsi_Host *, int);
 extern void scsi_report_device_reset(struct Scsi_Host *, int, int);