From: Greg Kroah-Hartman Date: Wed, 6 Dec 2017 07:48:04 +0000 (+0100) Subject: 4.14-stable patches X-Git-Tag: v3.18.87~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2f72dd98f9b34e45d3c8278bc521bdab276ec0ef;p=thirdparty%2Fkernel%2Fstable-queue.git 4.14-stable patches added patches: serial-8250_pci-add-amazon-pci-serial-device-id.patch uas-always-apply-us_fl_no_ata_1x-quirk-to-seagate-devices.patch usb-quirks-add-no-lpm-quirk-for-ky-688-usb-3.1-type-c-hub.patch usbip-fix-usb-device-hang-due-to-wrong-enabling-of-scatter-gather.patch usbip-fix-usbip-attach-to-find-a-port-that-matches-the-requested-speed.patch --- diff --git a/queue-4.14/serial-8250_pci-add-amazon-pci-serial-device-id.patch b/queue-4.14/serial-8250_pci-add-amazon-pci-serial-device-id.patch new file mode 100644 index 00000000000..e6c943edc12 --- /dev/null +++ b/queue-4.14/serial-8250_pci-add-amazon-pci-serial-device-id.patch @@ -0,0 +1,34 @@ +From 3bfd1300abfe3adb18e84a89d97a0e82a22124bb Mon Sep 17 00:00:00 2001 +From: Matt Wilson +Date: Mon, 13 Nov 2017 11:31:31 -0800 +Subject: serial: 8250_pci: Add Amazon PCI serial device ID + +From: Matt Wilson + +commit 3bfd1300abfe3adb18e84a89d97a0e82a22124bb upstream. + +This device will be used in future Amazon EC2 instances as the primary +serial port (i.e., data sent to this port will be available via the +GetConsoleOuput [1] EC2 API). + +[1] http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetConsoleOutput.html + +Signed-off-by: Matt Wilson +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/tty/serial/8250/8250_pci.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/tty/serial/8250/8250_pci.c ++++ b/drivers/tty/serial/8250/8250_pci.c +@@ -5137,6 +5137,9 @@ static const struct pci_device_id serial + { PCI_DEVICE(0x1601, 0x0800), .driver_data = pbn_b0_4_1250000 }, + { PCI_DEVICE(0x1601, 0xa801), .driver_data = pbn_b0_4_1250000 }, + ++ /* Amazon PCI serial device */ ++ { PCI_DEVICE(0x1d0f, 0x8250), .driver_data = pbn_b0_1_115200 }, ++ + /* + * These entries match devices with class COMMUNICATION_SERIAL, + * COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL diff --git a/queue-4.14/series b/queue-4.14/series index 4a807c5779a..003c9150879 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -2,3 +2,8 @@ drm-fsl-dcu-avoid-disabling-pixel-clock-twice-on-suspend.patch drm-fsl-dcu-enable-irq-before-drm_atomic_helper_resume.patch drm-amdgpu-use-unsigned-ring-indices-in-amdgpu_queue_mgr_map.patch s390-runtime-instrumentation-simplify-task-exit-handling.patch +usbip-fix-usbip-attach-to-find-a-port-that-matches-the-requested-speed.patch +usbip-fix-usb-device-hang-due-to-wrong-enabling-of-scatter-gather.patch +uas-always-apply-us_fl_no_ata_1x-quirk-to-seagate-devices.patch +usb-quirks-add-no-lpm-quirk-for-ky-688-usb-3.1-type-c-hub.patch +serial-8250_pci-add-amazon-pci-serial-device-id.patch diff --git a/queue-4.14/uas-always-apply-us_fl_no_ata_1x-quirk-to-seagate-devices.patch b/queue-4.14/uas-always-apply-us_fl_no_ata_1x-quirk-to-seagate-devices.patch new file mode 100644 index 00000000000..bba956e7b24 --- /dev/null +++ b/queue-4.14/uas-always-apply-us_fl_no_ata_1x-quirk-to-seagate-devices.patch @@ -0,0 +1,33 @@ +From 7fee72d5e8f1e7b8d8212e28291b1a0243ecf2f1 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Tue, 14 Nov 2017 19:27:22 +0100 +Subject: uas: Always apply US_FL_NO_ATA_1X quirk to Seagate devices + +From: Hans de Goede + +commit 7fee72d5e8f1e7b8d8212e28291b1a0243ecf2f1 upstream. + +We've been adding this as a quirk on a per device basis hoping that +newer disk enclosures would do better, but that has not happened, +so simply apply this quirk to all Seagate devices. + +Signed-off-by: Hans de Goede +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/storage/uas-detect.h | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/usb/storage/uas-detect.h ++++ b/drivers/usb/storage/uas-detect.h +@@ -112,6 +112,10 @@ static int uas_use_uas_driver(struct usb + } + } + ++ /* All Seagate disk enclosures have broken ATA pass-through support */ ++ if (le16_to_cpu(udev->descriptor.idVendor) == 0x0bc2) ++ flags |= US_FL_NO_ATA_1X; ++ + usb_stor_adjust_quirks(udev, &flags); + + if (flags & US_FL_IGNORE_UAS) { diff --git a/queue-4.14/usb-quirks-add-no-lpm-quirk-for-ky-688-usb-3.1-type-c-hub.patch b/queue-4.14/usb-quirks-add-no-lpm-quirk-for-ky-688-usb-3.1-type-c-hub.patch new file mode 100644 index 00000000000..25ecf4d9ee0 --- /dev/null +++ b/queue-4.14/usb-quirks-add-no-lpm-quirk-for-ky-688-usb-3.1-type-c-hub.patch @@ -0,0 +1,34 @@ +From e43a12f1793ae1fe006e26fe9327a8840a92233c Mon Sep 17 00:00:00 2001 +From: Kai-Heng Feng +Date: Tue, 14 Nov 2017 01:31:15 -0500 +Subject: usb: quirks: Add no-lpm quirk for KY-688 USB 3.1 Type-C Hub + +From: Kai-Heng Feng + +commit e43a12f1793ae1fe006e26fe9327a8840a92233c upstream. + +KY-688 USB 3.1 Type-C Hub internally uses a Genesys Logic hub to connect +to Realtek r8153. + +Similar to commit ("7496cfe5431f2 usb: quirks: Add no-lpm quirk for Moshi +USB to Ethernet Adapter"), no-lpm can make r8153 ethernet work. + +Signed-off-by: Kai-Heng Feng +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/core/quirks.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/usb/core/quirks.c ++++ b/drivers/usb/core/quirks.c +@@ -151,6 +151,9 @@ static const struct usb_device_id usb_qu + /* appletouch */ + { USB_DEVICE(0x05ac, 0x021a), .driver_info = USB_QUIRK_RESET_RESUME }, + ++ /* Genesys Logic hub, internally used by KY-688 USB 3.1 Type-C Hub */ ++ { USB_DEVICE(0x05e3, 0x0612), .driver_info = USB_QUIRK_NO_LPM }, ++ + /* Genesys Logic hub, internally used by Moshi USB to Ethernet Adapter */ + { USB_DEVICE(0x05e3, 0x0616), .driver_info = USB_QUIRK_NO_LPM }, + diff --git a/queue-4.14/usbip-fix-usb-device-hang-due-to-wrong-enabling-of-scatter-gather.patch b/queue-4.14/usbip-fix-usb-device-hang-due-to-wrong-enabling-of-scatter-gather.patch new file mode 100644 index 00000000000..0178ed20ac1 --- /dev/null +++ b/queue-4.14/usbip-fix-usb-device-hang-due-to-wrong-enabling-of-scatter-gather.patch @@ -0,0 +1,34 @@ +From 770b2edece42fa55bbe7d4cbe53347a07b8968d4 Mon Sep 17 00:00:00 2001 +From: Yuyang Du +Date: Thu, 30 Nov 2017 10:22:40 +0800 +Subject: usbip: Fix USB device hang due to wrong enabling of scatter-gather + +From: Yuyang Du + +commit 770b2edece42fa55bbe7d4cbe53347a07b8968d4 upstream. + +The previous USB3 SuperSpeed enabling patches mistakenly enabled +URB scatter-gather chaining, which is actually not supported by +the VHCI HCD. This patch fixes that. + +Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=197867 +Fixes: 03cd00d538a6feb ("usbip: vhci-hcd: Set the vhci structure up to work") +Reported-by: Juan Zea +Signed-off-by: Yuyang Du +Acked-by: Shuah Khan +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/usbip/vhci_hcd.c | 1 - + 1 file changed, 1 deletion(-) + +--- a/drivers/usb/usbip/vhci_hcd.c ++++ b/drivers/usb/usbip/vhci_hcd.c +@@ -1112,7 +1112,6 @@ static int hcd_name_to_id(const char *na + static int vhci_setup(struct usb_hcd *hcd) + { + struct vhci *vhci = *((void **)dev_get_platdata(hcd->self.controller)); +- hcd->self.sg_tablesize = ~0; + if (usb_hcd_is_primary_hcd(hcd)) { + vhci->vhci_hcd_hs = hcd_to_vhci_hcd(hcd); + vhci->vhci_hcd_hs->vhci = vhci; diff --git a/queue-4.14/usbip-fix-usbip-attach-to-find-a-port-that-matches-the-requested-speed.patch b/queue-4.14/usbip-fix-usbip-attach-to-find-a-port-that-matches-the-requested-speed.patch new file mode 100644 index 00000000000..faaed123cba --- /dev/null +++ b/queue-4.14/usbip-fix-usbip-attach-to-find-a-port-that-matches-the-requested-speed.patch @@ -0,0 +1,47 @@ +From 1ac7c8a78be85f84b019d3d2742d1a9f07255cc5 Mon Sep 17 00:00:00 2001 +From: Shuah Khan +Date: Wed, 29 Nov 2017 15:24:22 -0700 +Subject: usbip: fix usbip attach to find a port that matches the requested speed + +From: Shuah Khan + +commit 1ac7c8a78be85f84b019d3d2742d1a9f07255cc5 upstream. + +usbip attach fails to find a free port when the device on the first port +is a USB_SPEED_SUPER device and non-super speed device is being attached. +It keeps checking the first port and returns without a match getting stuck +in a loop. + +Fix it check to find the first port with matching speed. + +Reported-by: Juan Zea +Signed-off-by: Shuah Khan +Signed-off-by: Greg Kroah-Hartman + +--- + tools/usb/usbip/libsrc/vhci_driver.c | 14 +++++++++++--- + 1 file changed, 11 insertions(+), 3 deletions(-) + +--- a/tools/usb/usbip/libsrc/vhci_driver.c ++++ b/tools/usb/usbip/libsrc/vhci_driver.c +@@ -329,9 +329,17 @@ err: + int usbip_vhci_get_free_port(uint32_t speed) + { + for (int i = 0; i < vhci_driver->nports; i++) { +- if (speed == USB_SPEED_SUPER && +- vhci_driver->idev[i].hub != HUB_SPEED_SUPER) +- continue; ++ ++ switch (speed) { ++ case USB_SPEED_SUPER: ++ if (vhci_driver->idev[i].hub != HUB_SPEED_SUPER) ++ continue; ++ break; ++ default: ++ if (vhci_driver->idev[i].hub != HUB_SPEED_HIGH) ++ continue; ++ break; ++ } + + if (vhci_driver->idev[i].status == VDEV_ST_NULL) + return vhci_driver->idev[i].port;