[Bug 204521] [new driver] [request] Port rtsx from OpenBSD to FreeBSD
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu May 28 21:04:53 UTC 2020
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204521
--- Comment #127 from jyoung15 at gmail.com ---
(In reply to Jesper Schmitz Mouridsen from comment #126)
Unfortunately there is no improvement with the patch. Oddly it seems the card
sensing is opposite of what it should be.
With this simple change, it seems to be working perfectly for me:
diff --git a/rtsx.c b/rtsx.c
index 13ce3df..4f5e34f 100644
--- a/rtsx.c
+++ b/rtsx.c
@@ -548,7 +548,7 @@ rtsx_is_card_present(struct rtsx_softc *sc)
uint32_t status;
status = READ4(sc, RTSX_BIPR);
- return (status & RTSX_SD_EXIST);
+ return !(status & RTSX_SD_EXIST);
}
With the above change, the /dev/mmcsd0 file appears when inserting the card and
disappears when removing the card. Also, the "rtsx0: Card removed" and "rtsx0:
Card inserted" messages appear as expected (previously it would say removed
when inserted and vice versa). I can't explain why, but this works for me.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list