git: 8679d115a00f - stable/14 - sdiob: copy vendor/device IDs from card common CIS
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 07 Nov 2026 17:46:48 UTC
The branch stable/14 has been updated by vexeduxr:
URL: https://cgit.FreeBSD.org/src/commit/?id=8679d115a00f361be298a4ce78f5ab87b201650d
commit 8679d115a00f361be298a4ce78f5ab87b201650d
Author: Ahmad Khalifa <vexeduxr@FreeBSD.org>
AuthorDate: 2026-11-04 15:37:54 +0000
Commit: Ahmad Khalifa <vexeduxr@FreeBSD.org>
CommitDate: 2026-11-07 14:08:23 +0000
sdiob: copy vendor/device IDs from card common CIS
Copy both the vendor and device IDs from the card common CIS if they are
absent in a function.
These are optional according to the spec. [1]
[1] Part E1 SDIO Simplified Specification ยง16.6
MFC after: 3 days
Reviewed by: kibab, imp, adrian
Differential Revision: https://reviews.freebsd.org/D60988
(cherry picked from commit c91dfb47e0bcdf682f7f152624e03747787c6ea3)
---
sys/dev/sdio/sdiob.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/sys/dev/sdio/sdiob.c b/sys/dev/sdio/sdiob.c
index e60e8759599f..5566ccc896ab 100644
--- a/sys/dev/sdio/sdiob.c
+++ b/sys/dev/sdio/sdiob.c
@@ -893,8 +893,15 @@ sdiob_get_card_info(struct sdiob_softc *sc)
sc->cardinfo.f[fn].vendor, sc->cardinfo.f[fn].device,
sc->cardinfo.f[fn].max_blksize);
if (sc->cardinfo.f[fn].vendor == 0) {
- DPRINTF("%s: F%d doesn't exist\n", __func__, fn);
- break;
+ /*
+ * If a function doesn't provide a vendor/device ID,
+ * copy it from the card common CIS.
+ */
+ DPRINTF("%s: F%d: "
+ "Copying vendor and device IDs from F0\n",
+ __func__, fn);
+ sc->cardinfo.f[fn].vendor = sc->cardinfo.f[0].vendor;
+ sc->cardinfo.f[fn].device = sc->cardinfo.f[0].device;
}
sc->cardinfo.num_funcs++;
}