git: c502df9eb193 - main - sdiotool: Do not treat an unknown chip ID as fatal
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 05 Nov 2026 14:52:31 UTC
The branch main has been updated by manu:
URL: https://cgit.FreeBSD.org/src/commit/?id=c502df9eb19391c911e6fe930422aff8df926d9f
commit c502df9eb19391c911e6fe930422aff8df926d9f
Author: Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2026-10-22 16:39:16 +0000
Commit: Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2026-11-05 14:52:20 +0000
sdiotool: Do not treat an unknown chip ID as fatal
The tool is useful for probing any SDIO card, not only the BCM4330. Print the chip ID, report a failed backplane read, and only note when the ID is not the expected REPLY_MAGIC instead of exiting.
Differential Revision: https://reviews.freebsd.org/D61030
---
usr.bin/sdiotool/sdiotool.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/usr.bin/sdiotool/sdiotool.c b/usr.bin/sdiotool/sdiotool.c
index 4b3552d5f256..bce7b93d2679 100644
--- a/usr.bin/sdiotool/sdiotool.c
+++ b/usr.bin/sdiotool/sdiotool.c
@@ -539,10 +539,11 @@ main(int argc, char **argv) {
ret = sdio_func_enable(cam_dev, 1, 1);bailout(ret);
uint32_t magic = brcmf_sdiod_regrl(&brcmf_dev, 0x18000000, &ret);
- printf("Magic = %08x\n", magic);
- if (magic != REPLY_MAGIC) {
- errx(1, "Reply magic is incorrect: expected %08x, got %08x",
- REPLY_MAGIC, magic);
- }
+ printf("Chip ID at 0x18000000 = %08x\n", magic);
+ if (ret != 0)
+ errx(1, "Backplane read failed: %d", ret);
+ if (magic != REPLY_MAGIC)
+ printf("Unknown chip ID (expected %08x for BCM4330)\n",
+ REPLY_MAGIC);
cam_close_spec_device(cam_dev);
}