[PATCH 3/3] mmc: sdhci-acpi: exclude INT33BB:00 from ACPI binding on Lenovo N22

Nelson Johnson posted 3 patches 3 weeks ago
[PATCH 3/3] mmc: sdhci-acpi: exclude INT33BB:00 from ACPI binding on Lenovo N22
Posted by Nelson Johnson 3 weeks ago
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
Re: [PATCH 3/3] mmc: sdhci-acpi: exclude INT33BB:00 from ACPI binding on Lenovo N22
Posted by Andy Shevchenko 2 weeks, 3 days ago
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