[RFT PATCH 2/2] xhci: handle port status events for removed USB3 hcd

2018-09-27 Thread Mathias Nyman
At xhci removal the USB3 hcd (shared_hcd) is removed before the primary USB2 hcd. Interrupts for port status changes may still occur for USB3 ports after the shared_hcd is freed, causing NULL pointer dereference. Check if xhci->shared_hcd is still valid before handing USB3 port events Cc: Repor

[RFT PATCH 1/2] xhci: Fix leaking USB3 shared_hcd at xhci removal

2018-09-27 Thread Mathias Nyman
Ensure that the shared_hcd pointer is valid when calling usb_put_hcd() The shared_hcd is removed and freed in xhci by first calling usb_remove_hcd(xhci->shared_hcd), and later usb_put_hcd(xhci->shared_hcd) Afer commit fe190ed0d602 ("xhci: Do not halt the host until both HCD have disconnected thei

Re: [RFT PATCH 2/2] xhci: handle port status events for removed USB3 hcd

2018-09-27 Thread Mathias Nyman
On 27.09.2018 19:26, Mathias Nyman wrote: At xhci removal the USB3 hcd (shared_hcd) is removed before the primary USB2 hcd. Interrupts for port status changes may still occur for USB3 ports after the shared_hcd is freed, causing NULL pointer dereference. Check if xhci->shared_hcd is still valid

[PATCH] usb: usbtmc: check size before allocating buffer and remove duplicated allocation

2018-09-27 Thread Colin King
From: Colin Ian King Currently the allocation of a buffer is performed before a sanity check on the required buffer size and if the buffer size is too large the error exit return leaks the allocated buffer. Fix this by checking the size before allocating. Also, the same buffer is allocated agai

Re: [RFT PATCH 1/2] xhci: Fix leaking USB3 shared_hcd at xhci removal

2018-09-27 Thread Chunfeng Yun
On Thu, 2018-09-27 at 19:26 +0300, Mathias Nyman wrote: > Ensure that the shared_hcd pointer is valid when calling usb_put_hcd() > > The shared_hcd is removed and freed in xhci by first calling > usb_remove_hcd(xhci->shared_hcd), and later > usb_put_hcd(xhci->shared_hcd) > > Afer commit fe190ed0d

[PATCH] usb: dwc2: disable power_down on rockchip devices

2018-09-27 Thread Hal Emmerich
>From 04fbf78e4e569bf872f1ffcb0a6f9b89569dc913 Mon Sep 17 00:00:00 2001 From: Hal Emmerich Date: Thu, 19 Jul 2018 21:48:08 -0500 Subject: [PATCH] usb: dwc2: disable power_down on rockchip devices  The bug would let the usb controller enter partial power down,  which was formally known as hibernat

RE: [RFT PATCH 2/2] xhci: handle port status events for removed USB3 hcd

2018-09-27 Thread Peter Chen
> > Cc: > > Reported-by: Peter Chen > > Signed-off-by: Mathias Nyman > > --- > > drivers/usb/host/xhci-ring.c | 7 +++ > > 1 file changed, 7 insertions(+) > > > > diff --git a/drivers/usb/host/xhci-ring.c > > b/drivers/usb/host/xhci-ring.c index f0a99aa..3d314b8 100644 > > --- a/drivers

RE: [RFT PATCH 1/2] xhci: Fix leaking USB3 shared_hcd at xhci removal

2018-09-27 Thread Peter Chen
> Ensure that the shared_hcd pointer is valid when calling usb_put_hcd() > > The shared_hcd is removed and freed in xhci by first calling > usb_remove_hcd(xhci- > >shared_hcd), and later > usb_put_hcd(xhci->shared_hcd) > > Afer commit fe190ed0d602 ("xhci: Do not halt the host until both HCD ha

Re: [PATCH 2/5] usb: host: Add OHCI driver for Broadcom STB SoCs

2018-09-27 Thread Arnd Bergmann
On Thu, Sep 27, 2018 at 12:20 AM Al Cooper wrote: > > This driver enables USB OHCI on Broadcom ARM and MIPS STB SoCs. > The drivers depend on a matching "brcm,brcmstb-usb-phy" > Broadcom STB USB Phy driver. > > The standard platform driver can't be used because of differences > in PHY and Clock ha

Re: [PATCH 2/2] usb: typec: fusb302: Resolve fixed power role contract setup

2018-09-27 Thread Heikki Krogerus
On Wed, Sep 26, 2018 at 04:23:52PM +0100, Adam Thomson wrote: > When the controller is configured for a fixed power role (Source > only or Sink only), attach does not proceed within the TCPM state > machine as there is no CC event generated by this driver to update > the CC line status. > > To rec

Re: [PATCH 1/2] usb: typec: fusb302: Correct spelling mistake for toggling state

2018-09-27 Thread Heikki Krogerus
On Wed, Sep 26, 2018 at 04:23:51PM +0100, Adam Thomson wrote: > There's a typo in the enum name of the 'OFF' state for toggling > (TOGGLINE instead of TOGGLING). This commit resolves that trivial > spelling inconsistency. > > Signed-off-by: Adam Thomson Reviewed-by: Heikki Krogerus > --- > d

Re: [PATCH] usb: dwc2: Fix HiKey regression caused by power_down feature

2018-09-27 Thread Artur Petrosyan
Hi John, On 9/25/2018 21:59, John Stultz wrote: > On Tue, Sep 25, 2018 at 3:04 AM, Artur Petrosyan > wrote: >> Just a clarification by this commit "[PATCH] usb: dwc2: Fix HiKey >> regression caused by power_down feature" >> https://urldefense.proofpoint.com/v2/url?u=https-3A__marc.info_-3Fl-3Dlin

[PATCH] dt-bindings: usb: renesas_usbhs: Add support for r8a7744

2018-09-27 Thread Biju Das
Document support for RZ/G1N (R8A7744) SoC. Signed-off-by: Biju Das Reviewed-by: Chris Paterson --- This patch is tested against linux-next next-20180927 and usb-next --- Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation

[PATCH] dt-bindings: usb-xhci: Document r8a7744 support

2018-09-27 Thread Biju Das
Document r8a7744 xhci support. The driver will use the fallback compatible string "renesas,rcar-gen2-xhci", therefore no driver change is needed. Signed-off-by: Biju Das Reviewed-by: Chris Paterson --- This patch is tested against linux-next next-20180927 and usb-next --- Doc

[PATCH] usb: hub: try old enumeration scheme first for high speed devices

2018-09-27 Thread Zeng Tao
The new scheme is required just to support legacy low and full-speed devices. For high speed devices, it will slower the enumeration speed. So in this patch we try the "old" enumeration scheme first for high speed devices, and this is what Windows does since Windows 8. Signed-off-by: Zeng Tao Ack

RE: [PATCH v3] usb: hub: try old enumeration scheme first for high speed devices

2018-09-27 Thread Zengtao (B)
Hi greg: Sorry for the late response, I have applied the tags and resend, please receive it and check Thx Zengtao >-Original Message- >From: Greg KH [mailto:gre...@linuxfoundation.org] >Sent: Thursday, September 20, 2018 6:38 PM >To: Roger Quadros >Cc: Zengtao (B) ; st...@rowland.harv