git: 691833ad3776 - main - sys/intpm: fix SMBus Read Block
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 06 May 2025 11:55:26 UTC
The branch main has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=691833ad3776c17ba3267049ac36bc3461c66799 commit 691833ad3776c17ba3267049ac36bc3461c66799 Author: Corvin Köhne <corvink@FreeBSD.org> AuthorDate: 2025-05-05 09:23:18 +0000 Commit: Corvin Köhne <corvink@FreeBSD.org> CommitDate: 2025-05-06 11:54:18 +0000 sys/intpm: fix SMBus Read Block The Read Block function missed saving the data into the preallocated buffer. This causes it to return some garbage when called. Reviewed by: avg MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Pull Request: https://github.com/freebsd/freebsd-src/pull/1691 --- sys/dev/intpm/intpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/intpm/intpm.c b/sys/dev/intpm/intpm.c index 2f12e0dcf49b..fd3838bbcc14 100644 --- a/sys/dev/intpm/intpm.c +++ b/sys/dev/intpm/intpm.c @@ -879,7 +879,7 @@ intsmb_bread(device_t dev, u_char slave, char cmd, u_char *count, char *buf) if (nread != 0 && nread <= SMBBLOCKTRANS_MAX) { *count = nread; for (i = 0; i < nread; i++) - bus_read_1(sc->io_res, PIIX4_SMBBLKDAT); + buf[i] = bus_read_1(sc->io_res, PIIX4_SMBBLKDAT); } else error = SMB_EBUSERR; }