From 25d47539aaa7609c87cd91a0fc94e07bcc0a3c3a Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 8 Nov 2021 13:30:09 +0100 Subject: [PATCH] 4.4-stable patches added patches: usb-gadget-mark-usb_fsl_qe-broken-on-64-bit.patch usb-storage-add-compatibility-quirk-flags-for-iodd-2531-2541.patch --- queue-4.4/series | 2 + ...get-mark-usb_fsl_qe-broken-on-64-bit.patch | 45 +++++++++++++++++++ ...ility-quirk-flags-for-iodd-2531-2541.patch | 43 ++++++++++++++++++ 3 files changed, 90 insertions(+) create mode 100644 queue-4.4/usb-gadget-mark-usb_fsl_qe-broken-on-64-bit.patch create mode 100644 queue-4.4/usb-storage-add-compatibility-quirk-flags-for-iodd-2531-2541.patch diff --git a/queue-4.4/series b/queue-4.4/series index b29e44bff3c..a00d9fab30f 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -3,3 +3,5 @@ arm-9120-1-revert-amba-make-use-of-1-irqs-warn.patch net-hso-register-netdev-later-to-avoid-a-race-condition.patch ib-qib-use-struct_size-helper.patch ib-qib-protect-from-buffer-overflow-in-struct-qib_user_sdma_pkt-fields.patch +usb-gadget-mark-usb_fsl_qe-broken-on-64-bit.patch +usb-storage-add-compatibility-quirk-flags-for-iodd-2531-2541.patch diff --git a/queue-4.4/usb-gadget-mark-usb_fsl_qe-broken-on-64-bit.patch b/queue-4.4/usb-gadget-mark-usb_fsl_qe-broken-on-64-bit.patch new file mode 100644 index 00000000000..f65fcf1cf29 --- /dev/null +++ b/queue-4.4/usb-gadget-mark-usb_fsl_qe-broken-on-64-bit.patch @@ -0,0 +1,45 @@ +From a0548b26901f082684ad1fb3ba397d2de3a1406a Mon Sep 17 00:00:00 2001 +From: Geert Uytterhoeven +Date: Wed, 27 Oct 2021 10:08:49 +0200 +Subject: usb: gadget: Mark USB_FSL_QE broken on 64-bit +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Geert Uytterhoeven + +commit a0548b26901f082684ad1fb3ba397d2de3a1406a upstream. + +On 64-bit: + + drivers/usb/gadget/udc/fsl_qe_udc.c: In function ‘qe_ep0_rx’: + drivers/usb/gadget/udc/fsl_qe_udc.c:842:13: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] + 842 | vaddr = (u32)phys_to_virt(in_be32(&bd->buf)); + | ^ + In file included from drivers/usb/gadget/udc/fsl_qe_udc.c:41: + drivers/usb/gadget/udc/fsl_qe_udc.c:843:28: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] + 843 | frame_set_data(pframe, (u8 *)vaddr); + | ^ + +The driver assumes physical and virtual addresses are 32-bit, hence it +cannot work on 64-bit platforms. + +Acked-by: Li Yang +Signed-off-by: Geert Uytterhoeven +Link: https://lore.kernel.org/r/20211027080849.3276289-1-geert@linux-m68k.org +Cc: stable +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/gadget/udc/Kconfig | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/usb/gadget/udc/Kconfig ++++ b/drivers/usb/gadget/udc/Kconfig +@@ -265,6 +265,7 @@ config USB_AMD5536UDC + config USB_FSL_QE + tristate "Freescale QE/CPM USB Device Controller" + depends on FSL_SOC && (QUICC_ENGINE || CPM) ++ depends on !64BIT || BROKEN + help + Some of Freescale PowerPC processors have a Full Speed + QE/CPM2 USB controller, which support device mode with 4 diff --git a/queue-4.4/usb-storage-add-compatibility-quirk-flags-for-iodd-2531-2541.patch b/queue-4.4/usb-storage-add-compatibility-quirk-flags-for-iodd-2531-2541.patch new file mode 100644 index 00000000000..727350f1611 --- /dev/null +++ b/queue-4.4/usb-storage-add-compatibility-quirk-flags-for-iodd-2531-2541.patch @@ -0,0 +1,43 @@ +From 05c8f1b67e67dcd786ae3fe44492bbc617b4bd12 Mon Sep 17 00:00:00 2001 +From: James Buren +Date: Wed, 13 Oct 2021 20:55:04 -0500 +Subject: usb-storage: Add compatibility quirk flags for iODD 2531/2541 + +From: James Buren + +commit 05c8f1b67e67dcd786ae3fe44492bbc617b4bd12 upstream. + +These drive enclosures have firmware bugs that make it impossible to mount +a new virtual ISO image after Linux ejects the old one if the device is +locked by Linux. Windows bypasses this problem by the fact that they do +not lock the device. Add a quirk to disable device locking for these +drive enclosures. + +Acked-by: Alan Stern +Signed-off-by: James Buren +Cc: stable +Link: https://lore.kernel.org/r/20211014015504.2695089-1-braewoods+lkml@braewoods.net +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/storage/unusual_devs.h | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +--- a/drivers/usb/storage/unusual_devs.h ++++ b/drivers/usb/storage/unusual_devs.h +@@ -311,6 +311,16 @@ UNUSUAL_DEV( 0x045e, 0xffff, 0x0000, 0x + US_FL_MAX_SECTORS_64 ), + + /* ++ * Reported by James Buren ++ * Virtual ISOs cannot be remounted if ejected while the device is locked ++ * Disable locking to mimic Windows behavior that bypasses the issue ++ */ ++UNUSUAL_DEV( 0x04c5, 0x2028, 0x0001, 0x0001, ++ "iODD", ++ "2531/2541", ++ USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE), ++ ++/* + * This virtual floppy is found in Sun equipment (x4600, x4200m2, etc.) + * Reported by Pete Zaitcev + * This device chokes on both version of MODE SENSE which we have, so -- 2.47.3