public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] mmc: Lenovo N22 Braswell SD slot fixes
@ 2026-03-16 21:23 Nelson Johnson
  2026-03-16 21:23 ` [PATCH 1/3] mmc: sdhci-pci: disable aggressive runtime PM for Braswell SD on Lenovo N22 Nelson Johnson
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Nelson Johnson @ 2026-03-16 21:23 UTC (permalink / raw)
  To: linux-mmc; +Cc: adrian.hunter, ulf.hansson, linux-kernel, Nelson Johnson

This series fixes the long-broken SD slot on the Lenovo N22
(Model 80S6 / MTM 80S60001US) with Intel Celeron N3050 Braswell
hardware running Debian 13 and Linux 6.19.6.

The regression goes back to kernel 4.14. The Braswell SD controller
(PCI ID 8086:2296) is exposed by firmware through both PCI
0000:00:12.0 and ACPI INT33BB:00 at \_SB_.PCI0.SDHB.

On this machine the newer runtime PM and card-detect handling no
longer works reliably, and the ACPI path permanently defers because
its dependency never becomes available. That leaves the slot unusable
unless the controller is forced back onto the working PCI path with
machine-specific quirks.

This series does three things, all scoped to the Lenovo N22 DMI
match:

1. Disable the aggressive runtime PM/card-detect wake path for the
   Braswell PCI SD controller.
2. Bypass the broken firmware card-detect GPIO path and use polling
   for card insertion detection.
3. Prevent the competing ACPI INT33BB:00 node from binding on this
   machine so the PCI SDHCI driver can own the controller.

With these changes applied, the SD slot binds through sdhci-pci and
detects and mounts SD cards again on the Lenovo N22.

Tested on:
  Lenovo N22 Model 80S6 / MTM 80S60001US
  Intel Celeron N3050 (Braswell)
  Debian 13
  Linux 6.19.6

Nelson Johnson (3):
  mmc: sdhci-pci: disable aggressive runtime PM for Braswell SD on
    Lenovo N22
  mmc: sdhci-pci: force polling card detect for Braswell SD on Lenovo
    N22
  mmc: sdhci-acpi: exclude INT33BB:00 from ACPI binding on Lenovo N22

 drivers/mmc/host/sdhci-acpi.c     | 10 ++++++++++
 drivers/mmc/host/sdhci-pci-core.c | 33 ++++++++++++++++++++++++++-----
 2 files changed, 38 insertions(+), 5 deletions(-)

-- 
2.47.3

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

* [PATCH 1/3] mmc: sdhci-pci: disable aggressive runtime PM for Braswell SD on Lenovo N22
  2026-03-16 21:23 [PATCH 0/3] mmc: Lenovo N22 Braswell SD slot fixes Nelson Johnson
@ 2026-03-16 21:23 ` Nelson Johnson
  2026-03-20 17:58   ` Andy Shevchenko
  2026-03-16 21:23 ` [PATCH 2/3] mmc: sdhci-pci: force polling card detect " Nelson Johnson
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 14+ messages in thread
From: Nelson Johnson @ 2026-03-16 21:23 UTC (permalink / raw)
  To: linux-mmc; +Cc: adrian.hunter, ulf.hansson, linux-kernel, Nelson Johnson

Lenovo N22 systems with the Braswell SD controller (PCI ID 8086:2296) regress on kernels newer than 4.9. On this machine the SD slot is exposed through both PCI and ACPI firmware nodes, and enabling the newer aggressive runtime PM/card-detect wake path causes the controller to stop behaving like the older working configuration.

Keep the Lenovo N22 on the pre-4.14 behavior by skipping MMC_CAP_AGGRESSIVE_PM and MMC_CAP_CD_WAKE for the 8086:2296 slot on this DMI match, and disable runtime PM for that host.

This preserves the rest of the Braswell/Atom handling while restoring the power-management behavior that allows the slot to function on the Lenovo N22.

Fixes: 6cf4156c0988 ("mmc: sdhci-pci: Enable card detect wake for Intel BYT-related SD controllers")
Signed-off-by: Nelson Johnson <nzjfr547@gmail.com>
---
 drivers/mmc/host/sdhci-pci-core.c | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
index 47a0a7388..4b3c61609 100644
--- a/drivers/mmc/host/sdhci-pci-core.c
+++ b/drivers/mmc/host/sdhci-pci-core.c
@@ -923,6 +923,13 @@ static bool jsl_broken_hs400es(struct sdhci_pci_slot *slot)
 			dmi_match(DMI_BIOS_VENDOR, "ASUSTeK COMPUTER INC.");
 }
 
+static bool sdhci_pci_is_lenovo_n22_bsw_sd(struct sdhci_pci_slot *slot)
+{
+	return slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_BSW_SD &&
+	       dmi_match(DMI_SYS_VENDOR, "LENOVO") &&
+	       dmi_match(DMI_BOARD_NAME, "N22");
+}
+
 static int glk_emmc_probe_slot(struct sdhci_pci_slot *slot)
 {
 	int ret = byt_emmc_probe_slot(slot);
@@ -1120,9 +1127,13 @@ static void byt_needs_pwr_off(struct sdhci_pci_slot *slot)
 
 static int byt_sd_probe_slot(struct sdhci_pci_slot *slot)
 {
+	bool runtime_pm_ok = !sdhci_pci_is_lenovo_n22_bsw_sd(slot);
+
 	byt_probe_slot(slot);
-	slot->host->mmc->caps |= MMC_CAP_WAIT_WHILE_BUSY |
-				 MMC_CAP_AGGRESSIVE_PM | MMC_CAP_CD_WAKE;
+	slot->host->mmc->caps |= MMC_CAP_WAIT_WHILE_BUSY;
+	if (runtime_pm_ok)
+		slot->host->mmc->caps |= MMC_CAP_AGGRESSIVE_PM |
+					 MMC_CAP_CD_WAKE;
 	slot->cd_idx = 0;
 	slot->cd_override_level = true;
 	if (slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_BXT_SD ||
@@ -1135,7 +1146,10 @@ static int byt_sd_probe_slot(struct sdhci_pci_slot *slot)
 	    slot->chip->pdev->subsystem_device == PCI_SUBDEVICE_ID_NI_78E3)
 		slot->host->mmc->caps2 |= MMC_CAP2_AVOID_3_3V;
 
-	byt_needs_pwr_off(slot);
+	if (runtime_pm_ok)
+		byt_needs_pwr_off(slot);
+	else
+		slot->chip->allow_runtime_pm = false;
 
 	return 0;
 }
-- 
2.47.3


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

* [PATCH 2/3] mmc: sdhci-pci: force polling card detect for Braswell SD on Lenovo N22
  2026-03-16 21:23 [PATCH 0/3] mmc: Lenovo N22 Braswell SD slot fixes Nelson Johnson
  2026-03-16 21:23 ` [PATCH 1/3] mmc: sdhci-pci: disable aggressive runtime PM for Braswell SD on Lenovo N22 Nelson Johnson
@ 2026-03-16 21:23 ` Nelson Johnson
  2026-03-16 21:23 ` [PATCH 3/3] mmc: sdhci-acpi: exclude INT33BB:00 from ACPI binding " Nelson Johnson
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 14+ messages in thread
From: Nelson Johnson @ 2026-03-16 21:23 UTC (permalink / raw)
  To: linux-mmc; +Cc: adrian.hunter, ulf.hansson, linux-kernel, Nelson Johnson

The Lenovo N22 uses the Braswell SD controller at PCI ID 8086:2296, but its firmware exposes a broken card-detect path. On modern kernels the slot repeatedly fails to come up because the normal GPIO card-detect path never becomes usable on this machine.

Force the Lenovo N22 to skip the firmware GPIO card-detect path for the Braswell SD slot and use polling instead. This keeps the quirk tightly scoped to the affected DMI match while leaving the default behavior unchanged on other Braswell systems.

With the polling fallback in place, the PCI SDHCI path can detect card insertion reliably again on the Lenovo N22.

Fixes: 6cf4156c0988 ("mmc: sdhci-pci: Enable card detect wake for Intel BYT-related SD controllers")
Signed-off-by: Nelson Johnson <nzjfr547@gmail.com>
---
 drivers/mmc/host/sdhci-pci-core.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
index 4b3c61609..05ab17e72 100644
--- a/drivers/mmc/host/sdhci-pci-core.c
+++ b/drivers/mmc/host/sdhci-pci-core.c
@@ -1134,8 +1134,17 @@ static int byt_sd_probe_slot(struct sdhci_pci_slot *slot)
 	if (runtime_pm_ok)
 		slot->host->mmc->caps |= MMC_CAP_AGGRESSIVE_PM |
 					 MMC_CAP_CD_WAKE;
-	slot->cd_idx = 0;
-	slot->cd_override_level = true;
+	if (!runtime_pm_ok) {
+		/*
+		 * Lenovo N22 Braswell card-detect bypass: ignore the broken
+		 * firmware GPIO path and poll the slot instead.
+		 */
+		slot->cd_idx = -1;
+		slot->host->mmc->caps |= MMC_CAP_NEEDS_POLL;
+	} else {
+		slot->cd_idx = 0;
+		slot->cd_override_level = true;
+	}
 	if (slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_BXT_SD ||
 	    slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_BXTM_SD ||
 	    slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_APL_SD ||
-- 
2.47.3


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

* [PATCH 3/3] mmc: sdhci-acpi: exclude INT33BB:00 from ACPI binding on Lenovo N22
  2026-03-16 21:23 [PATCH 0/3] mmc: Lenovo N22 Braswell SD slot fixes Nelson Johnson
  2026-03-16 21:23 ` [PATCH 1/3] mmc: sdhci-pci: disable aggressive runtime PM for Braswell SD on Lenovo N22 Nelson Johnson
  2026-03-16 21:23 ` [PATCH 2/3] mmc: sdhci-pci: force polling card detect " Nelson Johnson
@ 2026-03-16 21:23 ` Nelson Johnson
  2026-03-20 18:02   ` Andy Shevchenko
  2026-03-20 13:27 ` [PATCH 0/3] mmc: Lenovo N22 Braswell SD slot fixes Adrian Hunter
  2026-03-20 17:49 ` Andy Shevchenko
  4 siblings, 1 reply; 14+ messages in thread
From: Nelson Johnson @ 2026-03-16 21:23 UTC (permalink / raw)
  To: linux-mmc; +Cc: adrian.hunter, ulf.hansson, linux-kernel, Nelson Johnson

On the Lenovo N22, the firmware exposes the Braswell SD controller through both PCI 0000:00:12.0 and ACPI INT33BB:00. The ACPI path for INT33BB:00 never finishes probing on this machine and repeatedly defers, which leaves the slot in the broken ACPI path instead of letting the working PCI path own the controller.

Return -ENODEV early for INT33BB:00 on the Lenovo N22 so that sdhci-acpi does not bind this machine-specific firmware node. That leaves the controller to the PCI SDHCI driver, which is the path that works once the N22-specific runtime PM and card-detect quirks are applied.

Scope the exclusion to the Lenovo N22 DMI match so other INT33BB systems continue to use the normal ACPI handling.

Fixes: 6cf4156c0988 ("mmc: sdhci-pci: Enable card detect wake for Intel BYT-related SD controllers")
Signed-off-by: Nelson Johnson <nzjfr547@gmail.com>
---
 drivers/mmc/host/sdhci-acpi.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c
index 84c705460..3badf1c87 100644
--- a/drivers/mmc/host/sdhci-acpi.c
+++ b/drivers/mmc/host/sdhci-acpi.c
@@ -814,6 +814,12 @@ static const struct sdhci_acpi_slot *sdhci_acpi_get_slot(struct acpi_device *ade
 	return NULL;
 }
 
+static bool sdhci_acpi_is_lenovo_n22(void)
+{
+	return dmi_match(DMI_SYS_VENDOR, "LENOVO") &&
+	       dmi_match(DMI_BOARD_NAME, "N22");
+}
+
 static int sdhci_acpi_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
@@ -834,6 +840,10 @@ static int sdhci_acpi_probe(struct platform_device *pdev)
 	if (id)
 		quirks = (long)id->driver_data;
 
+	if (sdhci_acpi_is_lenovo_n22() &&
+	    acpi_dev_hid_uid_match(device, "INT33BB", "2"))
+		return -ENODEV;
+
 	slot = sdhci_acpi_get_slot(device);
 
 	/* Power on the SDHCI controller and its children */
-- 
2.47.3


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

* Re: [PATCH 0/3] mmc: Lenovo N22 Braswell SD slot fixes
  2026-03-16 21:23 [PATCH 0/3] mmc: Lenovo N22 Braswell SD slot fixes Nelson Johnson
                   ` (2 preceding siblings ...)
  2026-03-16 21:23 ` [PATCH 3/3] mmc: sdhci-acpi: exclude INT33BB:00 from ACPI binding " Nelson Johnson
@ 2026-03-20 13:27 ` Adrian Hunter
  2026-03-20 16:47   ` Nelson Johnson
  2026-03-20 17:49 ` Andy Shevchenko
  4 siblings, 1 reply; 14+ messages in thread
From: Adrian Hunter @ 2026-03-20 13:27 UTC (permalink / raw)
  To: Nelson Johnson; +Cc: ulf.hansson, linux-kernel, linux-mmc, Shevchenko, Andriy

On 16/03/2026 23:23, Nelson Johnson wrote:
> This series fixes the long-broken SD slot on the Lenovo N22
> (Model 80S6 / MTM 80S60001US) with Intel Celeron N3050 Braswell
> hardware running Debian 13 and Linux 6.19.6.
> 
> The regression goes back to kernel 4.14. The Braswell SD controller
> (PCI ID 8086:2296) is exposed by firmware through both PCI
> 0000:00:12.0 and ACPI INT33BB:00 at \_SB_.PCI0.SDHB.
> 
> On this machine the newer runtime PM and card-detect handling no
> longer works reliably, and the ACPI path permanently defers because
> its dependency never becomes available. That leaves the slot unusable
> unless the controller is forced back onto the working PCI path with
> machine-specific quirks.
> 
> This series does three things, all scoped to the Lenovo N22 DMI
> match:
> 
> 1. Disable the aggressive runtime PM/card-detect wake path for the
>    Braswell PCI SD controller.
> 2. Bypass the broken firmware card-detect GPIO path and use polling
>    for card insertion detection.
> 3. Prevent the competing ACPI INT33BB:00 node from binding on this
>    machine so the PCI SDHCI driver can own the controller.

These changes seem more like they work around the problem rather
than fix the problem, but you say it worked OK in v4.14?  I see also
mention of v4.9 in patch 1?  When it was working, was it using the ACPI
driver or the PCI driver?

In patch 3, you say the SDHCI APCI driver repeatedly defers.  Is that
because it is waiting for the GPIO driver for the Card Detect GPIO?

Note Lenovo N22 seems to date back to 2017.  Is it really worth
spending time on something that old, especially as no one seems
to have worried about it before?


> 
> With these changes applied, the SD slot binds through sdhci-pci and
> detects and mounts SD cards again on the Lenovo N22.
> 
> Tested on:
>   Lenovo N22 Model 80S6 / MTM 80S60001US
>   Intel Celeron N3050 (Braswell)
>   Debian 13
>   Linux 6.19.6
> 
> Nelson Johnson (3):
>   mmc: sdhci-pci: disable aggressive runtime PM for Braswell SD on
>     Lenovo N22
>   mmc: sdhci-pci: force polling card detect for Braswell SD on Lenovo
>     N22
>   mmc: sdhci-acpi: exclude INT33BB:00 from ACPI binding on Lenovo N22
> 
>  drivers/mmc/host/sdhci-acpi.c     | 10 ++++++++++
>  drivers/mmc/host/sdhci-pci-core.c | 33 ++++++++++++++++++++++++++-----
>  2 files changed, 38 insertions(+), 5 deletions(-)
> 


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

* Re: [PATCH 0/3] mmc: Lenovo N22 Braswell SD slot fixes
  2026-03-20 13:27 ` [PATCH 0/3] mmc: Lenovo N22 Braswell SD slot fixes Adrian Hunter
@ 2026-03-20 16:47   ` Nelson Johnson
  2026-03-20 17:55     ` Andy Shevchenko
  2026-03-24 15:05     ` Adrian Hunter
  0 siblings, 2 replies; 14+ messages in thread
From: Nelson Johnson @ 2026-03-20 16:47 UTC (permalink / raw)
  To: adrian.hunter; +Cc: ulf.hansson, linux-kernel, linux-mmc, andriy.shevchenko

On Fri, Mar 20, 2026 at 8:27 AM Adrian Hunter wrote:
> These changes seem more like they work around the problem rather
> than fix the problem, but you say it worked OK in v4.14? I see also
> mention of v4.9 in patch 1? When it was working, was it using the ACPI
> driver or the PCI driver?

You are right that this series is a workaround for a firmware-specific
problem rather than a generic root-cause fix.

My confirmed working baseline is v4.9, and on that kernel the
controller was owned by sdhci-pci, not sdhci-acpi. The INT33BB:00
ACPI node was present in firmware but did not prevent the PCI path
from working. I should have been more precise in the cover letter.
What I can state from testing is:

  - v4.9: slot works via sdhci-pci
  - current kernels: slot is unusable
  - current kernels with this series applied: slot works again via sdhci-pci

> In patch 3, you say the SDHCI ACPI driver repeatedly defers. Is that
> because it is waiting for the GPIO driver for the Card Detect GPIO?

Yes. On this machine INT33BB:00 defers waiting for the card-detect
GPIO dependency, and that dependency never becomes available. In the
broken state the ACPI path does not successfully probe and the slot
remains unusable. Excluding INT33BB:00 on this DMI match allows
sdhci-pci to own 0000:00:12.0 and restores card detection.

I am not aware of an existing generic ownership-arbitration mechanism
between sdhci-acpi and sdhci-pci for this dual-enumerated firmware
layout, so I chose the narrowest fix available: a DMI-scoped exclusion
on the affected machine only. That approach is consistent with how the
subsystem has handled similar firmware defects elsewhere. sdhci-acpi.c
already carries a maintained quirk table covering the Lenovo Miix 320,
Acer Aspire Switch 10, Lenovo Yoga Tablet 2 Pro, Toshiba Encore 2, and
ASUS T100TA, all firmware defects fixed with DMI scope and accepted
with stable tags. sdhci-pci-core.c follows the same pattern, as
jsl_broken_hs400es() immediately above the new helper demonstrates.

> Note Lenovo N22 seems to date back to 2017. Is it really worth
> spending time on something that old, especially as no one seems
> to have worried about it before?

My argument for upstream is mainly that the quirk is small and
low-risk, and that PCI ID 8086:2296 is part of the wider Braswell SD
controller family rather than unique to this one machine. Although the
Lenovo N22 is an older platform, Braswell systems remain in active
secondary use. The Lenovo IdeaPad 100S-14IBR carries the same
controller and has a documented bug report showing sdhci-pci not
binding on kernel 4.10 after working on 4.8, the same symptom pattern.
The commit documents the failure mode, the correct driver ownership
decision, and the workaround approach in a place where anyone dealing
with a similar Braswell platform can find and reference it.

That said, I defer to your judgment on whether this serves value to
the wider community. I am happy to carry it as a local patch if you
feel it does not belong upstream.

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

* Re: [PATCH 0/3] mmc: Lenovo N22 Braswell SD slot fixes
  2026-03-16 21:23 [PATCH 0/3] mmc: Lenovo N22 Braswell SD slot fixes Nelson Johnson
                   ` (3 preceding siblings ...)
  2026-03-20 13:27 ` [PATCH 0/3] mmc: Lenovo N22 Braswell SD slot fixes Adrian Hunter
@ 2026-03-20 17:49 ` Andy Shevchenko
  4 siblings, 0 replies; 14+ messages in thread
From: Andy Shevchenko @ 2026-03-20 17:49 UTC (permalink / raw)
  To: Nelson Johnson, Hans de Goede
  Cc: linux-mmc, adrian.hunter, ulf.hansson, linux-kernel

+Cc: Hans on FYI basis, but your ideas, comments, et cetera are welcome!

On Mon, Mar 16, 2026 at 04:23:22PM -0500, Nelson Johnson wrote:
> This series fixes the long-broken SD slot on the Lenovo N22
> (Model 80S6 / MTM 80S60001US) with Intel Celeron N3050 Braswell
> hardware running Debian 13 and Linux 6.19.6.
> 
> The regression goes back to kernel 4.14. The Braswell SD controller
> (PCI ID 8086:2296) is exposed by firmware through both PCI
> 0000:00:12.0 and ACPI INT33BB:00 at \_SB_.PCI0.SDHB.
> 
> On this machine the newer runtime PM and card-detect handling no
> longer works reliably, and the ACPI path permanently defers because
> its dependency never becomes available. That leaves the slot unusable
> unless the controller is forced back onto the working PCI path with
> machine-specific quirks.
> 
> This series does three things, all scoped to the Lenovo N22 DMI
> match:
> 
> 1. Disable the aggressive runtime PM/card-detect wake path for the
>    Braswell PCI SD controller.
> 2. Bypass the broken firmware card-detect GPIO path and use polling
>    for card insertion detection.
> 3. Prevent the competing ACPI INT33BB:00 node from binding on this
>    machine so the PCI SDHCI driver can own the controller.
> 
> With these changes applied, the SD slot binds through sdhci-pci and
> detects and mounts SD cards again on the Lenovo N22.

> Tested on:
>   Lenovo N22 Model 80S6 / MTM 80S60001US
>   Intel Celeron N3050 (Braswell)
>   Debian 13
>   Linux 6.19.6

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH 0/3] mmc: Lenovo N22 Braswell SD slot fixes
  2026-03-20 16:47   ` Nelson Johnson
@ 2026-03-20 17:55     ` Andy Shevchenko
  2026-03-20 18:08       ` Andy Shevchenko
  2026-03-24 15:05     ` Adrian Hunter
  1 sibling, 1 reply; 14+ messages in thread
From: Andy Shevchenko @ 2026-03-20 17:55 UTC (permalink / raw)
  To: Nelson Johnson, Hans de Goede
  Cc: adrian.hunter, ulf.hansson, linux-kernel, linux-mmc

+Cc: Hans

On Fri, Mar 20, 2026 at 11:47:53AM -0500, Nelson Johnson wrote:
> On Fri, Mar 20, 2026 at 8:27 AM Adrian Hunter wrote:
> > These changes seem more like they work around the problem rather
> > than fix the problem, but you say it worked OK in v4.14? I see also
> > mention of v4.9 in patch 1? When it was working, was it using the ACPI
> > driver or the PCI driver?
> 
> You are right that this series is a workaround for a firmware-specific
> problem rather than a generic root-cause fix.
> 
> My confirmed working baseline is v4.9, and on that kernel the
> controller was owned by sdhci-pci, not sdhci-acpi. The INT33BB:00
> ACPI node was present in firmware but did not prevent the PCI path
> from working. I should have been more precise in the cover letter.
> What I can state from testing is:
> 
>   - v4.9: slot works via sdhci-pci
>   - current kernels: slot is unusable
>   - current kernels with this series applied: slot works again via sdhci-pci
> 
> > In patch 3, you say the SDHCI ACPI driver repeatedly defers. Is that
> > because it is waiting for the GPIO driver for the Card Detect GPIO?
> 
> Yes. On this machine INT33BB:00 defers waiting for the card-detect
> GPIO dependency, and that dependency never becomes available. In the
> broken state the ACPI path does not successfully probe and the slot
> remains unusable. Excluding INT33BB:00 on this DMI match allows
> sdhci-pci to own 0000:00:12.0 and restores card detection.
> 
> I am not aware of an existing generic ownership-arbitration mechanism
> between sdhci-acpi and sdhci-pci for this dual-enumerated firmware
> layout, so I chose the narrowest fix available: a DMI-scoped exclusion
> on the affected machine only. That approach is consistent with how the
> subsystem has handled similar firmware defects elsewhere. sdhci-acpi.c
> already carries a maintained quirk table covering the Lenovo Miix 320,
> Acer Aspire Switch 10, Lenovo Yoga Tablet 2 Pro, Toshiba Encore 2, and
> ASUS T100TA, all firmware defects fixed with DMI scope and accepted
> with stable tags. sdhci-pci-core.c follows the same pattern, as
> jsl_broken_hs400es() immediately above the new helper demonstrates.
> 
> > Note Lenovo N22 seems to date back to 2017. Is it really worth
> > spending time on something that old, especially as no one seems
> > to have worried about it before?
> 
> My argument for upstream is mainly that the quirk is small and
> low-risk, and that PCI ID 8086:2296 is part of the wider Braswell SD
> controller family rather than unique to this one machine. Although the
> Lenovo N22 is an older platform, Braswell systems remain in active
> secondary use. The Lenovo IdeaPad 100S-14IBR carries the same
> controller and has a documented bug report showing sdhci-pci not
> binding on kernel 4.10 after working on 4.8, the same symptom pattern.
> The commit documents the failure mode, the correct driver ownership
> decision, and the workaround approach in a place where anyone dealing
> with a similar Braswell platform can find and reference it.
> 
> That said, I defer to your judgment on whether this serves value to
> the wider community. I am happy to carry it as a local patch if you
> feel it does not belong upstream.

I believe Adrian added me to the Cc list to hear my opinion as I heard
about Bay Trail and similar machines more often than him nowadays. Yet
I am not working directly with them much, Hans does (or at least recently
did a lot). Nevertheless, looking briefly into the series and this message
I kinda tend to agree to make patches go in. We have tons of Bay Trail
machines from recent years and they are still supported well enough by
vanilla kernel (thanks to Hans).

TL;DR: I can look a bit closer and review the patches.

P.S.
I have installed a home router last year based on Bay Trail :-)


-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH 1/3] mmc: sdhci-pci: disable aggressive runtime PM for Braswell SD on Lenovo N22
  2026-03-16 21:23 ` [PATCH 1/3] mmc: sdhci-pci: disable aggressive runtime PM for Braswell SD on Lenovo N22 Nelson Johnson
@ 2026-03-20 17:58   ` Andy Shevchenko
  0 siblings, 0 replies; 14+ messages in thread
From: Andy Shevchenko @ 2026-03-20 17:58 UTC (permalink / raw)
  To: Nelson Johnson; +Cc: linux-mmc, adrian.hunter, ulf.hansson, linux-kernel

On Mon, Mar 16, 2026 at 04:23:23PM -0500, Nelson Johnson wrote:
> Lenovo N22 systems with the Braswell SD controller (PCI ID 8086:2296) regress on kernels newer than 4.9.

v4.9

> On this machine the SD slot is exposed through both PCI and ACPI firmware nodes, and enabling the newer aggressive runtime PM/card-detect wake path causes the controller to stop behaving like the older working configuration.
> 
> Keep the Lenovo N22 on the pre-4.14 behavior by skipping MMC_CAP_AGGRESSIVE_PM and MMC_CAP_CD_WAKE for the 8086:2296 slot on this DMI match, and disable runtime PM for that host.
> 
> This preserves the rest of the Braswell/Atom handling while restoring the power-management behavior that allows the slot to function on the Lenovo N22.

When creating the commit message you need to wrap the lines around ~72
characters per line.

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH 3/3] mmc: sdhci-acpi: exclude INT33BB:00 from ACPI binding on Lenovo N22
  2026-03-16 21:23 ` [PATCH 3/3] mmc: sdhci-acpi: exclude INT33BB:00 from ACPI binding " Nelson Johnson
@ 2026-03-20 18:02   ` Andy Shevchenko
  0 siblings, 0 replies; 14+ messages in thread
From: Andy Shevchenko @ 2026-03-20 18:02 UTC (permalink / raw)
  To: Nelson Johnson; +Cc: linux-mmc, adrian.hunter, ulf.hansson, linux-kernel

On Mon, Mar 16, 2026 at 04:23:25PM -0500, Nelson Johnson wrote:
> On the Lenovo N22, the firmware exposes the Braswell SD controller through both PCI 0000:00:12.0 and ACPI INT33BB:00. The ACPI path for INT33BB:00 never finishes probing on this machine and repeatedly defers, which leaves the slot in the broken ACPI path instead of letting the working PCI path own the controller.
> 
> Return -ENODEV early for INT33BB:00 on the Lenovo N22 so that sdhci-acpi does not bind this machine-specific firmware node. That leaves the controller to the PCI SDHCI driver, which is the path that works once the N22-specific runtime PM and card-detect quirks are applied.
> 
> Scope the exclusion to the Lenovo N22 DMI match so other INT33BB systems continue to use the normal ACPI handling.

This should be done somewhere in drivers/acpi/x86/lpss.c I believe. That's the
driver that responsible for ACPI enumeration of LPSS devices on Braswell
machines.



-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH 0/3] mmc: Lenovo N22 Braswell SD slot fixes
  2026-03-20 17:55     ` Andy Shevchenko
@ 2026-03-20 18:08       ` Andy Shevchenko
  2026-03-20 23:07         ` Nelson Johnson
  0 siblings, 1 reply; 14+ messages in thread
From: Andy Shevchenko @ 2026-03-20 18:08 UTC (permalink / raw)
  To: Nelson Johnson, Hans de Goede
  Cc: adrian.hunter, ulf.hansson, linux-kernel, linux-mmc

On Fri, Mar 20, 2026 at 06:55:04PM +0100, Andy Shevchenko wrote:
> On Fri, Mar 20, 2026 at 11:47:53AM -0500, Nelson Johnson wrote:
> > On Fri, Mar 20, 2026 at 8:27 AM Adrian Hunter wrote:

...

> I kinda tend to agree to make patches go in. We have tons of Bay Trail

(Same applicable to Braswell and Cherry Trail (Cherry View) devices.)

> machines from recent years and they are still supported well enough by
> vanilla kernel (thanks to Hans).
> 
> TL;DR: I can look a bit closer and review the patches.

Okay, after looking closer at them I think it feels like a hack approach
(or one that is done in a wrong place). If you read my comment on patch 3
the ACPI enumeration and PM domain is handled there. When device is present
in both PCI and ACPI in accordance with ACPI specification, if I am not
mistaken, it should extend the existing PCI capabilities. I.o.w. if any
contradictions with PCI resources or so the PCI should be taken as correct
ones.

Cam you share ACPI DSDT excerpt (from DSDT table of firmware, you can get it by
copying file from /sys/firmware/acpi/tables/DSDT and decode it with `iasl -d
DSDT`) and output of `lspci -vv -n -s $SDHCI_SLOT`? Because it might be that
the problem should be solved just by providing better fixes to GPIO detection
or so.

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH 0/3] mmc: Lenovo N22 Braswell SD slot fixes
  2026-03-20 18:08       ` Andy Shevchenko
@ 2026-03-20 23:07         ` Nelson Johnson
  2026-03-21 11:07           ` Hans de Goede
  0 siblings, 1 reply; 14+ messages in thread
From: Nelson Johnson @ 2026-03-20 23:07 UTC (permalink / raw)
  To: andriy.shevchenko, hansg
  Cc: adrian.hunter, ulf.hansson, linux-kernel, linux-mmc

On Fri, Mar 20, 2026 at 07:08:41PM +0100, Andy Shevchenko wrote:
> Can you share ACPI DSDT excerpt (from DSDT table of firmware, you can
> get it by copying file from /sys/firmware/acpi/tables/DSDT and decode
> it with `iasl -d DSDT`) and output of `lspci -vv -n -s $SDHCI_SLOT`?
> Because it might be that the problem should be solved just by providing
> better fixes to GPIO detection or so.

Here is the requested data collected from the N22 on a vanilla
6.19.6+deb14+1-amd64 kernel with no patches applied.

DSDT INT33BB section (decoded from /sys/firmware/acpi/tables/DSDT):

    Name (_HID, "INT33BB")
    Name (_CID, "PNP0D40")
    Name (_DDN, "Intel(R) SDIO Controller - 80862295")
    Name (_UID, 0x02)
    Name (_HRV, 0x02)
    Name (_DEP, Package (0x01)
    {
        GPO1
    })
    Name (ABUF, ResourceTemplate ()
    {
        Memory32Fixed (ReadWrite, 0x00000000, 0x00001000, _Y04)
        Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive) { 0x0000002E }
        GpioIo (Exclusive, PullNone, 0x0000, 0x0000, IoRestrictionOutputOnly,
            "\\_SB.GPO1", 0x00, ResourceConsumer, ,)
            {
                0x0005
            }
    })
    Method (_PS0, 0, NotSerialized)
    {
        PSAT &= 0xFFFFFFFC
        PSAT |= Zero
        If ((PSTS == Zero))
        {
            If ((^^^GPO1.AVBL == One))
            {
                ^^^GPO1.CWLE = One
            }
            PSTS = One
        }
    }
    Method (_PS3, 0, NotSerialized)
    {
        PSAT |= 0x03
        PSAT |= Zero
    }

Two things stand out in this description. First, the _DDN names the
device as "Intel(R) SDIO Controller - 80862295" rather than an SD
slot, and _UID is 0x02; in current sdhci-acpi.c, INT33BB UID 2 maps
to the SDIO slot profile rather than the removable SD profile. Second,
the GpioIo descriptor for pin 5 on GPO1 is IoRestrictionOutputOnly
with PullNone. My reading of the AML is that this looks more like an
enable/control line than a card-detect input, but that is an inference
from the firmware description rather than something I can prove from
the AML alone.

lspci -vv -n -s 0000:00:12.0 on vanilla kernel:

    00:12.0 0805: 8086:2296 (rev 21) (prog-if 01)
        Subsystem: 17aa:3807
        Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop-
                 ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast
                >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Interrupt: pin A routed to IRQ 18
        Region 0: Memory at 91315000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: [80] Power Management version 3
            Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
                   PME(D0+,D1-,D2-,D3hot+,D3cold-)
            Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
        Kernel modules: sdhci_pci

Note BusMaster- on the vanilla kernel. With the patch series applied
BusMaster+ and Kernel driver in use: sdhci-pci.

Vanilla dmesg for SD/MMC:

    [    3.142590] mmc0: SDHCI controller on ACPI [INT33BB:00] using ADMA
    [    3.155518] mmc1: SDHCI controller on ACPI [80860F14:00] using ADMA
    [    3.356405] mmc0: Failed to initialize a non-removable card
    [    3.358473] sdhci-pci 0000:00:12.0: SDHCI controller found [8086:2296] (rev 21)
    [    3.397615] sdhci-pci 0000:00:12.0: SDHCI controller found [8086:2296] (rev 21)
    ... (repeated approximately 30 times over 30 seconds)
    [   30.066835] sdhci-pci 0000:00:12.0: SDHCI controller found [8086:2296] (rev 21)

The observed sequence on the vanilla kernel is:

  - sdhci-acpi binds INT33BB:00 and creates mmc0
  - mmc0 then fails with "Failed to initialize a non-removable card"
  - sdhci-pci repeatedly reports "SDHCI controller found [8086:2296]"
  - lspci -vv shows BusMaster- and no "Kernel driver in use" line
    for 0000:00:12.0 throughout

That seems consistent with the ACPI path binding the
firmware-described instance while the PCI path never reaches a
usable bound state.

Given the output-only GPIO descriptor and the current non-removable
SDIO mapping for INT33BB UID 2, does this point to a fixable ACPI /
GPIO-enumeration issue, or do you think machine-scoped exclusion of
the ACPI node is still the right direction for this firmware? I am
happy to test any suggested patch or approach on the hardware.

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

* Re: [PATCH 0/3] mmc: Lenovo N22 Braswell SD slot fixes
  2026-03-20 23:07         ` Nelson Johnson
@ 2026-03-21 11:07           ` Hans de Goede
  0 siblings, 0 replies; 14+ messages in thread
From: Hans de Goede @ 2026-03-21 11:07 UTC (permalink / raw)
  To: Nelson Johnson, andriy.shevchenko
  Cc: adrian.hunter, ulf.hansson, linux-kernel, linux-mmc

Hi,

On 21-Mar-26 00:07, Nelson Johnson wrote:
> On Fri, Mar 20, 2026 at 07:08:41PM +0100, Andy Shevchenko wrote:
>> Can you share ACPI DSDT excerpt (from DSDT table of firmware, you can
>> get it by copying file from /sys/firmware/acpi/tables/DSDT and decode
>> it with `iasl -d DSDT`) and output of `lspci -vv -n -s $SDHCI_SLOT`?
>> Because it might be that the problem should be solved just by providing
>> better fixes to GPIO detection or so.
> 
> Here is the requested data collected from the N22 on a vanilla
> 6.19.6+deb14+1-amd64 kernel with no patches applied.
> 
> DSDT INT33BB section (decoded from /sys/firmware/acpi/tables/DSDT):
> 
>     Name (_HID, "INT33BB")
>     Name (_CID, "PNP0D40")
>     Name (_DDN, "Intel(R) SDIO Controller - 80862295")
>     Name (_UID, 0x02)
>     Name (_HRV, 0x02)
>     Name (_DEP, Package (0x01)
>     {
>         GPO1
>     })
>     Name (ABUF, ResourceTemplate ()
>     {
>         Memory32Fixed (ReadWrite, 0x00000000, 0x00001000, _Y04)
>         Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive) { 0x0000002E }
>         GpioIo (Exclusive, PullNone, 0x0000, 0x0000, IoRestrictionOutputOnly,
>             "\\_SB.GPO1", 0x00, ResourceConsumer, ,)
>             {
>                 0x0005
>             }
>     })
>     Method (_PS0, 0, NotSerialized)
>     {
>         PSAT &= 0xFFFFFFFC
>         PSAT |= Zero
>         If ((PSTS == Zero))
>         {
>             If ((^^^GPO1.AVBL == One))
>             {
>                 ^^^GPO1.CWLE = One
>             }
>             PSTS = One
>         }
>     }
>     Method (_PS3, 0, NotSerialized)
>     {
>         PSAT |= 0x03
>         PSAT |= Zero
>     }
> 
> Two things stand out in this description. First, the _DDN names the
> device as "Intel(R) SDIO Controller - 80862295" rather than an SD
> slot, and _UID is 0x02; in current sdhci-acpi.c, INT33BB UID 2 maps
> to the SDIO slot profile rather than the removable SD profile. Second,
> the GpioIo descriptor for pin 5 on GPO1 is IoRestrictionOutputOnly
> with PullNone. My reading of the AML is that this looks more like an
> enable/control line than a card-detect input, but that is an inference
> from the firmware description rather than something I can prove from
> the AML alone.

Thank you. Note it might still be useful to share the full output
of acpidump.

So the above indeed describes the SD-slot MMC controller in
ACPI mode. WhenAndy wrote: "When device is present in both PCI and
ACPI in accordance with ACPI specification, if I am not
mistaken, it should extend the existing PCI capabilities."

I believe Andy was talking about your typical PCI[-e] slot ACPI
companion fwnode / device, which adds some extra info about
the slot.

But in this case it indeed seems the whole SD-slot controller
is simply described in both ACPI and enumerated through PCI
which is rather broken. And it being marked as a SDIO slot
is also broken, so I think your ACPI tables are just quite
broken.

Still I wonder if you've looked into BIOS settings to fix this ?

Some Cherry Trail devices have a BIOS option to switch
the BIOS from a Windows compatible mode to an Android compatible
mode.  I've worked more with Cherry Ttail then with Braswell,
so I'm not sure if the same also applies to Braswell but this
might be worth a shot.

Can you try dd-ing a Fedora Workstation Live iso to an USB
stick and then hit the BIOS bootmenu key (F12?) and boot
from that? If this is indeed one of these double identity
BIOS-es it will see Fedora's shim is signed with microsoft's
key and switch to Windows mode. If it does this it will immediately
reboot into the new mode, so need to hit F12 a second time
and select the USB stick a second time.

And then under Fedora check if the sd slot is still seen
twice.

> 
> lspci -vv -n -s 0000:00:12.0 on vanilla kernel:
> 
>     00:12.0 0805: 8086:2296 (rev 21) (prog-if 01)

Ok, so at least on the PCI side this does have the SD slot
device-id and not the sdio-slot one.


>         Subsystem: 17aa:3807
>         Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop-
>                  ParErr- Stepping- SERR- FastB2B- DisINTx-
>         Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast
>                 >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
>         Interrupt: pin A routed to IRQ 18
>         Region 0: Memory at 91315000 (32-bit, non-prefetchable) [size=4K]
>         Capabilities: [80] Power Management version 3
>             Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
>                    PME(D0+,D1-,D2-,D3hot+,D3cold-)
>             Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
>         Kernel modules: sdhci_pci
> 
> Note BusMaster- on the vanilla kernel. With the patch series applied
> BusMaster+ and Kernel driver in use: sdhci-pci.
> 
> Vanilla dmesg for SD/MMC:
> 
>     [    3.142590] mmc0: SDHCI controller on ACPI [INT33BB:00] using ADMA
>     [    3.155518] mmc1: SDHCI controller on ACPI [80860F14:00] using ADMA
>     [    3.356405] mmc0: Failed to initialize a non-removable card
>     [    3.358473] sdhci-pci 0000:00:12.0: SDHCI controller found [8086:2296] (rev 21)
>     [    3.397615] sdhci-pci 0000:00:12.0: SDHCI controller found [8086:2296] (rev 21)
>     ... (repeated approximately 30 times over 30 seconds)
>     [   30.066835] sdhci-pci 0000:00:12.0: SDHCI controller found [8086:2296] (rev 21)
> 
> The observed sequence on the vanilla kernel is:
> 
>   - sdhci-acpi binds INT33BB:00 and creates mmc0
>   - mmc0 then fails with "Failed to initialize a non-removable card"
>   - sdhci-pci repeatedly reports "SDHCI controller found [8086:2296]"
>   - lspci -vv shows BusMaster- and no "Kernel driver in use" line
>     for 0000:00:12.0 throughout
> 
> That seems consistent with the ACPI path binding the
> firmware-described instance while the PCI path never reaches a
> usable bound state.
> 
> Given the output-only GPIO descriptor and the current non-removable
> SDIO mapping for INT33BB UID 2, does this point to a fixable ACPI /
> GPIO-enumeration issue, or do you think machine-scoped exclusion of
> the ACPI node is still the right direction for this firmware? I am
> happy to test any suggested patch or approach on the hardware.

If you look at drivers/mmc/host/sdhci-acpi.c you'll see an existing
sdhci_acpi_quirks[] mechanism with DMI quirks there. I wonder what
happens if you GPIO card detection there by adding a new
DMI_QUIRK_SDIO_IS_SD quirk for your model there and when that is set
use sdhci_acpi_slot_int_sd instead of sdhci_acpi_slot_int_sdio +
disable any use of GPIO for card-detect ?

I'm hoping that using the ACPI path will avoid the need for

"[PATCH 1/3] mmc: sdhci-pci: disable aggressive runtime PM for Braswell SD on Lenovo N22"

and we can use the same quirk to fix sdio -> sd to also force
polling.

I hope the PCI driver will then simply fail to probe due to
a resource conflict ...

Alternative if we do go the route of this v1 patchset you may want
to use the override_status_id mechanism in:

drivers/acpi/x86/utils.c

Adding a NOT_PRESENT_ENTRY_PATH match on the INT33BB device
to ignore it.

Hmm, I see that mmc1 is enumerated as 80860F14:00 I wonder
if there is a 80860F14:01 with a status of 0 and if we really
need to use that one instead of the INT33BB one.

Normally a single laptop/tablet uses either all PCI or
all ACPI enumeration for the MMC controllers and if using
ACPI it tends to be consistent wrt which ACPI HIDs it uses ...

Again having a full acpidump to look at would be good.

Regards,

Hans



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

* Re: [PATCH 0/3] mmc: Lenovo N22 Braswell SD slot fixes
  2026-03-20 16:47   ` Nelson Johnson
  2026-03-20 17:55     ` Andy Shevchenko
@ 2026-03-24 15:05     ` Adrian Hunter
  1 sibling, 0 replies; 14+ messages in thread
From: Adrian Hunter @ 2026-03-24 15:05 UTC (permalink / raw)
  To: Nelson Johnson; +Cc: ulf.hansson, linux-kernel, linux-mmc, andriy.shevchenko

On 20/03/2026 18:47, Nelson Johnson wrote:
> On Fri, Mar 20, 2026 at 8:27 AM Adrian Hunter wrote:
>> These changes seem more like they work around the problem rather
>> than fix the problem, but you say it worked OK in v4.14? I see also
>> mention of v4.9 in patch 1? When it was working, was it using the ACPI
>> driver or the PCI driver?
> 
> You are right that this series is a workaround for a firmware-specific
> problem rather than a generic root-cause fix.
> 
> My confirmed working baseline is v4.9, and on that kernel the
> controller was owned by sdhci-pci, not sdhci-acpi. The INT33BB:00
> ACPI node was present in firmware but did not prevent the PCI path
> from working. I should have been more precise in the cover letter.
> What I can state from testing is:
> 
>   - v4.9: slot works via sdhci-pci

If it works on 4.9 but does not work on 4.10, we would normally
git bisect to find the first commit where it fails.  In that way
we may find the root cause and can then design a fix.

>   - current kernels: slot is unusable
>   - current kernels with this series applied: slot works again via sdhci-pci
> 
>> In patch 3, you say the SDHCI ACPI driver repeatedly defers. Is that
>> because it is waiting for the GPIO driver for the Card Detect GPIO?
> 
> Yes. On this machine INT33BB:00 defers waiting for the card-detect

Later you have said INT33BB is not related.  Are there error
messages for 0000:00:12.0 ?  What are the symptoms of the failure?

Note the GPIO driver should be /sys/bus/platform/drivers/cherryview-pinctrl
Does that have any devices listed?

> GPIO dependency, and that dependency never becomes available. In the
> broken state the ACPI path does not successfully probe and the slot
> remains unusable. Excluding INT33BB:00 on this DMI match allows
> sdhci-pci to own 0000:00:12.0 and restores card detection.
> 
> I am not aware of an existing generic ownership-arbitration mechanism
> between sdhci-acpi and sdhci-pci for this dual-enumerated firmware

If an ACPI node has an _HID, then it might be enumerated as a
platform device, and driven by a platform driver (like sdhci-acpi),
but not if _STA (status) is 0 (not present).

PCI devices are enumerated by the PCI bus, but the ACPI node is
associated with an existing device via _ADR.  In this case
0000:00:12.0 has an ACPI companion node "SDHC" as identified by
_ADR = 0x00120000.  Unless kernel command line option acpi=strict
is used, Linux does not care about _STA for that purpose.

BIOS can hide PCI devices from PCI enumeration, so the PCI device
would not be visible at all if the intention was that it should
be driven as an ACPI device.

> layout, so I chose the narrowest fix available: a DMI-scoped exclusion
> on the affected machine only. That approach is consistent with how the
> subsystem has handled similar firmware defects elsewhere. sdhci-acpi.c
> already carries a maintained quirk table covering the Lenovo Miix 320,
> Acer Aspire Switch 10, Lenovo Yoga Tablet 2 Pro, Toshiba Encore 2, and
> ASUS T100TA, all firmware defects fixed with DMI scope and accepted
> with stable tags. sdhci-pci-core.c follows the same pattern, as
> jsl_broken_hs400es() immediately above the new helper demonstrates.
> 
>> Note Lenovo N22 seems to date back to 2017. Is it really worth
>> spending time on something that old, especially as no one seems
>> to have worried about it before?
> 
> My argument for upstream is mainly that the quirk is small and
> low-risk, and that PCI ID 8086:2296 is part of the wider Braswell SD
> controller family rather than unique to this one machine. Although the
> Lenovo N22 is an older platform, Braswell systems remain in active
> secondary use. The Lenovo IdeaPad 100S-14IBR carries the same
> controller and has a documented bug report showing sdhci-pci not
> binding on kernel 4.10 after working on 4.8, the same symptom pattern.

Documented where?

> The commit documents the failure mode, the correct driver ownership
> decision, and the workaround approach in a place where anyone dealing
> with a similar Braswell platform can find and reference it.
> 
> That said, I defer to your judgment on whether this serves value to
> the wider community. I am happy to carry it as a local patch if you
> feel it does not belong upstream.

For the upstream kernel, the expectation is that a fix addresses the
underlying problem.  At the moment it is not clear what that is.


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

end of thread, other threads:[~2026-03-24 15:05 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-16 21:23 [PATCH 0/3] mmc: Lenovo N22 Braswell SD slot fixes Nelson Johnson
2026-03-16 21:23 ` [PATCH 1/3] mmc: sdhci-pci: disable aggressive runtime PM for Braswell SD on Lenovo N22 Nelson Johnson
2026-03-20 17:58   ` Andy Shevchenko
2026-03-16 21:23 ` [PATCH 2/3] mmc: sdhci-pci: force polling card detect " Nelson Johnson
2026-03-16 21:23 ` [PATCH 3/3] mmc: sdhci-acpi: exclude INT33BB:00 from ACPI binding " Nelson Johnson
2026-03-20 18:02   ` Andy Shevchenko
2026-03-20 13:27 ` [PATCH 0/3] mmc: Lenovo N22 Braswell SD slot fixes Adrian Hunter
2026-03-20 16:47   ` Nelson Johnson
2026-03-20 17:55     ` Andy Shevchenko
2026-03-20 18:08       ` Andy Shevchenko
2026-03-20 23:07         ` Nelson Johnson
2026-03-21 11:07           ` Hans de Goede
2026-03-24 15:05     ` Adrian Hunter
2026-03-20 17:49 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox