linux/drivers/usb
Krishna Kurapati 9d4dc16ec7 usb: gadget: mass_storage: Fix cdrom data transfers on MAC-OS
During cdrom emulation, the response to read_toc command must contain
the cdrom address as the number of sectors (2048 byte sized blocks)
represented either as an absolute value (when MSF bit is '0') or in
terms of PMin/PSec/PFrame (when MSF bit is set to '1'). Incase of
cdrom, the fsg_lun_open call sets the sector size to 2048 bytes.

When MAC OS sends a read_toc request with MSF set to '1', the
store_cdrom_address assumes that the address being provided is the
LUN size represented in 512 byte sized blocks instead of 2048. It
tries to modify the address further to convert it to 2048 byte sized
blocks and store it in MSF format. This results in data transfer
failures as the cdrom address being provided in the read_toc response
is incorrect.

Fixes: 3f565a363c ("usb: gadget: storage: adapt logic block size to bound block devices")
Cc: stable@vger.kernel.org
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com>
Link: https://lore.kernel.org/r/1661570110-19127-1-git-send-email-quic_kriskura@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-08-30 15:33:12 +02:00
..
atm usb/atm: fix repeated words in comments 2022-07-27 14:32:20 +02:00
c67x00 USB: c67x00: remove unnecessary check of res 2022-05-12 11:36:46 +02:00
cdns3 usb: cdns3: Don't use priv_dev uninitialized in cdns3_gadget_ep_enable() 2022-08-04 11:53:48 -07:00
chipidea Tracing updates for 5.20 / 6.0 2022-08-05 09:41:12 -07:00
class USB: cdc-acm: Add Icom PMR F3400 support (0c26:0020) 2022-08-19 11:12:43 +02:00
common usb: common: usb-conn-gpio: Allow wakeup from system suspend 2022-06-10 11:48:41 +02:00
core USB: core: Prevent nested device-reset calls 2022-08-30 15:32:04 +02:00
dwc2 usb: dwc2: fix wrong order of phy_power_on and phy_init 2022-08-30 15:31:16 +02:00
dwc3 usb: dwc3: disable USB core PHY management 2022-08-30 15:30:21 +02:00
early usb: early: xhci-dbc: Fix xdbc number parsing 2022-03-15 18:20:34 +01:00
gadget usb: gadget: mass_storage: Fix cdrom data transfers on MAC-OS 2022-08-30 15:33:12 +02:00
host Revert "xhci: turn off port power in shutdown" 2022-08-25 17:48:30 +02:00
image usb/image: fix repeated words in comments 2022-07-27 14:33:53 +02:00
isp1760 usb: isp1760: Fix out-of-bounds array access 2022-05-19 18:10:59 +02:00
misc usb: misc: onboard_usb_hub: Drop reset delay in onboard_hub_power_off() 2022-08-18 21:10:59 +02:00
mon
mtu3 Tracing updates for 5.20 / 6.0 2022-08-05 09:41:12 -07:00
musb musb: fix USB_MUSB_TUSB6010 dependency 2022-08-18 16:33:06 +02:00
phy usb: phy: remove redundant store to variable var after & operation 2022-07-27 14:24:50 +02:00
renesas_usbhs usb: renesas: Fix refcount leak bug 2022-06-21 16:39:03 +02:00
roles
serial USB-serial updates for 5.20-rc1 2022-07-25 11:28:52 +02:00
storage usb-storage: Add ignore-residue quirk for NXP PN7462AU 2022-08-18 17:18:05 +02:00
typec usb: typec: Remove retimers properly 2022-08-30 15:30:39 +02:00
usbip usbip: vudc: Don't enable IRQs prematurely 2022-06-10 11:48:19 +02:00
Kconfig usb: remove reference to deleted config STB03xxx 2021-08-18 15:32:19 +02:00
Makefile usb: host: remove line for obsolete config USB_HWA_HCD 2021-08-18 15:32:19 +02:00
usb-skeleton.c usb: usb-skeleton: Update min() to min_t() 2021-10-05 12:56:48 +02:00