diff options
author | Christoph Hellwig <hch@lst.de> | 2014-10-11 06:06:47 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-11-12 05:16:10 -0500 |
commit | 176aa9d6ee2db582e7e856dbe1983004a82869b4 (patch) | |
tree | 5c1e97cbdc98dd9162ef6f81af19eca932f8117e /include/scsi | |
parent | 1ee8e889d946b3b1c2cc8b99e29eac47d1581dfd (diff) |
scsi: refactor scsi_reset_provider handling
Pull the common code from the two callers into the function,
and rename it to scsi_ioctl_reset.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/scsi_eh.h | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/include/scsi/scsi_eh.h b/include/scsi/scsi_eh.h index 256248141322..1e1421b06565 100644 --- a/include/scsi/scsi_eh.h +++ b/include/scsi/scsi_eh.h | |||
@@ -60,20 +60,7 @@ extern int scsi_get_sense_info_fld(const u8 * sense_buffer, int sb_len, | |||
60 | 60 | ||
61 | extern void scsi_build_sense_buffer(int desc, u8 *buf, u8 key, u8 asc, u8 ascq); | 61 | extern void scsi_build_sense_buffer(int desc, u8 *buf, u8 key, u8 asc, u8 ascq); |
62 | 62 | ||
63 | /* | 63 | extern int scsi_ioctl_reset(struct scsi_device *, int __user *); |
64 | * Reset request from external source | ||
65 | * Note: if SCSI_TRY_RESET_DEVICE fails then it will escalate to | ||
66 | * SCSI_TRY_RESET_TARGET which if it fails will escalate to | ||
67 | * SCSI_TRY_RESET_BUS which if it fails will escalate to SCSI_TRY_RESET_HOST. | ||
68 | * To prevent escalation OR with SCSI_TRY_RESET_NO_ESCALATE. | ||
69 | */ | ||
70 | #define SCSI_TRY_RESET_DEVICE 1 | ||
71 | #define SCSI_TRY_RESET_BUS 2 | ||
72 | #define SCSI_TRY_RESET_HOST 3 | ||
73 | #define SCSI_TRY_RESET_TARGET 4 | ||
74 | #define SCSI_TRY_RESET_NO_ESCALATE 0x100 /* OR-ed to prior defines */ | ||
75 | |||
76 | extern int scsi_reset_provider(struct scsi_device *, int); | ||
77 | 64 | ||
78 | struct scsi_eh_save { | 65 | struct scsi_eh_save { |
79 | /* saved state */ | 66 | /* saved state */ |