diff options
Diffstat (limited to 'include/scsi/scsi_eh.h')
-rw-r--r-- | include/scsi/scsi_eh.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/scsi/scsi_eh.h b/include/scsi/scsi_eh.h index 80557f879e3e..b24d224281bd 100644 --- a/include/scsi/scsi_eh.h +++ b/include/scsi/scsi_eh.h | |||
@@ -26,6 +26,14 @@ struct scsi_sense_hdr { /* See SPC-3 section 4.5 */ | |||
26 | u8 additional_length; /* always 0 for fixed sense format */ | 26 | u8 additional_length; /* always 0 for fixed sense format */ |
27 | }; | 27 | }; |
28 | 28 | ||
29 | static inline int scsi_sense_valid(struct scsi_sense_hdr *sshdr) | ||
30 | { | ||
31 | if (!sshdr) | ||
32 | return 0; | ||
33 | |||
34 | return (sshdr->response_code & 0x70) == 0x70; | ||
35 | } | ||
36 | |||
29 | 37 | ||
30 | extern void scsi_add_timer(struct scsi_cmnd *, int, | 38 | extern void scsi_add_timer(struct scsi_cmnd *, int, |
31 | void (*)(struct scsi_cmnd *)); | 39 | void (*)(struct scsi_cmnd *)); |