linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Avri Altman <Avri.Altman@wdc.com>
To: Kiwoong Kim <kwmad.kim@samsung.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"alim.akhtar@samsung.com" <alim.akhtar@samsung.com>,
	"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	"beanhuo@micron.com" <beanhuo@micron.com>,
	"cang@codeaurora.org" <cang@codeaurora.org>,
	"adrian.hunter@intel.com" <adrian.hunter@intel.com>,
	"sc.suh@samsung.com" <sc.suh@samsung.com>,
	"hy50.seo@samsung.com" <hy50.seo@samsung.com>,
	"sh425.lee@samsung.com" <sh425.lee@samsung.com>,
	"bhoon95.kim@samsung.com" <bhoon95.kim@samsung.com>
Subject: RE: [PATCH v2 3/3] scsi: ufs: ufs-exynos: implement exynos isr
Date: Fri, 17 Sep 2021 19:59:14 +0000	[thread overview]
Message-ID: <DM6PR04MB6575978CE43BB03BB0B29AB1FCDD9@DM6PR04MB6575.namprd04.prod.outlook.com> (raw)
In-Reply-To: <746e059782953fca6c21945297151d2bb73d3370.1631519695.git.kwmad.kim@samsung.com>

Hi,

> +static irqreturn_t exynos_ufs_isr(struct ufs_hba *hba) {
> +       struct exynos_ufs *ufs = ufshcd_get_variant(hba);
> +       u32 status;
> +       unsigned long flags;
> +
> +       if (!hba->priv) return IRQ_HANDLED;
> +       status = hci_readl(ufs, VENDOR_SPECIFIC_IS);
> +       hci_writel(ufs, status, VENDOR_SPECIFIC_IS);
> +       /*
> +        * If host doesn't guarantee integrity of UTP transmission,
> +        * it needs to be reset immediately to make it unable to
> +        * proceed requests. Because w/o this, if UTP functions
> +        * in host doesn't work properly for such system power margins,
> +        * DATA IN from broken devices or whatever in the real world,
> +        * some unexpected events could happen, such as transferring
> +        * a broken DATA IN to a device. It could be various types of
> +        * problems on the level of file system. In this case, I think
> +        * blocking the host's functionality is the best strategy.
> +        * Perhaps, if its root cause is temporary, system could recover.
> +        */
> +       if (status & RX_UPIU_HIT_ERROR) {
> +               pr_err("%s: status: 0x%08x\n", __func__, status);
> +               hba->force_reset = true;
> +               hba->force_requeue = true;
If force_reset is true, isn't force_requeue redundant?

Thanks,
Avri

> +               scsi_schedule_eh(hba->host);
> +               spin_unlock_irqrestore(hba->host->host_lock, flags);
> +               return IRQ_HANDLED;
> +       }
> +       return IRQ_NONE;
> +}
> +
>  static struct ufs_hba_variant_ops ufs_hba_exynos_ops = {
>         .name                           = "exynos_ufs",
>         .init                           = exynos_ufs_init,
> @@ -1209,6 +1268,7 @@ static struct ufs_hba_variant_ops
> ufs_hba_exynos_ops = {
>         .hibern8_notify                 = exynos_ufs_hibern8_notify,
>         .suspend                        = exynos_ufs_suspend,
>         .resume                         = exynos_ufs_resume,
> +       .intr                           = exynos_ufs_isr,
>  };
> 
>  static int exynos_ufs_probe(struct platform_device *pdev)
> --
> 2.7.4


  parent reply	other threads:[~2021-09-17 19:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20210913081148epcas2p21c23ca6a745f40083ee7d6e7da4d7c00@epcas2p2.samsung.com>
2021-09-13  7:55 ` [PATCH v2 0/3] scsi: ufs: introduce vendor isr Kiwoong Kim
     [not found]   ` <CGME20210913081150epcas2p11f98eed5939bf082981e2a4d6fd9a059@epcas2p1.samsung.com>
2021-09-13  7:55     ` [PATCH v2 1/3] " Kiwoong Kim
2021-09-14  3:30       ` Bart Van Assche
2021-09-14  5:13         ` Kiwoong Kim
2021-09-14 11:53         ` Avri Altman
2021-09-14 16:29           ` Bart Van Assche
     [not found]   ` <CGME20210913081151epcas2p453eb6c6de01466060724d1445b443572@epcas2p4.samsung.com>
2021-09-13  7:55     ` [PATCH v2 2/3] scsi: ufs: introduce force requeue Kiwoong Kim
     [not found]   ` <CGME20210913081152epcas2p2eac4a8dbef33164a150dccf2e282dcce@epcas2p2.samsung.com>
2021-09-13  7:55     ` [PATCH v2 3/3] scsi: ufs: ufs-exynos: implement exynos isr Kiwoong Kim
2021-09-13 16:23       ` Bart Van Assche
2021-09-14  5:12         ` Kiwoong Kim
2021-09-17 19:59       ` Avri Altman [this message]
2021-09-13 16:09   ` [PATCH v2 0/3] scsi: ufs: introduce vendor isr Bart Van Assche
2021-09-13 17:26     ` Alim Akhtar
2021-09-14  3:23       ` 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=DM6PR04MB6575978CE43BB03BB0B29AB1FCDD9@DM6PR04MB6575.namprd04.prod.outlook.com \
    --to=avri.altman@wdc.com \
    --cc=adrian.hunter@intel.com \
    --cc=alim.akhtar@samsung.com \
    --cc=beanhuo@micron.com \
    --cc=bhoon95.kim@samsung.com \
    --cc=cang@codeaurora.org \
    --cc=hy50.seo@samsung.com \
    --cc=jejb@linux.ibm.com \
    --cc=kwmad.kim@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=sc.suh@samsung.com \
    --cc=sh425.lee@samsung.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).