aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorVikas Chaudhary <vikas.chaudhary@qlogic.com>2011-08-12 05:51:28 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-08-27 10:36:46 -0400
commit2944369144548432f3a5ffce7a2926bfb4ce4f0a (patch)
treec42de87060c88ed22224e828fbd81a83f33a03e7 /include/scsi
parent6085491c34b37fa806f70ccd3fb2bf08416e9e98 (diff)
[SCSI] scsi: Added support for adapter and firmware reset
Added new sysfs attr 'host_reset' in scsi_sysfs.c to perform adapter or firmware reset as suggested by Mike Christie here: http://marc.info/?l=linux-scsi&m=127359347111167&w=2 user/application can write "adapter" or "firmware" on this attr and it will call newly added function hook in scsi_host_template to call LDD adapter or firmware reset implementation. Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/scsi_host.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index f1f2644137b8..fc22ad9dba77 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -355,6 +355,19 @@ struct scsi_host_template {
355 */ 355 */
356 enum blk_eh_timer_return (*eh_timed_out)(struct scsi_cmnd *); 356 enum blk_eh_timer_return (*eh_timed_out)(struct scsi_cmnd *);
357 357
358 /* This is an optional routine that allows transport to initiate
359 * LLD adapter or firmware reset using sysfs attribute.
360 *
361 * Return values: 0 on success, -ve value on failure.
362 *
363 * Status: OPTIONAL
364 */
365
366 int (*host_reset)(struct Scsi_Host *shost, int reset_type);
367#define SCSI_ADAPTER_RESET 1
368#define SCSI_FIRMWARE_RESET 2
369
370
358 /* 371 /*
359 * Name of proc directory 372 * Name of proc directory
360 */ 373 */