From: Brian King <brking@linux.vnet.ibm.com>
To: Tyrel Datwyler <tyreld@linux.ibm.com>,
james.bottomley@hansenpartnership.com
Cc: brking@linux.ibm.com, linuxppc-dev@lists.ozlabs.org,
linux-scsi@vger.kernel.org, martin.petersen@oracle.com,
Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
Subject: Re: [PATCH 1/3] ibmvscsi: Wire up host_reset() in the drivers scsi_host_template
Date: Thu, 2 May 2019 16:50:04 -0500 [thread overview]
Message-ID: <29e15e27-8cc6-d45e-a9e1-80603278dda2@linux.vnet.ibm.com> (raw)
In-Reply-To: <20190502004729.19962-1-tyreld@linux.ibm.com>
On 5/1/19 7:47 PM, Tyrel Datwyler wrote:
> From: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
>
> Wire up the host_reset function in our driver_template to allow a user
> requested adpater reset via the host_reset sysfs attribute.
>
> Example:
>
> echo "adapter" > /sys/class/scsi_host/host0/host_reset
>
> Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
> ---
> drivers/scsi/ibmvscsi/ibmvscsi.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c
> index 8cec5230fe31..1c37244f16a0 100644
> --- a/drivers/scsi/ibmvscsi/ibmvscsi.c
> +++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
> @@ -2050,6 +2050,18 @@ static struct device_attribute ibmvscsi_host_config = {
> .show = show_host_config,
> };
>
> +static int ibmvscsi_host_reset(struct Scsi_Host *shost, int reset_type)
> +{
> + struct ibmvscsi_host_data *hostdata = shost_priv(shost);
> +
> + vio_disable_interrupts(to_vio_dev(hostdata->dev));
> + dev_info(hostdata->dev, "Initiating adapter reset!\n");
> + ibmvscsi_reset_host(hostdata);
> + vio_enable_interrupts(to_vio_dev(hostdata->dev));
Is it necessary to disable / enable interrupts around the call to ibmvscsi_reset_host?
I don't know why we'd need to do that before calling the reset as we have other
cases, like ibmvscsi_timeout where we don't bother doing this. Also, at the end
of the reset we look to be already enabling interrupts.
Thanks,
Brian
--
Brian King
Power Linux I/O
IBM Linux Technology Center
next prev parent reply other threads:[~2019-05-02 21:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-02 0:47 [PATCH 1/3] ibmvscsi: Wire up host_reset() in the drivers scsi_host_template Tyrel Datwyler
2019-05-02 0:47 ` [PATCH 2/3] ibmvscsi: redo driver work thread to use enum action states Tyrel Datwyler
2019-05-02 21:43 ` Brian King
2019-05-03 0:35 ` Tyrel Datwyler
2019-05-02 0:47 ` [PATCH 3/3] ibmvscsi: fix tripping of blk_mq_run_hw_queue WARN_ON Tyrel Datwyler
2019-05-02 21:50 ` Brian King [this message]
2019-05-03 0:37 ` [PATCH 1/3] ibmvscsi: Wire up host_reset() in the drivers scsi_host_template Tyrel Datwyler
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=29e15e27-8cc6-d45e-a9e1-80603278dda2@linux.vnet.ibm.com \
--to=brking@linux.vnet.ibm.com \
--cc=brking@linux.ibm.com \
--cc=james.bottomley@hansenpartnership.com \
--cc=linux-scsi@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=martin.petersen@oracle.com \
--cc=tyreld@linux.ibm.com \
--cc=tyreld@linux.vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).