git: d61de53d18df - main - sdiotool: Fix writes being issued as reads
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 05 Nov 2026 14:52:27 UTC
The branch main has been updated by manu:
URL: https://cgit.FreeBSD.org/src/commit/?id=d61de53d18df34e60660baebe92ea8a1d204d1e9
commit d61de53d18df34e60660baebe92ea8a1d204d1e9
Author: Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2026-10-22 16:39:03 +0000
Commit: Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2026-11-05 14:52:08 +0000
sdiotool: Fix writes being issued as reads
sdio_write_1() passed 0 as the write flag to sdio_rw_direct(), so every write was performed as a read and the value was never sent to the card. Pass 1 so that the data is actually written.
Reviewed by: oh
Differential Revision: https://reviews.freebsd.org/D61026
---
usr.bin/sdiotool/cam_sdio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/usr.bin/sdiotool/cam_sdio.c b/usr.bin/sdiotool/cam_sdio.c
index 0cd8eeb0485a..46be0c6b4268 100644
--- a/usr.bin/sdiotool/cam_sdio.c
+++ b/usr.bin/sdiotool/cam_sdio.c
@@ -212,7 +212,7 @@ sdio_read_1(struct cam_device *dev, uint8_t func_number, uint32_t addr, int *ret
int
sdio_write_1(struct cam_device *dev, uint8_t func_number, uint32_t addr, uint8_t val) {
uint8_t _val;
- return sdio_rw_direct(dev, func_number, addr, 0, &val, &_val);
+ return sdio_rw_direct(dev, func_number, addr, 1, &val, &_val);
}
uint16_t