[prev in list] [next in list] [prev in thread] [next in thread]
List: freebsd-commits-all
Subject: svn commit: r358450 - head/sys/dev/mmc/host
From: Emmanuel Vadot <manu () FreeBSD ! org>
Date: 2020-02-28 21:31:41
Message-ID: 202002282131.01SLVfG4082666 () repo ! freebsd ! org
[Download RAW message or body]
Author: manu
Date: Fri Feb 28 21:31:40 2020
New Revision: 358450
URL: https://svnweb.freebsd.org/changeset/base/358450
Log:
mmc: dwmmc: Fix off by one error
The IVAR_MAX_DATA is supposed to have the number of descriptor X the mmc
block size and desc_count contain all this information + 1.
Reported by: phk
MFC after: 1 week
Modified:
head/sys/dev/mmc/host/dwmmc.c
Modified: head/sys/dev/mmc/host/dwmmc.c
==============================================================================
--- head/sys/dev/mmc/host/dwmmc.c Fri Feb 28 21:13:15 2020 (r358449)
+++ head/sys/dev/mmc/host/dwmmc.c Fri Feb 28 21:31:40 2020 (r358450)
@@ -1278,7 +1278,7 @@ dwmmc_read_ivar(device_t bus, device_t child, int whic
*(int *)result = sc->host.caps;
break;
case MMCBR_IVAR_MAX_DATA:
- *(int *)result = sc->desc_count;
+ *(int *)result = sc->desc_count - 1;
break;
case MMCBR_IVAR_TIMING:
*(int *)result = sc->host.ios.timing;
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic