The branch main has been updated by br:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=4c1ecf5502e1b4b20553a2f996b73794cc7e6454

commit 4c1ecf5502e1b4b20553a2f996b73794cc7e6454
Author:     Ruslan Bukin <b...@freebsd.org>
AuthorDate: 2021-04-27 11:19:05 +0000
Commit:     Ruslan Bukin <b...@freebsd.org>
CommitDate: 2021-04-27 11:19:05 +0000

    Consider the broken card detect flag that comes from 'broken-cd;'
    dts property.
    
    This fixes operation on Intel Stratix 10 devices.
    
    Tested on Terasic DE10-Pro.
    
    Reviewed by: manu
    Sponsored by: UKRI
    Differential revision: https://reviews.freebsd.org/D29999
---
 sys/dev/mmc/host/dwmmc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/dev/mmc/host/dwmmc.c b/sys/dev/mmc/host/dwmmc.c
index b31bb0d4e68b..bf494027551a 100644
--- a/sys/dev/mmc/host/dwmmc.c
+++ b/sys/dev/mmc/host/dwmmc.c
@@ -480,7 +480,8 @@ dwmmc_card_task(void *arg, int pending __unused)
 #else
        DWMMC_LOCK(sc);
 
-       if (READ4(sc, SDMMC_CDETECT) == 0) {
+       if (READ4(sc, SDMMC_CDETECT) == 0 ||
+           (sc->mmc_helper.props & MMC_PROP_BROKEN_CD)) {
                if (sc->child == NULL) {
                        if (bootverbose)
                                device_printf(sc->dev, "Card inserted\n");
_______________________________________________
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"

Reply via email to