From 6e47c81d82494b7d755850e15cc442dd6e371693 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 27 Mar 2023 19:01:47 +0200 Subject: [PATCH] 4.19-stable patches added patches: thunderbolt-use-const-qualifier-for-ring_interrupt_index.patch uas-add-us_fl_no_report_opcodes-for-jmicron-jms583gen-2.patch --- queue-4.19/series | 2 ++ ...t-qualifier-for-ring_interrupt_index.patch | 33 +++++++++++++++++ ...port_opcodes-for-jmicron-jms583gen-2.patch | 36 +++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 queue-4.19/thunderbolt-use-const-qualifier-for-ring_interrupt_index.patch create mode 100644 queue-4.19/uas-add-us_fl_no_report_opcodes-for-jmicron-jms583gen-2.patch diff --git a/queue-4.19/series b/queue-4.19/series index 33ab0fea93e..6ef54332e8d 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -23,3 +23,5 @@ net-mdio-thunder-add-missing-fwnode_handle_put.patch bluetooth-btqcomsmd-fix-command-timeout-after-settin.patch bluetooth-btsdio-fix-use-after-free-bug-in-btsdio_re.patch hwmon-it87-fix-voltage-scaling-for-chips-with-10.9mv.patch +uas-add-us_fl_no_report_opcodes-for-jmicron-jms583gen-2.patch +thunderbolt-use-const-qualifier-for-ring_interrupt_index.patch diff --git a/queue-4.19/thunderbolt-use-const-qualifier-for-ring_interrupt_index.patch b/queue-4.19/thunderbolt-use-const-qualifier-for-ring_interrupt_index.patch new file mode 100644 index 00000000000..316fa48e4ea --- /dev/null +++ b/queue-4.19/thunderbolt-use-const-qualifier-for-ring_interrupt_index.patch @@ -0,0 +1,33 @@ +From 1716efdb07938bd6510e1127d02012799112c433 Mon Sep 17 00:00:00 2001 +From: Mario Limonciello +Date: Fri, 10 Mar 2023 11:20:49 -0600 +Subject: thunderbolt: Use const qualifier for `ring_interrupt_index` + +From: Mario Limonciello + +commit 1716efdb07938bd6510e1127d02012799112c433 upstream. + +`ring_interrupt_index` doesn't change the data for `ring` so mark it as +const. This is needed by the following patch that disables interrupt +auto clear for rings. + +Cc: Sanju Mehta +Cc: stable@vger.kernel.org +Signed-off-by: Mario Limonciello +Signed-off-by: Mika Westerberg +Signed-off-by: Greg Kroah-Hartman +--- + drivers/thunderbolt/nhi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/thunderbolt/nhi.c ++++ b/drivers/thunderbolt/nhi.c +@@ -38,7 +38,7 @@ + + #define NHI_MAILBOX_TIMEOUT 500 /* ms */ + +-static int ring_interrupt_index(struct tb_ring *ring) ++static int ring_interrupt_index(const struct tb_ring *ring) + { + int bit = ring->hop; + if (!ring->is_tx) diff --git a/queue-4.19/uas-add-us_fl_no_report_opcodes-for-jmicron-jms583gen-2.patch b/queue-4.19/uas-add-us_fl_no_report_opcodes-for-jmicron-jms583gen-2.patch new file mode 100644 index 00000000000..72b55eacc9a --- /dev/null +++ b/queue-4.19/uas-add-us_fl_no_report_opcodes-for-jmicron-jms583gen-2.patch @@ -0,0 +1,36 @@ +From a37eb61b6ec064ac794b8a1e89fd33eb582fe51d Mon Sep 17 00:00:00 2001 +From: Yaroslav Furman +Date: Sun, 12 Mar 2023 11:07:45 +0200 +Subject: uas: Add US_FL_NO_REPORT_OPCODES for JMicron JMS583Gen 2 + +From: Yaroslav Furman + +commit a37eb61b6ec064ac794b8a1e89fd33eb582fe51d upstream. + +Just like other JMicron JMS5xx enclosures, it chokes on report-opcodes, +let's avoid them. + +Signed-off-by: Yaroslav Furman +Cc: stable +Link: https://lore.kernel.org/r/20230312090745.47962-1-yaro330@gmail.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/storage/unusual_uas.h | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/usb/storage/unusual_uas.h ++++ b/drivers/usb/storage/unusual_uas.h +@@ -111,6 +111,13 @@ UNUSUAL_DEV(0x152d, 0x0578, 0x0000, 0x99 + USB_SC_DEVICE, USB_PR_DEVICE, NULL, + US_FL_BROKEN_FUA), + ++/* Reported by: Yaroslav Furman */ ++UNUSUAL_DEV(0x152d, 0x0583, 0x0000, 0x9999, ++ "JMicron", ++ "JMS583Gen 2", ++ USB_SC_DEVICE, USB_PR_DEVICE, NULL, ++ US_FL_NO_REPORT_OPCODES), ++ + /* Reported-by: Thinh Nguyen */ + UNUSUAL_DEV(0x154b, 0xf00b, 0x0000, 0x9999, + "PNY", -- 2.47.3