From: 정종민 <jjmin.jeong@samsung.com>
To: "'Can Guo'" <cang@codeaurora.org>
Cc: <jejb@linux.ibm.com>, <martin.petersen@oracle.com>,
<alim.akhtar@samsung.com>, <avri.altman@wdc.com>,
<beanhuo@micron.com>, <adrian.hunter@intel.com>,
<linux-scsi@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH 3/3] scsi: ufs: add quirk to support host reset only
Date: Thu, 3 Jun 2021 12:21:45 +0900 [thread overview]
Message-ID: <000101d75827$94eb33d0$bec19b70$@samsung.com> (raw)
In-Reply-To: <a31867eaf47a298baeec714f29e9cafe@codeaurora.org>
> > samsung ExynosAuto SoC has two types of host controller interface to
> > support the virtualization of UFS Device.
> > One is the physical host(PH) that the same as conventaional UFSHCI,
> > and the other is the virtual host(VH) that support data transfer
> > function only.
> >
> > In this structure, the virtual host does support host reset handler
> > only.
> > This patch calls the host reset handler when abort or device reset
> > handler has occured in the virtual host.
>
> One more question, as per the plot in the cover letter, the VH does
> support TMRs.
> Why are you trying to make ufshcd_abort() and
> ufshcd_eh_device_reset_handler()
> no-ops?
>
> Thanks,
>
> Can Guo.
Can,
Thanks for your review.
Yes, you are right about ufshcd_abort.
it would be better to call if it fails abort handling has failed.
I will apply this modification to the next patch.
device reset handler case is a little different. We do not want the virtual
host to do device reset(LUN reset).
According to our virtualization architecture, virtual OSs can share LUNs.
Therefore, we are trying to prevent the reset for LUN in guest OS.
> >
> > Change-Id: I3f07e772415a35fe1e7374e02b3c37ef0bf5660d
> > Signed-off-by: jongmin jeong <jjmin.jeong@samsung.com>
> > ---
> > drivers/scsi/ufs/ufshcd.c | 7 +++++++ drivers/scsi/ufs/ufshcd.h | 6
> > ++++++
> > 2 files changed, 13 insertions(+)
> >
> > diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> > index 4787e40c6a2d..9d1912290f87 100644
> > --- a/drivers/scsi/ufs/ufshcd.c
> > +++ b/drivers/scsi/ufs/ufshcd.c
> > @@ -6826,6 +6826,9 @@ static int ufshcd_eh_device_reset_handler(struct
> > scsi_cmnd *cmd)
> > u8 resp = 0xF, lun;
> > unsigned long flags;
> >
> > + if (hba->quirks & UFSHCD_QUIRK_BROKEN_RESET_HANDLER)
> > + return ufshcd_eh_host_reset_handler(cmd);
> > +
> > host = cmd->device->host;
> > hba = shost_priv(host);
> >
> > @@ -6972,6 +6975,10 @@ static int ufshcd_abort(struct scsi_cmnd *cmd)
> > host = cmd->device->host;
> > hba = shost_priv(host);
> > tag = cmd->request->tag;
> > +
> > + if (hba->quirks & UFSHCD_QUIRK_BROKEN_RESET_HANDLER)
> > + return ufshcd_eh_host_reset_handler(cmd);
> > +
> > lrbp = &hba->lrb[tag];
> > if (!ufshcd_valid_tag(hba, tag)) {
> > dev_err(hba->dev,
> > diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h
> > index 0ab4c296be32..82a9c6889978 100644
> > --- a/drivers/scsi/ufs/ufshcd.h
> > +++ b/drivers/scsi/ufs/ufshcd.h
> > @@ -581,6 +581,12 @@ enum ufshcd_quirks {
> > * support interface configuration.
> > */
> > UFSHCD_QUIRK_SKIP_INTERFACE_CONFIGURATION = 1 << 16,
> > +
> > + /*
> > + * This quirk needs to be enabled if the host controller support
> > + * host reset handler only.
> > + */
> > + UFSHCD_QUIRK_BROKEN_RESET_HANDLER = 1 << 17,
> > };
> >
> > enum ufshcd_caps {
Best Regards,
Jongmin jeong
next prev parent reply other threads:[~2021-06-03 3:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20210527031217epcas2p44b9d999edcc55b345dfd0749acefeaec@epcas2p4.samsung.com>
2021-05-27 3:08 ` [PATCH 0/3] Add quirk to support exynos ufshci jongmin jeong
2021-05-27 3:08 ` [PATCH 1/3] scsi: ufs: add quirk to handle broken UIC command jongmin jeong
2021-05-27 8:00 ` Christoph Hellwig
2021-06-03 3:08 ` 정종민
2021-05-27 3:09 ` [PATCH 2/3] scsi: ufs: add quirk to enable host controller without interface configuration jongmin jeong
2021-05-27 3:09 ` [PATCH 3/3] scsi: ufs: add quirk to support host reset only jongmin jeong
2021-05-27 6:08 ` kernel test robot
2021-05-27 6:31 ` Can Guo
2021-05-27 6:53 ` Can Guo
2021-06-03 3:21 ` 정종민 [this message]
2021-05-27 7:34 ` kernel test robot
2021-05-27 8:17 ` [PATCH 0/3] Add quirk to support exynos ufshci Alim Akhtar
2021-05-27 16:40 ` Bart Van Assche
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='000101d75827$94eb33d0$bec19b70$@samsung.com' \
--to=jjmin.jeong@samsung.com \
--cc=adrian.hunter@intel.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=cang@codeaurora.org \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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