summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2020-07-22 23:45:08 +1000
committerDamien George <damien@micropython.org>2020-07-25 01:12:07 +1000
commitfd2ff867a08fd174f0bbf7a03aa59547634e91ac (patch)
tree3606569212afbceffe7977599b4f4abac7d1f84f /lib
parent37e1b5c891f9964bb6c95228bc2d718511507a69 (diff)
stm32/usbdev: Fix calculation of SCSI LUN size with multiple LUNs.
The SCSI driver calls GetCapacity to get the block size and number of blocks of the underlying block-device/LUN. It caches these values and uses them later on to verify that reads/writes are within the bounds of the LUN. But, prior to this commit, there was only one set of cached values for all LUNs, so the bounds checking for a LUN could use incorrect values, values from one of the other LUNs that most recently updated the cached values. This would lead to failed SCSI requests. This commit fixes this issue by having separate cached values for each LUN. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions