circuitpython/ports/stm32/usbdev/class/src
Damien George fd2ff867a0 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>
2020-07-25 01:12:07 +10:00
..
usbd_cdc_msc_hid.c stm32/usbdev: Fix compile error if MICROPY_HW_USB_CDC_NUM is set to 2. 2019-10-05 23:33:38 +10:00
usbd_msc_bot.c stm32/usb: Add config options to disable USB MSC and/or HID. 2019-07-16 14:39:21 +10:00
usbd_msc_scsi.c stm32/usbdev: Fix calculation of SCSI LUN size with multiple LUNs. 2020-07-25 01:12:07 +10:00