mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bart Van Assche <bart.vanassche@sandisk.com>
To: Gioh Kim <gi-oh.kim@profitbricks.com>,
	"dledford@redhat.com" <dledford@redhat.com>,
	"sean.hefty@intel.com" <sean.hefty@intel.com>,
	"hal.rosenstock@gmail.com" <hal.rosenstock@gmail.com>
Cc: "linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] IB/srp: export reset-host via sysfs
Date: Tue, 4 Oct 2016 07:24:52 -0700	[thread overview]
Message-ID: <af0d75ef-734d-2cdf-05d8-bf4cd9c59ef9@sandisk.com> (raw)
In-Reply-To: <1475589609-26451-1-git-send-email-gi-oh.kim@profitbricks.com>

On 10/04/16 07:00, Gioh Kim wrote:
> 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,
>  };

Hello Gioh,

A patch description should not only explain what is changed but also why 
a change is considered useful. Why do you think it would be useful to 
allow users to trigger a call of srp_reconnect_rport() through sysfs 
instead of using the functionality that is already available through 
sysfs, namely removing a SCSI host and reconnecting?

Bart.

  reply	other threads:[~2016-10-04 14:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-04 14:00 Gioh Kim
2016-10-04 14:24 ` Bart Van Assche [this message]
2016-10-04 15:22   ` Gioh Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=af0d75ef-734d-2cdf-05d8-bf4cd9c59ef9@sandisk.com \
    --to=bart.vanassche@sandisk.com \
    --cc=dledford@redhat.com \
    --cc=gi-oh.kim@profitbricks.com \
    --cc=hal.rosenstock@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=sean.hefty@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®