]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Nov 2021 12:31:02 +0000 (13:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Nov 2021 12:31:02 +0000 (13:31 +0100)
added patches:
usb-gadget-mark-usb_fsl_qe-broken-on-64-bit.patch
usb-musb-balance-list-entry-in-musb_gadget_queue.patch
usb-storage-add-compatibility-quirk-flags-for-iodd-2531-2541.patch

queue-4.19/series
queue-4.19/usb-gadget-mark-usb_fsl_qe-broken-on-64-bit.patch [new file with mode: 0644]
queue-4.19/usb-musb-balance-list-entry-in-musb_gadget_queue.patch [new file with mode: 0644]
queue-4.19/usb-storage-add-compatibility-quirk-flags-for-iodd-2531-2541.patch [new file with mode: 0644]

index 471f552a6a9a3fa61a29f266adf0f44d19bb2370..3f9e5431b3e4a2fdf3b104e9b0f9ee0a3ac1ceb6 100644 (file)
@@ -1,3 +1,6 @@
 block-introduce-multi-page-bvec-helpers.patch
 revert-x86-kvm-fix-vcpu-id-indexed-array-sizes.patch
 usb-ehci-handshake-cmd_run-instead-of-sts_halt.patch
+usb-gadget-mark-usb_fsl_qe-broken-on-64-bit.patch
+usb-musb-balance-list-entry-in-musb_gadget_queue.patch
+usb-storage-add-compatibility-quirk-flags-for-iodd-2531-2541.patch
diff --git a/queue-4.19/usb-gadget-mark-usb_fsl_qe-broken-on-64-bit.patch b/queue-4.19/usb-gadget-mark-usb_fsl_qe-broken-on-64-bit.patch
new file mode 100644 (file)
index 0000000..8fca5ef
--- /dev/null
@@ -0,0 +1,45 @@
+From a0548b26901f082684ad1fb3ba397d2de3a1406a Mon Sep 17 00:00:00 2001
+From: Geert Uytterhoeven <geert@linux-m68k.org>
+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 <geert@linux-m68k.org>
+
+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 <leoyang.li@nxp.com>
+Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
+Link: https://lore.kernel.org/r/20211027080849.3276289-1-geert@linux-m68k.org
+Cc: stable <stable@vger.kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/gadget/udc/Kconfig |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/gadget/udc/Kconfig
++++ b/drivers/usb/gadget/udc/Kconfig
+@@ -328,6 +328,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.19/usb-musb-balance-list-entry-in-musb_gadget_queue.patch b/queue-4.19/usb-musb-balance-list-entry-in-musb_gadget_queue.patch
new file mode 100644 (file)
index 0000000..d34e619
--- /dev/null
@@ -0,0 +1,42 @@
+From 21b5fcdccb32ff09b6b63d4a83c037150665a83f Mon Sep 17 00:00:00 2001
+From: Viraj Shah <viraj.shah@linutronix.de>
+Date: Thu, 21 Oct 2021 11:36:44 +0200
+Subject: usb: musb: Balance list entry in musb_gadget_queue
+
+From: Viraj Shah <viraj.shah@linutronix.de>
+
+commit 21b5fcdccb32ff09b6b63d4a83c037150665a83f upstream.
+
+musb_gadget_queue() adds the passed request to musb_ep::req_list. If the
+endpoint is idle and it is the first request then it invokes
+musb_queue_resume_work(). If the function returns an error then the
+error is passed to the caller without any clean-up and the request
+remains enqueued on the list. If the caller enqueues the request again
+then the list corrupts.
+
+Remove the request from the list on error.
+
+Fixes: ea2f35c01d5ea ("usb: musb: Fix sleeping function called from invalid context for hdrc glue")
+Cc: stable <stable@vger.kernel.org>
+Signed-off-by: Viraj Shah <viraj.shah@linutronix.de>
+Link: https://lore.kernel.org/r/20211021093644.4734-1-viraj.shah@linutronix.de
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/musb/musb_gadget.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/musb/musb_gadget.c
++++ b/drivers/usb/musb/musb_gadget.c
+@@ -1248,9 +1248,11 @@ static int musb_gadget_queue(struct usb_
+               status = musb_queue_resume_work(musb,
+                                               musb_ep_restart_resume_work,
+                                               request);
+-              if (status < 0)
++              if (status < 0) {
+                       dev_err(musb->controller, "%s resume work: %i\n",
+                               __func__, status);
++                      list_del(&request->list);
++              }
+       }
+ unlock:
diff --git a/queue-4.19/usb-storage-add-compatibility-quirk-flags-for-iodd-2531-2541.patch b/queue-4.19/usb-storage-add-compatibility-quirk-flags-for-iodd-2531-2541.patch
new file mode 100644 (file)
index 0000000..4dee47a
--- /dev/null
@@ -0,0 +1,43 @@
+From 05c8f1b67e67dcd786ae3fe44492bbc617b4bd12 Mon Sep 17 00:00:00 2001
+From: James Buren <braewoods+lkml@braewoods.net>
+Date: Wed, 13 Oct 2021 20:55:04 -0500
+Subject: usb-storage: Add compatibility quirk flags for iODD 2531/2541
+
+From: James Buren <braewoods+lkml@braewoods.net>
+
+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 <stern@rowland.harvard.edu>
+Signed-off-by: James Buren <braewoods+lkml@braewoods.net>
+Cc: stable <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20211014015504.2695089-1-braewoods+lkml@braewoods.net
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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
+@@ -407,6 +407,16 @@ UNUSUAL_DEV(  0x04b8, 0x0602, 0x0110, 0x
+               USB_SC_SCSI, USB_PR_BULK, NULL, US_FL_SINGLE_LUN),
+ /*
++ * Reported by James Buren <braewoods+lkml@braewoods.net>
++ * 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),
++
++/*
+  * Not sure who reported this originally but
+  * Pavel Machek <pavel@ucw.cz> reported that the extra US_FL_SINGLE_LUN
+  * flag be added */