Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1270967 > unrolled thread

Re: [PATCH v5 06/11] scsi: ufs: add quirk to enable host controller without hce

Started byArnd Bergmann <arnd@arndb.de>
First post2015-11-17 09:50 +0100
Last post2015-11-17 09:50 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v5 06/11] scsi: ufs: add quirk to enable host controller without hce Arnd Bergmann <arnd@arndb.de> - 2015-11-17 09:50 +0100

#1270967 — Re: [PATCH v5 06/11] scsi: ufs: add quirk to enable host controller without hce

FromArnd Bergmann <arnd@arndb.de>
Date2015-11-17 09:50 +0100
SubjectRe: [PATCH v5 06/11] scsi: ufs: add quirk to enable host controller without hce
Message-ID<qvK7D-2Dd-7@gated-at.bofh.it>
On Monday 09 November 2015 10:56:22 Alim Akhtar wrote:
> +static int ufshcd_hba_enable(struct ufs_hba *hba)
> +{
> +       int ret;
> +
> +       if (hba->quirks & UFSHCI_QUIRK_BROKEN_HCE) {
> +               ufshcd_set_link_off(hba);
> +               ufshcd_vops_hce_enable_notify(hba, PRE_CHANGE);
> +
> +               /* enable UIC related interrupts */
> +               ufshcd_enable_intr(hba, UFSHCD_UIC_MASK);
> +               ret = ufshcd_dme_reset(hba);
> +               if (!ret) {
> +                       ret = ufshcd_dme_enable(hba);
> +                       if (!ret)
> +                               ufshcd_vops_hce_enable_notify(hba, POST_CHANGE);
> +                       if (ret)
> +                               dev_err(hba->dev,
> +                                       "Host controller enable failed with non-hce\n");
> +               }
> +       } else {
> +               ret = ufshcd_hba_execute_hce(hba);
> +       }
> +
> +       return ret;

quirks are often not the best way to deal with host controller specific
differences. How about using a function pointer for ufshcd_hba_enable()
that can be one or the oither implementation?

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web