Module Name: src Committed By: jmcneill Date: Sat Jan 15 15:54:40 UTC 2022
Modified Files: src/sys/dev/acpi: sdhc_acpi.c Log Message: acpi: sdhc: Read caps2 even if sdhci-caps{,-mask} doesn't touch the bits SDHC_FLAG_HOSTCAPS means that the driver has to supply both caps and caps2 values. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/dev/acpi/sdhc_acpi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/acpi/sdhc_acpi.c diff -u src/sys/dev/acpi/sdhc_acpi.c:1.17 src/sys/dev/acpi/sdhc_acpi.c:1.18 --- src/sys/dev/acpi/sdhc_acpi.c:1.17 Sat Jan 15 14:49:43 2022 +++ src/sys/dev/acpi/sdhc_acpi.c Sat Jan 15 15:54:40 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: sdhc_acpi.c,v 1.17 2022/01/15 14:49:43 jmcneill Exp $ */ +/* $NetBSD: sdhc_acpi.c,v 1.18 2022/01/15 15:54:40 jmcneill Exp $ */ /* * Copyright (c) 2016 Kimihiro Nonaka <non...@netbsd.org> @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sdhc_acpi.c,v 1.17 2022/01/15 14:49:43 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sdhc_acpi.c,v 1.18 2022/01/15 15:54:40 jmcneill Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -252,12 +252,10 @@ sdhc_acpi_attach(device_t parent, device SDHC_CAPABILITIES); sc->sc.sc_caps &= ~(caps_mask & 0xffffffff); sc->sc.sc_caps |= (caps & 0xffffffff); - if (((caps | caps_mask) >> 32) != 0) { - sc->sc.sc_caps2 = bus_space_read_4(sc->sc_memt, - sc->sc_memh, SDHC_CAPABILITIES2); - sc->sc.sc_caps2 &= ~(caps_mask >> 32); - sc->sc.sc_caps2 |= (caps >> 32); - } + sc->sc.sc_caps2 = bus_space_read_4(sc->sc_memt, + sc->sc_memh, SDHC_CAPABILITIES2); + sc->sc.sc_caps2 &= ~(caps_mask >> 32); + sc->sc.sc_caps2 |= (caps >> 32); sc->sc.sc_flags |= SDHC_FLAG_HOSTCAPS; }