From 5fd4c52bc437fa06f6ade07ce89c4ad373604463 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 11 May 2020 14:18:59 +0200 Subject: [PATCH] 5.6-stable patches added patches: thunderbolt-check-return-value-of-tb_sw_read-in-usb4_switch_op.patch usb-serial-qcserial-add-dw5816e-support.patch --- ...alue-of-tb_sw_read-in-usb4_switch_op.patch | 35 +++++++++++++++++++ ...-serial-qcserial-add-dw5816e-support.patch | 30 ++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 queue-5.6/thunderbolt-check-return-value-of-tb_sw_read-in-usb4_switch_op.patch create mode 100644 queue-5.6/usb-serial-qcserial-add-dw5816e-support.patch diff --git a/queue-5.6/thunderbolt-check-return-value-of-tb_sw_read-in-usb4_switch_op.patch b/queue-5.6/thunderbolt-check-return-value-of-tb_sw_read-in-usb4_switch_op.patch new file mode 100644 index 00000000000..b944fcba35e --- /dev/null +++ b/queue-5.6/thunderbolt-check-return-value-of-tb_sw_read-in-usb4_switch_op.patch @@ -0,0 +1,35 @@ +From c3bf9930921b33edb31909006607e478751a6f5e Mon Sep 17 00:00:00 2001 +From: Mika Westerberg +Date: Thu, 9 Apr 2020 10:18:10 +0300 +Subject: thunderbolt: Check return value of tb_sw_read() in usb4_switch_op() + +From: Mika Westerberg + +commit c3bf9930921b33edb31909006607e478751a6f5e upstream. + +The function misses checking return value of tb_sw_read() before it +accesses the value that was read. Fix this by checking the return value +first. + +Fixes: b04079837b20 ("thunderbolt: Add initial support for USB4") +Signed-off-by: Mika Westerberg +Reviewed-by: Yehezkel Bernat +Cc: stable +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/thunderbolt/usb4.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/thunderbolt/usb4.c ++++ b/drivers/thunderbolt/usb4.c +@@ -182,6 +182,9 @@ static int usb4_switch_op(struct tb_swit + return ret; + + ret = tb_sw_read(sw, &val, TB_CFG_SWITCH, ROUTER_CS_26, 1); ++ if (ret) ++ return ret; ++ + if (val & ROUTER_CS_26_ONS) + return -EOPNOTSUPP; + diff --git a/queue-5.6/usb-serial-qcserial-add-dw5816e-support.patch b/queue-5.6/usb-serial-qcserial-add-dw5816e-support.patch new file mode 100644 index 00000000000..3587a7d6f2b --- /dev/null +++ b/queue-5.6/usb-serial-qcserial-add-dw5816e-support.patch @@ -0,0 +1,30 @@ +From 78d6de3cfbd342918d31cf68d0d2eda401338aef Mon Sep 17 00:00:00 2001 +From: Matt Jolly +Date: Sun, 3 May 2020 01:03:47 +1000 +Subject: USB: serial: qcserial: Add DW5816e support + +From: Matt Jolly + +commit 78d6de3cfbd342918d31cf68d0d2eda401338aef upstream. + +Add support for Dell Wireless 5816e to drivers/usb/serial/qcserial.c + +Signed-off-by: Matt Jolly +Cc: stable +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/qcserial.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/usb/serial/qcserial.c ++++ b/drivers/usb/serial/qcserial.c +@@ -173,6 +173,7 @@ static const struct usb_device_id id_tab + {DEVICE_SWI(0x413c, 0x81b3)}, /* Dell Wireless 5809e Gobi(TM) 4G LTE Mobile Broadband Card (rev3) */ + {DEVICE_SWI(0x413c, 0x81b5)}, /* Dell Wireless 5811e QDL */ + {DEVICE_SWI(0x413c, 0x81b6)}, /* Dell Wireless 5811e QDL */ ++ {DEVICE_SWI(0x413c, 0x81cc)}, /* Dell Wireless 5816e */ + {DEVICE_SWI(0x413c, 0x81cf)}, /* Dell Wireless 5819 */ + {DEVICE_SWI(0x413c, 0x81d0)}, /* Dell Wireless 5819 */ + {DEVICE_SWI(0x413c, 0x81d1)}, /* Dell Wireless 5818 */ -- 2.47.3