lkml.org 
[lkml]   [2021]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v2 3/3] scsi: ufs: ufs-exynos: implement exynos isr
Date
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

\
 
 \ /
  Last update: 2021-09-17 22:00    [W:0.124 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site