linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] mmc: sdhci-pci-core: Disable ES for ASUS BIOS on Jasper Lake
@ 2022-10-13 21:00 Patrick Thompson
  2022-10-14  5:33 ` Adrian Hunter
  2022-10-14 14:07 ` Ulf Hansson
  0 siblings, 2 replies; 4+ messages in thread
From: Patrick Thompson @ 2022-10-13 21:00 UTC (permalink / raw)
  To: Linux MMC Development
  Cc: Sangwhan Moon, Adrian Hunter, Patrick Thompson, Ulf Hansson,
	linux-kernel

Enhanced Strobe (ES) does not work correctly on the ASUS 1100 series of
devices. Jasper Lake eMMCs (pci_id 8086:4dc4) are supposed to support
ES. There are also two system families under the series, thus this is
being scoped to the ASUS BIOS.

The failing ES prevents the installer from writing to disk. Falling back
to HS400 without ES fixes the issue.

Signed-off-by: Patrick Thompson <ptf@google.com>

Fixes: 315e3bd7ac19 ("mmc: sdhci-pci: Add support for Intel JSL")

---

Changes in v3:
* Remove redundant MMC_CAP2_HS400 selection

Changes in v2:
* Only disable ES instead of CQE in its entirety.
* Target Jasper Lake (JSL)
* Target ASUS BIOS instead of specific system family

 drivers/mmc/host/sdhci-pci-core.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
index 169b84761041..34ea1acbb3cc 100644
--- a/drivers/mmc/host/sdhci-pci-core.c
+++ b/drivers/mmc/host/sdhci-pci-core.c
@@ -914,6 +914,12 @@ static bool glk_broken_cqhci(struct sdhci_pci_slot *slot)
 		dmi_match(DMI_SYS_VENDOR, "IRBIS"));
 }
 
+static bool jsl_broken_hs400es(struct sdhci_pci_slot *slot)
+{
+	return slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_JSL_EMMC &&
+			dmi_match(DMI_BIOS_VENDOR, "ASUSTeK COMPUTER INC.");
+}
+
 static int glk_emmc_probe_slot(struct sdhci_pci_slot *slot)
 {
 	int ret = byt_emmc_probe_slot(slot);
@@ -922,9 +928,11 @@ static int glk_emmc_probe_slot(struct sdhci_pci_slot *slot)
 		slot->host->mmc->caps2 |= MMC_CAP2_CQE;
 
 	if (slot->chip->pdev->device != PCI_DEVICE_ID_INTEL_GLK_EMMC) {
-		slot->host->mmc->caps2 |= MMC_CAP2_HS400_ES;
-		slot->host->mmc_host_ops.hs400_enhanced_strobe =
-						intel_hs400_enhanced_strobe;
+		if (!jsl_broken_hs400es(slot)) {
+			slot->host->mmc->caps2 |= MMC_CAP2_HS400_ES;
+			slot->host->mmc_host_ops.hs400_enhanced_strobe =
+							intel_hs400_enhanced_strobe;
+		}
 		slot->host->mmc->caps2 |= MMC_CAP2_CQE_DCMD;
 	}
 
-- 
2.38.0.413.g74048e4d9e-goog


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] mmc: sdhci-pci-core: Disable ES for ASUS BIOS on Jasper Lake
  2022-10-13 21:00 [PATCH v3] mmc: sdhci-pci-core: Disable ES for ASUS BIOS on Jasper Lake Patrick Thompson
@ 2022-10-14  5:33 ` Adrian Hunter
  2022-10-14 14:07 ` Ulf Hansson
  1 sibling, 0 replies; 4+ messages in thread
From: Adrian Hunter @ 2022-10-14  5:33 UTC (permalink / raw)
  To: Patrick Thompson, Linux MMC Development
  Cc: Sangwhan Moon, Ulf Hansson, linux-kernel

On 14/10/22 00:00, Patrick Thompson wrote:
> Enhanced Strobe (ES) does not work correctly on the ASUS 1100 series of
> devices. Jasper Lake eMMCs (pci_id 8086:4dc4) are supposed to support
> ES. There are also two system families under the series, thus this is
> being scoped to the ASUS BIOS.
> 
> The failing ES prevents the installer from writing to disk. Falling back
> to HS400 without ES fixes the issue.
> 
> Signed-off-by: Patrick Thompson <ptf@google.com>
> 
> Fixes: 315e3bd7ac19 ("mmc: sdhci-pci: Add support for Intel JSL")

Acked-by: Adrian Hunter <adrian.hunter@intel.com>

> 
> ---
> 
> Changes in v3:
> * Remove redundant MMC_CAP2_HS400 selection
> 
> Changes in v2:
> * Only disable ES instead of CQE in its entirety.
> * Target Jasper Lake (JSL)
> * Target ASUS BIOS instead of specific system family
> 
>  drivers/mmc/host/sdhci-pci-core.c | 14 +++++++++++---
>  1 file changed, 11 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
> index 169b84761041..34ea1acbb3cc 100644
> --- a/drivers/mmc/host/sdhci-pci-core.c
> +++ b/drivers/mmc/host/sdhci-pci-core.c
> @@ -914,6 +914,12 @@ static bool glk_broken_cqhci(struct sdhci_pci_slot *slot)
>  		dmi_match(DMI_SYS_VENDOR, "IRBIS"));
>  }
>  
> +static bool jsl_broken_hs400es(struct sdhci_pci_slot *slot)
> +{
> +	return slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_JSL_EMMC &&
> +			dmi_match(DMI_BIOS_VENDOR, "ASUSTeK COMPUTER INC.");
> +}
> +
>  static int glk_emmc_probe_slot(struct sdhci_pci_slot *slot)
>  {
>  	int ret = byt_emmc_probe_slot(slot);
> @@ -922,9 +928,11 @@ static int glk_emmc_probe_slot(struct sdhci_pci_slot *slot)
>  		slot->host->mmc->caps2 |= MMC_CAP2_CQE;
>  
>  	if (slot->chip->pdev->device != PCI_DEVICE_ID_INTEL_GLK_EMMC) {
> -		slot->host->mmc->caps2 |= MMC_CAP2_HS400_ES;
> -		slot->host->mmc_host_ops.hs400_enhanced_strobe =
> -						intel_hs400_enhanced_strobe;
> +		if (!jsl_broken_hs400es(slot)) {
> +			slot->host->mmc->caps2 |= MMC_CAP2_HS400_ES;
> +			slot->host->mmc_host_ops.hs400_enhanced_strobe =
> +							intel_hs400_enhanced_strobe;
> +		}
>  		slot->host->mmc->caps2 |= MMC_CAP2_CQE_DCMD;
>  	}
>  


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] mmc: sdhci-pci-core: Disable ES for ASUS BIOS on Jasper Lake
  2022-10-13 21:00 [PATCH v3] mmc: sdhci-pci-core: Disable ES for ASUS BIOS on Jasper Lake Patrick Thompson
  2022-10-14  5:33 ` Adrian Hunter
@ 2022-10-14 14:07 ` Ulf Hansson
  2022-10-19 18:16   ` Patrick Thompson
  1 sibling, 1 reply; 4+ messages in thread
From: Ulf Hansson @ 2022-10-14 14:07 UTC (permalink / raw)
  To: Patrick Thompson
  Cc: Linux MMC Development, Sangwhan Moon, Adrian Hunter, linux-kernel

On Thu, 13 Oct 2022 at 23:00, Patrick Thompson <ptf@google.com> wrote:
>
> Enhanced Strobe (ES) does not work correctly on the ASUS 1100 series of
> devices. Jasper Lake eMMCs (pci_id 8086:4dc4) are supposed to support
> ES. There are also two system families under the series, thus this is
> being scoped to the ASUS BIOS.
>
> The failing ES prevents the installer from writing to disk. Falling back
> to HS400 without ES fixes the issue.
>
> Signed-off-by: Patrick Thompson <ptf@google.com>
>
> Fixes: 315e3bd7ac19 ("mmc: sdhci-pci: Add support for Intel JSL")

Applied for fixes and by adding a stable tag, thanks!

Kind regards
Uffe


>
> ---
>
> Changes in v3:
> * Remove redundant MMC_CAP2_HS400 selection
>
> Changes in v2:
> * Only disable ES instead of CQE in its entirety.
> * Target Jasper Lake (JSL)
> * Target ASUS BIOS instead of specific system family
>
>  drivers/mmc/host/sdhci-pci-core.c | 14 +++++++++++---
>  1 file changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
> index 169b84761041..34ea1acbb3cc 100644
> --- a/drivers/mmc/host/sdhci-pci-core.c
> +++ b/drivers/mmc/host/sdhci-pci-core.c
> @@ -914,6 +914,12 @@ static bool glk_broken_cqhci(struct sdhci_pci_slot *slot)
>                 dmi_match(DMI_SYS_VENDOR, "IRBIS"));
>  }
>
> +static bool jsl_broken_hs400es(struct sdhci_pci_slot *slot)
> +{
> +       return slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_JSL_EMMC &&
> +                       dmi_match(DMI_BIOS_VENDOR, "ASUSTeK COMPUTER INC.");
> +}
> +
>  static int glk_emmc_probe_slot(struct sdhci_pci_slot *slot)
>  {
>         int ret = byt_emmc_probe_slot(slot);
> @@ -922,9 +928,11 @@ static int glk_emmc_probe_slot(struct sdhci_pci_slot *slot)
>                 slot->host->mmc->caps2 |= MMC_CAP2_CQE;
>
>         if (slot->chip->pdev->device != PCI_DEVICE_ID_INTEL_GLK_EMMC) {
> -               slot->host->mmc->caps2 |= MMC_CAP2_HS400_ES;
> -               slot->host->mmc_host_ops.hs400_enhanced_strobe =
> -                                               intel_hs400_enhanced_strobe;
> +               if (!jsl_broken_hs400es(slot)) {
> +                       slot->host->mmc->caps2 |= MMC_CAP2_HS400_ES;
> +                       slot->host->mmc_host_ops.hs400_enhanced_strobe =
> +                                                       intel_hs400_enhanced_strobe;
> +               }
>                 slot->host->mmc->caps2 |= MMC_CAP2_CQE_DCMD;
>         }
>
> --
> 2.38.0.413.g74048e4d9e-goog
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] mmc: sdhci-pci-core: Disable ES for ASUS BIOS on Jasper Lake
  2022-10-14 14:07 ` Ulf Hansson
@ 2022-10-19 18:16   ` Patrick Thompson
  0 siblings, 0 replies; 4+ messages in thread
From: Patrick Thompson @ 2022-10-19 18:16 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Linux MMC Development, Sangwhan Moon, Adrian Hunter, linux-kernel

Thank you Ulf,

Are there any actions that I need to take?

Best,
Patrick

On Fri, Oct 14, 2022 at 10:08 AM Ulf Hansson <ulf.hansson@linaro.org> wrote:
>
> On Thu, 13 Oct 2022 at 23:00, Patrick Thompson <ptf@google.com> wrote:
> >
> > Enhanced Strobe (ES) does not work correctly on the ASUS 1100 series of
> > devices. Jasper Lake eMMCs (pci_id 8086:4dc4) are supposed to support
> > ES. There are also two system families under the series, thus this is
> > being scoped to the ASUS BIOS.
> >
> > The failing ES prevents the installer from writing to disk. Falling back
> > to HS400 without ES fixes the issue.
> >
> > Signed-off-by: Patrick Thompson <ptf@google.com>
> >
> > Fixes: 315e3bd7ac19 ("mmc: sdhci-pci: Add support for Intel JSL")
>
> Applied for fixes and by adding a stable tag, thanks!
>
> Kind regards
> Uffe
>
>
> >
> > ---
> >
> > Changes in v3:
> > * Remove redundant MMC_CAP2_HS400 selection
> >
> > Changes in v2:
> > * Only disable ES instead of CQE in its entirety.
> > * Target Jasper Lake (JSL)
> > * Target ASUS BIOS instead of specific system family
> >
> >  drivers/mmc/host/sdhci-pci-core.c | 14 +++++++++++---
> >  1 file changed, 11 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
> > index 169b84761041..34ea1acbb3cc 100644
> > --- a/drivers/mmc/host/sdhci-pci-core.c
> > +++ b/drivers/mmc/host/sdhci-pci-core.c
> > @@ -914,6 +914,12 @@ static bool glk_broken_cqhci(struct sdhci_pci_slot *slot)
> >                 dmi_match(DMI_SYS_VENDOR, "IRBIS"));
> >  }
> >
> > +static bool jsl_broken_hs400es(struct sdhci_pci_slot *slot)
> > +{
> > +       return slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_JSL_EMMC &&
> > +                       dmi_match(DMI_BIOS_VENDOR, "ASUSTeK COMPUTER INC.");
> > +}
> > +
> >  static int glk_emmc_probe_slot(struct sdhci_pci_slot *slot)
> >  {
> >         int ret = byt_emmc_probe_slot(slot);
> > @@ -922,9 +928,11 @@ static int glk_emmc_probe_slot(struct sdhci_pci_slot *slot)
> >                 slot->host->mmc->caps2 |= MMC_CAP2_CQE;
> >
> >         if (slot->chip->pdev->device != PCI_DEVICE_ID_INTEL_GLK_EMMC) {
> > -               slot->host->mmc->caps2 |= MMC_CAP2_HS400_ES;
> > -               slot->host->mmc_host_ops.hs400_enhanced_strobe =
> > -                                               intel_hs400_enhanced_strobe;
> > +               if (!jsl_broken_hs400es(slot)) {
> > +                       slot->host->mmc->caps2 |= MMC_CAP2_HS400_ES;
> > +                       slot->host->mmc_host_ops.hs400_enhanced_strobe =
> > +                                                       intel_hs400_enhanced_strobe;
> > +               }
> >                 slot->host->mmc->caps2 |= MMC_CAP2_CQE_DCMD;
> >         }
> >
> > --
> > 2.38.0.413.g74048e4d9e-goog
> >

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-10-19 18:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-13 21:00 [PATCH v3] mmc: sdhci-pci-core: Disable ES for ASUS BIOS on Jasper Lake Patrick Thompson
2022-10-14  5:33 ` Adrian Hunter
2022-10-14 14:07 ` Ulf Hansson
2022-10-19 18:16   ` Patrick Thompson

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).