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
This commit is contained in:
parent
4ec9d1370f
commit
d5151ea87a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=358450
@ -1278,7 +1278,7 @@ dwmmc_read_ivar(device_t bus, device_t child, int which, uintptr_t *result)
|
||||
*(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;
|
||||
|
Loading…
Reference in New Issue
Block a user