From 2944369144548432f3a5ffce7a2926bfb4ce4f0a Mon Sep 17 00:00:00 2001 From: Vikas Chaudhary Date: Fri, 12 Aug 2011 02:51:28 -0700 Subject: [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 Reviewed-by: Mike Christie Signed-off-by: James Bottomley --- include/scsi/scsi_host.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include/scsi/scsi_host.h') 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 { */ enum blk_eh_timer_return (*eh_timed_out)(struct scsi_cmnd *); + /* This is an optional routine that allows transport to initiate + * LLD adapter or firmware reset using sysfs attribute. + * + * Return values: 0 on success, -ve value on failure. + * + * Status: OPTIONAL + */ + + int (*host_reset)(struct Scsi_Host *shost, int reset_type); +#define SCSI_ADAPTER_RESET 1 +#define SCSI_FIRMWARE_RESET 2 + + /* * Name of proc directory */ -- cgit v1.2.3-59-g8ed1b