From: Greg Kroah-Hartman Date: Mon, 7 Nov 2016 16:52:16 +0000 (+0100) Subject: 4.8-stable patches X-Git-Tag: v4.4.31~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=de981ca9d0b4a79514926ef8682df978dd9b5d78;p=thirdparty%2Fkernel%2Fstable-queue.git 4.8-stable patches added patches: mei-txe-don-t-clean-an-unprocessed-interrupt-cause.patch tty-serial-at91-fix-hardware-handshake-on-atmel-platforms.patch usb-gadget-function-u_ether-don-t-starve-tx-request-queue.patch usb-gadget-udc-atmel-fix-endpoint-name.patch usb-increase-ohci-watchdog-delay-to-275-msec.patch usb-renesas_usbhs-add-wait-after-initialization-for-r-car-gen3.patch usb-serial-cp210x-fix-tiocmget-error-handling.patch usb-serial-fix-potential-null-dereference-at-probe.patch usb-serial-ftdi_sio-add-support-for-infineon-triboard-tc2x7.patch xhci-use-default-usb_resume_timeout-when-resuming-ports.patch --- diff --git a/queue-4.8/mei-txe-don-t-clean-an-unprocessed-interrupt-cause.patch b/queue-4.8/mei-txe-don-t-clean-an-unprocessed-interrupt-cause.patch new file mode 100644 index 00000000000..4948187f1cc --- /dev/null +++ b/queue-4.8/mei-txe-don-t-clean-an-unprocessed-interrupt-cause.patch @@ -0,0 +1,45 @@ +From 43605e293eb13c07acb546c14f407a271837af17 Mon Sep 17 00:00:00 2001 +From: Alexander Usyskin +Date: Wed, 19 Oct 2016 01:34:48 +0300 +Subject: mei: txe: don't clean an unprocessed interrupt cause. + +From: Alexander Usyskin + +commit 43605e293eb13c07acb546c14f407a271837af17 upstream. + +SEC registers are not accessible when the TXE device is in low power +state, hence the SEC interrupt cannot be processed if device is not +awake. + +In some rare cases entrance to low power state (aliveness off) and input +ready bits can be signaled at the same time, resulting in communication +stall as input ready won't be signaled again after waking up. To resolve +this IPC_HHIER_SEC bit in HHISR_REG should not be cleaned if the +interrupt is not processed. + +Signed-off-by: Alexander Usyskin +Signed-off-by: Tomas Winkler +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/misc/mei/hw-txe.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/drivers/misc/mei/hw-txe.c ++++ b/drivers/misc/mei/hw-txe.c +@@ -978,11 +978,13 @@ static bool mei_txe_check_and_ack_intrs( + hisr = mei_txe_br_reg_read(hw, HISR_REG); + + aliveness = mei_txe_aliveness_get(dev); +- if (hhisr & IPC_HHIER_SEC && aliveness) ++ if (hhisr & IPC_HHIER_SEC && aliveness) { + ipc_isr = mei_txe_sec_reg_read_silent(hw, + SEC_IPC_HOST_INT_STATUS_REG); +- else ++ } else { + ipc_isr = 0; ++ hhisr &= ~IPC_HHIER_SEC; ++ } + + generated = generated || + (hisr & HISR_INT_STS_MSK) || diff --git a/queue-4.8/series b/queue-4.8/series index 675240ad475..c0746847ea8 100644 --- a/queue-4.8/series +++ b/queue-4.8/series @@ -46,3 +46,13 @@ timers-plug-locking-race-vs.-timer-migration.patch timers-lock-base-for-same-bucket-optimization.patch ubifs-abort-readdir-upon-error.patch ubifs-fix-regression-in-ubifs_readdir.patch +mei-txe-don-t-clean-an-unprocessed-interrupt-cause.patch +usb-gadget-udc-atmel-fix-endpoint-name.patch +usb-gadget-function-u_ether-don-t-starve-tx-request-queue.patch +usb-serial-fix-potential-null-dereference-at-probe.patch +usb-serial-cp210x-fix-tiocmget-error-handling.patch +usb-serial-ftdi_sio-add-support-for-infineon-triboard-tc2x7.patch +tty-serial-at91-fix-hardware-handshake-on-atmel-platforms.patch +xhci-use-default-usb_resume_timeout-when-resuming-ports.patch +usb-renesas_usbhs-add-wait-after-initialization-for-r-car-gen3.patch +usb-increase-ohci-watchdog-delay-to-275-msec.patch diff --git a/queue-4.8/tty-serial-at91-fix-hardware-handshake-on-atmel-platforms.patch b/queue-4.8/tty-serial-at91-fix-hardware-handshake-on-atmel-platforms.patch new file mode 100644 index 00000000000..72cb4e517e3 --- /dev/null +++ b/queue-4.8/tty-serial-at91-fix-hardware-handshake-on-atmel-platforms.patch @@ -0,0 +1,125 @@ +From 9bcffe7575b721d7b6d9b3090fe18809d9806e78 Mon Sep 17 00:00:00 2001 +From: Richard Genoud +Date: Thu, 27 Oct 2016 18:04:06 +0200 +Subject: tty/serial: at91: fix hardware handshake on Atmel platforms +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Richard Genoud + +commit 9bcffe7575b721d7b6d9b3090fe18809d9806e78 upstream. + +After commit 1cf6e8fc8341 ("tty/serial: at91: fix RTS line management +when hardware handshake is enabled"), the hardware handshake wasn't +functional anymore on Atmel platforms (beside SAMA5D2). + +To understand why, one has to understand the flag ATMEL_US_USMODE_HWHS +first: +Before commit 1cf6e8fc8341 ("tty/serial: at91: fix RTS line management +when hardware handshake is enabled"), this flag was never set. +Thus, the CTS/RTS where only handled by serial_core (and everything +worked just fine). + +This commit introduced the use of the ATMEL_US_USMODE_HWHS flag, +enabling it for all boards when the user space enables flow control. + +When the ATMEL_US_USMODE_HWHS is set, the Atmel USART controller +handles a part of the flow control job: +- disable the transmitter when the CTS pin gets high. +- drive the RTS pin high when the DMA buffer transfer is completed or + PDC RX buffer full or RX FIFO is beyond threshold. (depending on the + controller version). + +NB: This feature is *not* mandatory for the flow control to work. +(Nevertheless, it's very useful if low latencies are needed.) + +Now, the specifics of the ATMEL_US_USMODE_HWHS flag: + +- For platforms with DMAC and no FIFOs (sam9x25, sam9x35, sama5D3, +sama5D4, sam9g15, sam9g25, sam9g35)* this feature simply doesn't work. +( source: https://lkml.org/lkml/2016/9/7/598 ) +Tested it on sam9g35, the RTS pins always stays up, even when RXEN=1 +or a new DMA transfer descriptor is set. +=> ATMEL_US_USMODE_HWHS must not be used for those platforms + +- For platforms with a PDC (sam926{0,1,3}, sam9g10, sam9g20, sam9g45, +sam9g46)*, there's another kind of problem. Once the flag +ATMEL_US_USMODE_HWHS is set, the RTS pin can't be driven anymore via +RTSEN/RTSDIS in USART Control Register. The RTS pin can only be driven +by enabling/disabling the receiver or setting RCR=RNCR=0 in the PDC +(Receive (Next) Counter Register). +=> Doing this is beyond the scope of this patch and could add other +bugs, so the original (and working) behaviour should be set for those +platforms (meaning ATMEL_US_USMODE_HWHS flag should be unset). + +- For platforms with a FIFO (sama5d2)*, the RTS pin is driven according +to the RX FIFO thresholds, and can be also driven by RTSEN/RTSDIS in +USART Control Register. No problem here. +(This was the use case of commit 1cf6e8fc8341 ("tty/serial: at91: fix +RTS line management when hardware handshake is enabled")) +NB: If the CTS pin declared as a GPIO in the DTS, (for instance +cts-gpios = <&pioA PIN_PB31 GPIO_ACTIVE_LOW>), the transmitter will be +disabled. +=> ATMEL_US_USMODE_HWHS flag can be set for this platform ONLY IF the +CTS pin is not a GPIO. + +So, the only case when ATMEL_US_USMODE_HWHS can be enabled is when +(atmel_use_fifo(port) && + !mctrl_gpio_to_gpiod(atmel_port->gpios, UART_GPIO_CTS)) + +Tested on all Atmel USART controller flavours: +AT91SAM9G35-CM (DMAC flavour), AT91SAM9G20-EK (PDC flavour), +SAMA5D2xplained (FIFO flavour). + +* the list may not be exhaustive + +Fixes: 1cf6e8fc8341 ("tty/serial: at91: fix RTS line management when hardware handshake is enabled") +Signed-off-by: Richard Genoud +Acked-by: Alexandre Belloni +Acked-by: Cyrille Pitchen +Acked-by: Uwe Kleine-König +Acked-by: Nicolas Ferre +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/tty/serial/atmel_serial.c | 26 ++++++++++++++++++++++---- + 1 file changed, 22 insertions(+), 4 deletions(-) + +--- a/drivers/tty/serial/atmel_serial.c ++++ b/drivers/tty/serial/atmel_serial.c +@@ -2129,11 +2129,29 @@ static void atmel_set_termios(struct uar + mode |= ATMEL_US_USMODE_RS485; + } else if (termios->c_cflag & CRTSCTS) { + /* RS232 with hardware handshake (RTS/CTS) */ +- if (atmel_use_dma_rx(port) && !atmel_use_fifo(port)) { +- dev_info(port->dev, "not enabling hardware flow control because DMA is used"); +- termios->c_cflag &= ~CRTSCTS; +- } else { ++ if (atmel_use_fifo(port) && ++ !mctrl_gpio_to_gpiod(atmel_port->gpios, UART_GPIO_CTS)) { ++ /* ++ * with ATMEL_US_USMODE_HWHS set, the controller will ++ * be able to drive the RTS pin high/low when the RX ++ * FIFO is above RXFTHRES/below RXFTHRES2. ++ * It will also disable the transmitter when the CTS ++ * pin is high. ++ * This mode is not activated if CTS pin is a GPIO ++ * because in this case, the transmitter is always ++ * disabled (there must be an internal pull-up ++ * responsible for this behaviour). ++ * If the RTS pin is a GPIO, the controller won't be ++ * able to drive it according to the FIFO thresholds, ++ * but it will be handled by the driver. ++ */ + mode |= ATMEL_US_USMODE_HWHS; ++ } else { ++ /* ++ * For platforms without FIFO, the flow control is ++ * handled by the driver. ++ */ ++ mode |= ATMEL_US_USMODE_NORMAL; + } + } else { + /* RS232 without hadware handshake */ diff --git a/queue-4.8/usb-gadget-function-u_ether-don-t-starve-tx-request-queue.patch b/queue-4.8/usb-gadget-function-u_ether-don-t-starve-tx-request-queue.patch new file mode 100644 index 00000000000..d1b908159eb --- /dev/null +++ b/queue-4.8/usb-gadget-function-u_ether-don-t-starve-tx-request-queue.patch @@ -0,0 +1,43 @@ +From 6c83f77278f17a7679001027e9231291c20f0d8a Mon Sep 17 00:00:00 2001 +From: Felipe Balbi +Date: Tue, 4 Oct 2016 15:14:43 +0300 +Subject: usb: gadget: function: u_ether: don't starve tx request queue +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Felipe Balbi + +commit 6c83f77278f17a7679001027e9231291c20f0d8a upstream. + +If we don't guarantee that we will always get an +interrupt at least when we're queueing our very last +request, we could fall into situation where we queue +every request with 'no_interrupt' set. This will +cause the link to get stuck. + +The behavior above has been triggered with g_ether +and dwc3. + +Reported-by: Ville Syrjälä +Signed-off-by: Felipe Balbi +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/gadget/function/u_ether.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/drivers/usb/gadget/function/u_ether.c ++++ b/drivers/usb/gadget/function/u_ether.c +@@ -587,8 +587,9 @@ static netdev_tx_t eth_start_xmit(struct + + /* throttle high/super speed IRQ rate back slightly */ + if (gadget_is_dualspeed(dev->gadget)) +- req->no_interrupt = (dev->gadget->speed == USB_SPEED_HIGH || +- dev->gadget->speed == USB_SPEED_SUPER) ++ req->no_interrupt = (((dev->gadget->speed == USB_SPEED_HIGH || ++ dev->gadget->speed == USB_SPEED_SUPER)) && ++ !list_empty(&dev->tx_reqs)) + ? ((atomic_read(&dev->tx_qlen) % dev->qmult) != 0) + : 0; + diff --git a/queue-4.8/usb-gadget-udc-atmel-fix-endpoint-name.patch b/queue-4.8/usb-gadget-udc-atmel-fix-endpoint-name.patch new file mode 100644 index 00000000000..e9293873c50 --- /dev/null +++ b/queue-4.8/usb-gadget-udc-atmel-fix-endpoint-name.patch @@ -0,0 +1,59 @@ +From bbe097f092b0d13e9736bd2794d0ab24547d0e5d Mon Sep 17 00:00:00 2001 +From: Alexandre Belloni +Date: Thu, 15 Sep 2016 17:07:22 +0200 +Subject: usb: gadget: udc: atmel: fix endpoint name + +From: Alexandre Belloni + +commit bbe097f092b0d13e9736bd2794d0ab24547d0e5d upstream. + +Since commit c32b5bcfa3c4 ("ARM: dts: at91: Fix USB endpoint nodes"), +atmel_usba_udc fails with: + +------------[ cut here ]------------ +WARNING: CPU: 0 PID: 0 at include/linux/usb/gadget.h:405 +ecm_do_notify+0x188/0x1a0 +Modules linked in: +CPU: 0 PID: 0 Comm: swapper Not tainted 4.7.0+ #15 +Hardware name: Atmel SAMA5 +[] (unwind_backtrace) from [] (show_stack+0x10/0x14) +[] (show_stack) from [] (__warn+0xe4/0xfc) +[] (__warn) from [] (warn_slowpath_null+0x20/0x28) +[] (warn_slowpath_null) from [] (ecm_do_notify+0x188/0x1a0) +[] (ecm_do_notify) from [] (ecm_set_alt+0x74/0x1ac) +[] (ecm_set_alt) from [] (composite_setup+0xfc0/0x19f8) +[] (composite_setup) from [] (usba_udc_irq+0x8f4/0xd9c) +[] (usba_udc_irq) from [] (handle_irq_event_percpu+0x9c/0x158) +[] (handle_irq_event_percpu) from [] (handle_irq_event+0x28/0x3c) +[] (handle_irq_event) from [] (handle_fasteoi_irq+0xa0/0x168) +[] (handle_fasteoi_irq) from [] (generic_handle_irq+0x24/0x34) +[] (generic_handle_irq) from [] (__handle_domain_irq+0x54/0xa8) +[] (__handle_domain_irq) from [] (__irq_svc+0x54/0x70) +[] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) +[] (arch_cpu_idle) from [] (cpu_startup_entry+0x9c/0xdc) +[] (cpu_startup_entry) from [] (start_kernel+0x354/0x360) +[] (start_kernel) from [<20008078>] (0x20008078) +---[ end trace e7cf9dcebf4815a6 ]--- + +Fixes: c32b5bcfa3c4 ("ARM: dts: at91: Fix USB endpoint nodes") +Reported-by: Richard Genoud +Acked-by: Nicolas Ferre +Signed-off-by: Alexandre Belloni +Signed-off-by: Felipe Balbi +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/gadget/udc/atmel_usba_udc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/gadget/udc/atmel_usba_udc.c ++++ b/drivers/usb/gadget/udc/atmel_usba_udc.c +@@ -1978,7 +1978,7 @@ static struct usba_ep * atmel_udc_of_ini + dev_err(&pdev->dev, "of_probe: name error(%d)\n", ret); + goto err; + } +- ep->ep.name = name; ++ ep->ep.name = kasprintf(GFP_KERNEL, "ep%d", ep->index); + + ep->ep_regs = udc->regs + USBA_EPT_BASE(i); + ep->dma_regs = udc->regs + USBA_DMA_BASE(i); diff --git a/queue-4.8/usb-increase-ohci-watchdog-delay-to-275-msec.patch b/queue-4.8/usb-increase-ohci-watchdog-delay-to-275-msec.patch new file mode 100644 index 00000000000..de33ef5912c --- /dev/null +++ b/queue-4.8/usb-increase-ohci-watchdog-delay-to-275-msec.patch @@ -0,0 +1,33 @@ +From ed6d6f8f42d7302f6f9b6245f34927ec20d26c12 Mon Sep 17 00:00:00 2001 +From: Bryan Paluch +Date: Mon, 17 Oct 2016 08:54:46 -0400 +Subject: usb: increase ohci watchdog delay to 275 msec + +From: Bryan Paluch + +commit ed6d6f8f42d7302f6f9b6245f34927ec20d26c12 upstream. + +Increase ohci watchout delay to 275 ms. Previous delay was 250 ms +with 20 ms of slack, after removing slack time some ohci controllers don't +respond in time. Logs from systems with controllers that have the +issue would show "HcDoneHead not written back; disabled" + +Signed-off-by: Bryan Paluch +Acked-by: Alan Stern +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/ohci-hcd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/host/ohci-hcd.c ++++ b/drivers/usb/host/ohci-hcd.c +@@ -72,7 +72,7 @@ + static const char hcd_name [] = "ohci_hcd"; + + #define STATECHANGE_DELAY msecs_to_jiffies(300) +-#define IO_WATCHDOG_DELAY msecs_to_jiffies(250) ++#define IO_WATCHDOG_DELAY msecs_to_jiffies(275) + + #include "ohci.h" + #include "pci-quirks.h" diff --git a/queue-4.8/usb-renesas_usbhs-add-wait-after-initialization-for-r-car-gen3.patch b/queue-4.8/usb-renesas_usbhs-add-wait-after-initialization-for-r-car-gen3.patch new file mode 100644 index 00000000000..396f95d79ca --- /dev/null +++ b/queue-4.8/usb-renesas_usbhs-add-wait-after-initialization-for-r-car-gen3.patch @@ -0,0 +1,49 @@ +From b76032396d7958f006bccf5fb2535beb5526837c Mon Sep 17 00:00:00 2001 +From: Yoshihiro Shimoda +Date: Thu, 20 Oct 2016 13:19:19 +0900 +Subject: usb: renesas_usbhs: add wait after initialization for R-Car Gen3 + +From: Yoshihiro Shimoda + +commit b76032396d7958f006bccf5fb2535beb5526837c upstream. + +Since the controller on R-Car Gen3 doesn't have any status registers +to detect initialization (LPSTS.SUSPM = 1) and the initialization needs +up to 45 usec, this patch adds wait after the initialization. Otherwise, +writing other registers (e.g. INTENB0) will fail. + +Fixes: de18757e272d ("usb: renesas_usbhs: add R-Car Gen3 power control") +Cc: +Signed-off-by: Yoshihiro Shimoda +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/renesas_usbhs/rcar3.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +--- a/drivers/usb/renesas_usbhs/rcar3.c ++++ b/drivers/usb/renesas_usbhs/rcar3.c +@@ -9,6 +9,7 @@ + * + */ + ++#include + #include + #include "common.h" + #include "rcar3.h" +@@ -35,10 +36,13 @@ static int usbhs_rcar3_power_ctrl(struct + + usbhs_write32(priv, UGCTRL2, UGCTRL2_RESERVED_3 | UGCTRL2_USB0SEL_OTG); + +- if (enable) ++ if (enable) { + usbhs_bset(priv, LPSTS, LPSTS_SUSPM, LPSTS_SUSPM); +- else ++ /* The controller on R-Car Gen3 needs to wait up to 45 usec */ ++ udelay(45); ++ } else { + usbhs_bset(priv, LPSTS, LPSTS_SUSPM, 0); ++ } + + return 0; + } diff --git a/queue-4.8/usb-serial-cp210x-fix-tiocmget-error-handling.patch b/queue-4.8/usb-serial-cp210x-fix-tiocmget-error-handling.patch new file mode 100644 index 00000000000..b9ef3cf1d17 --- /dev/null +++ b/queue-4.8/usb-serial-cp210x-fix-tiocmget-error-handling.patch @@ -0,0 +1,34 @@ +From de24e0a108bc48062e1c7acaa97014bce32a919f Mon Sep 17 00:00:00 2001 +From: Johan Hovold +Date: Wed, 19 Oct 2016 15:45:07 +0200 +Subject: USB: serial: cp210x: fix tiocmget error handling + +From: Johan Hovold + +commit de24e0a108bc48062e1c7acaa97014bce32a919f upstream. + +The current tiocmget implementation would fail to report errors up the +stack and instead leaked a few bits from the stack as a mask of +modem-status flags. + +Fixes: 39a66b8d22a3 ("[PATCH] USB: CP2101 Add support for flow control") +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/cp210x.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/usb/serial/cp210x.c ++++ b/drivers/usb/serial/cp210x.c +@@ -1077,7 +1077,9 @@ static int cp210x_tiocmget(struct tty_st + u8 control; + int result; + +- cp210x_read_u8_reg(port, CP210X_GET_MDMSTS, &control); ++ result = cp210x_read_u8_reg(port, CP210X_GET_MDMSTS, &control); ++ if (result) ++ return result; + + result = ((control & CONTROL_DTR) ? TIOCM_DTR : 0) + |((control & CONTROL_RTS) ? TIOCM_RTS : 0) diff --git a/queue-4.8/usb-serial-fix-potential-null-dereference-at-probe.patch b/queue-4.8/usb-serial-fix-potential-null-dereference-at-probe.patch new file mode 100644 index 00000000000..1c26e704b5c --- /dev/null +++ b/queue-4.8/usb-serial-fix-potential-null-dereference-at-probe.patch @@ -0,0 +1,36 @@ +From 126d26f66d9890a69158812a6caa248c05359daa Mon Sep 17 00:00:00 2001 +From: Johan Hovold +Date: Fri, 21 Oct 2016 12:56:27 +0200 +Subject: USB: serial: fix potential NULL-dereference at probe + +From: Johan Hovold + +commit 126d26f66d9890a69158812a6caa248c05359daa upstream. + +Make sure we have at least one port before attempting to register a +console. + +Currently, at least one driver binds to a "dummy" interface and requests +zero ports for it. Should such an interface also lack endpoints, we get +a NULL-deref during probe. + +Fixes: e5b1e2062e05 ("USB: serial: make minor allocation dynamic") +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/usb-serial.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/usb/serial/usb-serial.c ++++ b/drivers/usb/serial/usb-serial.c +@@ -1078,7 +1078,8 @@ static int usb_serial_probe(struct usb_i + + serial->disconnected = 0; + +- usb_serial_console_init(serial->port[0]->minor); ++ if (num_ports > 0) ++ usb_serial_console_init(serial->port[0]->minor); + exit: + module_put(type->driver.owner); + return 0; diff --git a/queue-4.8/usb-serial-ftdi_sio-add-support-for-infineon-triboard-tc2x7.patch b/queue-4.8/usb-serial-ftdi_sio-add-support-for-infineon-triboard-tc2x7.patch new file mode 100644 index 00000000000..e0b6dc7a368 --- /dev/null +++ b/queue-4.8/usb-serial-ftdi_sio-add-support-for-infineon-triboard-tc2x7.patch @@ -0,0 +1,48 @@ +From ca006f785fbfd7a5c901900bd3fe2b26e946a1ee Mon Sep 17 00:00:00 2001 +From: Stefan Tauner +Date: Thu, 6 Oct 2016 18:40:11 +0200 +Subject: USB: serial: ftdi_sio: add support for Infineon TriBoard TC2X7 + +From: Stefan Tauner + +commit ca006f785fbfd7a5c901900bd3fe2b26e946a1ee upstream. + +This adds support to ftdi_sio for the Infineon TriBoard TC2X7 +engineering board for first-generation Aurix SoCs with Tricore CPUs. +Mere addition of the device IDs does the job. + +Signed-off-by: Stefan Tauner +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/ftdi_sio.c | 3 ++- + drivers/usb/serial/ftdi_sio_ids.h | 5 +++-- + 2 files changed, 5 insertions(+), 3 deletions(-) + +--- a/drivers/usb/serial/ftdi_sio.c ++++ b/drivers/usb/serial/ftdi_sio.c +@@ -986,7 +986,8 @@ static const struct usb_device_id id_tab + /* ekey Devices */ + { USB_DEVICE(FTDI_VID, FTDI_EKEY_CONV_USB_PID) }, + /* Infineon Devices */ +- { USB_DEVICE_INTERFACE_NUMBER(INFINEON_VID, INFINEON_TRIBOARD_PID, 1) }, ++ { USB_DEVICE_INTERFACE_NUMBER(INFINEON_VID, INFINEON_TRIBOARD_TC1798_PID, 1) }, ++ { USB_DEVICE_INTERFACE_NUMBER(INFINEON_VID, INFINEON_TRIBOARD_TC2X7_PID, 1) }, + /* GE Healthcare devices */ + { USB_DEVICE(GE_HEALTHCARE_VID, GE_HEALTHCARE_NEMO_TRACKER_PID) }, + /* Active Research (Actisense) devices */ +--- a/drivers/usb/serial/ftdi_sio_ids.h ++++ b/drivers/usb/serial/ftdi_sio_ids.h +@@ -626,8 +626,9 @@ + /* + * Infineon Technologies + */ +-#define INFINEON_VID 0x058b +-#define INFINEON_TRIBOARD_PID 0x0028 /* DAS JTAG TriBoard TC1798 V1.0 */ ++#define INFINEON_VID 0x058b ++#define INFINEON_TRIBOARD_TC1798_PID 0x0028 /* DAS JTAG TriBoard TC1798 V1.0 */ ++#define INFINEON_TRIBOARD_TC2X7_PID 0x0043 /* DAS JTAG TriBoard TC2X7 V1.0 */ + + /* + * Acton Research Corp. diff --git a/queue-4.8/xhci-use-default-usb_resume_timeout-when-resuming-ports.patch b/queue-4.8/xhci-use-default-usb_resume_timeout-when-resuming-ports.patch new file mode 100644 index 00000000000..cad3e64ce07 --- /dev/null +++ b/queue-4.8/xhci-use-default-usb_resume_timeout-when-resuming-ports.patch @@ -0,0 +1,43 @@ +From 7d3b016a6f5a0fa610dfd02b05654c08fa4ae514 Mon Sep 17 00:00:00 2001 +From: Mathias Nyman +Date: Thu, 20 Oct 2016 18:09:20 +0300 +Subject: xhci: use default USB_RESUME_TIMEOUT when resuming ports. + +From: Mathias Nyman + +commit 7d3b016a6f5a0fa610dfd02b05654c08fa4ae514 upstream. + +USB2 host inititated resume, and system suspend bus resume +need to use the same USB_RESUME_TIMEOUT as elsewhere. + +This resolves a device disconnect issue at system resume seen +on Intel Braswell and Apollolake, but is in no way limited to +those platforms. + +Signed-off-by: Mathias Nyman +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/xhci-hub.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/usb/host/xhci-hub.c ++++ b/drivers/usb/host/xhci-hub.c +@@ -1166,7 +1166,7 @@ int xhci_hub_control(struct usb_hcd *hcd + xhci_set_link_state(xhci, port_array, wIndex, + XDEV_RESUME); + spin_unlock_irqrestore(&xhci->lock, flags); +- msleep(20); ++ msleep(USB_RESUME_TIMEOUT); + spin_lock_irqsave(&xhci->lock, flags); + xhci_set_link_state(xhci, port_array, wIndex, + XDEV_U0); +@@ -1410,7 +1410,7 @@ int xhci_bus_resume(struct usb_hcd *hcd) + + if (need_usb2_u3_exit) { + spin_unlock_irqrestore(&xhci->lock, flags); +- msleep(20); ++ msleep(USB_RESUME_TIMEOUT); + spin_lock_irqsave(&xhci->lock, flags); + } +