Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1495443
| From | Gioh Kim <gi-oh.kim@profitbricks.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [RFC] IB/srp: export reset-host via sysfs |
| Date | 2016-10-04 16:10 +0200 |
| Message-ID | <soyzT-3Kb-3@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Standard SCSI device has host_reset sysfs interface.
This patch exports the host_reset interface for upper layer.
Signed-off-by: Gioh Kim <gi-oh.kim@profitbricks.com>
---
drivers/infiniband/ulp/srp/ib_srp.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index 3322ed7..92e6c3f 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -2628,6 +2628,15 @@ static int srp_reset_device(struct scsi_cmnd *scmnd)
return SUCCESS;
}
+static int srp_scsi_host_reset(struct Scsi_Host *shost, int reset_type)
+{
+ struct srp_target_port *target = host_to_target(shost);
+
+ shost_printk(KERN_EMERG, target->scsi_host, PFX "SRP reset_host called\n");
+
+ return srp_reconnect_rport(target->rport);
+}
+
static int srp_reset_host(struct scsi_cmnd *scmnd)
{
struct srp_target_port *target = host_to_target(scmnd->device->host);
@@ -2858,6 +2867,7 @@ static struct scsi_host_template srp_template = {
.use_clustering = ENABLE_CLUSTERING,
.shost_attrs = srp_host_attrs,
.track_queue_depth = 1,
+ .host_reset = srp_scsi_host_reset,
};
static int srp_sdev_count(struct Scsi_Host *host)
--
2.5.0
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[RFC] IB/srp: export reset-host via sysfs Gioh Kim <gi-oh.kim@profitbricks.com> - 2016-10-04 16:10 +0200 Re: [RFC] IB/srp: export reset-host via sysfs Gioh Kim <gi-oh.kim@profitbricks.com> - 2016-10-04 17:30 +0200
csiph-web