Re: [PATCH v3] dma-mapping: skip USB devices when configuring DMA during probe

2017-08-10 Thread Stefan Wahren
Hi Robin, Am 08.08.2017 um 20:03 schrieb Johan Hovold: > On Sat, Aug 05, 2017 at 10:38:07AM +0200, Christoph Hellwig wrote: >> I think the root problem is that the code added by >> " of/acpi: Configure dma operations at probe time for platform/amba/pci bus >> devices" >> >> is completely bogus and

Re: [PATCH 4/4] dt-bindings: mt8173-xhci: add generic compatible and rename file

2017-08-10 Thread Rob Herring
On Tue, Aug 08, 2017 at 01:42:52PM +0800, Chunfeng Yun wrote: > The mt8173-xhci.txt actually holds the bindings for all mediatek > SoCs with xHCI controller, so add a generic compatible and change > the name to xhci-mtk.txt to reflect that. > > Signed-off-by: Chunfeng Yun > --- > .../bindings/us

Re: [PATCH 3/4] dt-bindings: mt8173-mtu3: add generic compatible and rename file

2017-08-10 Thread Rob Herring
On Tue, Aug 08, 2017 at 01:42:51PM +0800, Chunfeng Yun wrote: > The mt8173-mtu3.txt actually holds the bindings for all mediatek > SoCs with usb3 DRD IP, so add a generic compatible and change the > name to mtu3.txt. > > Signed-off-by: Chunfeng Yun > --- > .../bindings/usb/{mt8173-mtu3.txt => mt

[PATCH v3 2/5] usb: xhci: Fix potential memory leak in xhci_disable_slot()

2017-08-10 Thread Lu Baolu
xhci_disable_slot() allows the invoker to pass a command pointer as paramenter. Otherwise, it will allocate one. This will cause memory leak when a command structure was allocated inside of this function while queuing command trb fails. Another problem comes up when the invoker passed a command poi

[PATCH v3 3/5] usb: xhci: Fix memory leak when xhci_disable_slot() returns error

2017-08-10 Thread Lu Baolu
If xhci_disable_slot() returns success, a disable slot command trb was queued in the command ring. The command completion handler will free the virtual device data structure associated with the slot. On the other hand, when xhci_disable_slot() returns error, the invokers should take the responsibil

[PATCH v3 0/5] usb: xhci: Handle USB transaction error on address command

2017-08-10 Thread Lu Baolu
Xhci driver handles USB transaction errors on transfer events, but transaction errors are possible on address device command completion events as well. The xHCI specification (section 4.6.5) says: A USB Transaction Error Completion Code for an Address Device Command may be due to a Stall response

[PATCH v3 5/5] usb: xhci: Handle USB transaction error on address command

2017-08-10 Thread Lu Baolu
Xhci driver handles USB transaction errors on transfer events, but transaction errors are possible on address device command completion events as well. The xHCI specification (section 4.6.5) says: A USB Transaction Error Completion Code for an Address Device Command may be due to a Stall response

[PATCH v3 4/5] usb: xhci: Return error when host is dead in xhci_disable_slot()

2017-08-10 Thread Lu Baolu
xhci_disable_slot() is a helper for disabling a slot when a device goes away or recovers from error situations. Currently, it returns success when it sees a dead host. This is not the right way to go. It should return error and let the invoker know that disable slot command was failed due to a dead

[PATCH v3 1/5] usb: xhci: Disable slot even virt-dev is null

2017-08-10 Thread Lu Baolu
xhci_disable_slot() is a helper for disabling a slot when a device goes away or recovers from error situations. Currently, it checks the corespoding virt-dev pointer and returns directly (w/o issuing disable slot command) if it's null. This is unnecessary and will cause problems in case where virt

Re: [PATCH v2 1/5] usb: xhci: Disable slot even virt-dev is null

2017-08-10 Thread Lu Baolu
Hi, On 08/10/2017 06:00 PM, Mathias Nyman wrote: > On 10.08.2017 03:35, Lu Baolu wrote: >> Hi, >> >> On 08/09/2017 03:58 PM, Mathias Nyman wrote: >>> On 27.07.2017 05:21, Lu Baolu wrote: xhci_disable_slot() is a helper for disabling a slot when a device goes away or recovers from error s

[PATCH] USB: core: Avoid race of async_completed() w/ usbdev_release()

2017-08-10 Thread Douglas Anderson
While running reboot tests w/ a specific set of USB devices (and slub_debug enabled), I found that once every few hours my device would be crashed with a stack that looked like this: [ 14.012445] BUG: spinlock bad magic on CPU#0, modprobe/2091 [ 14.012460] lock: 0xffc0cb055978, .magic: ff

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-10 Thread Wei Wang
On Thu, Aug 10, 2017 at 11:12 AM, John Stultz wrote: > On Wed, Aug 9, 2017 at 10:41 PM, Wei Wang wrote: >> Hi John, >> >> Is it possible to try the attached patch? > > Thanks so much for the quick turn around! > > So I dropped all the reverts you suggested, and applied this one > against 4.13-rc4

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-10 Thread John Stultz
On Wed, Aug 9, 2017 at 10:41 PM, Wei Wang wrote: > Hi John, > > Is it possible to try the attached patch? Thanks so much for the quick turn around! So I dropped all the reverts you suggested, and applied this one against 4.13-rc4, but I'm still seeing the problematic behavior. > I am not sure i

Re: [PATCH v2 3/3] usb: gadget: udc: renesas_usb3: add support for R-Car M3-W

2017-08-10 Thread Rob Herring
On Fri, Aug 04, 2017 at 11:16:58AM +0900, Yoshihiro Shimoda wrote: > This patch adds support for R-Car M3-W. This patch also adds R-Car > Gen3 generic version's compatible and changes ".compatible" in > the usb3_of_match from "renesas,r8a7796-usb3-peri" to > "renesas,rcar-gen3-usb3-peri". > > Sign

Re: [PATCH 2/3] dt-bindings: usb: keystone-usb: Update bindings pm and clocks properties

2017-08-10 Thread Rob Herring
On Wed, Aug 02, 2017 at 03:17:23PM -0500, Franklin S Cooper Jr wrote: > Update varous properties to properly indicate their requirement depending > on the SoC. > > Signed-off-by: Franklin S Cooper Jr > --- > Documentation/devicetree/bindings/usb/keystone-usb.txt | 18 > -- > 1 f

Re: Need PHY reset after USB device disconnected

2017-08-10 Thread Srinath Mannam
Hi Mathias, Please provide your suggestions to resolve this. Thank you. Regards, Srinath. On Thu, Aug 3, 2017 at 11:42 PM, Srinath Mannam wrote: > Hi Mathias, > > In our SOC, xHCI controller has three ports. In that one is SS and two > HS ports, all ports are connected with separate phy contro

Re: [PATCH 0/3] usb: host: xhci: {plat,rcar}: add support for R-Car H3 ES2.0

2017-08-10 Thread Mathias Nyman
On 24.07.2017 15:30, Yoshihiro Shimoda wrote: This patch set is based on the latest Greg's usb.git / usb-next branch (the commit id = 141769851cb73e8f986e9ed83129cde3b645288d) Yoshihiro Shimoda (3): usb: host: xhci: rcar: Add firmware_name selection by soc_device_match() usb: host: xh

Re: [PATCH v2 1/5] usb: xhci: Disable slot even virt-dev is null

2017-08-10 Thread Mathias Nyman
On 10.08.2017 03:35, Lu Baolu wrote: Hi, On 08/09/2017 03:58 PM, Mathias Nyman wrote: On 27.07.2017 05:21, Lu Baolu wrote: xhci_disable_slot() is a helper for disabling a slot when a device goes away or recovers from error situations. Currently, it checks the corespoding virt-dev pointer and r

Re: [PATCH 0/2] constify hid usb_device_id and fix space before '[' error

2017-08-10 Thread Jiri Kosina
On Wed, 9 Aug 2017, Arvind Yadav wrote: > usb_device_id are not supposed to change at runtime. All functions > working with usb_device_id provided by work with > const usb_device_id. So mark the non-const structs as const. Applied to for-4.14/upstream. -- Jiri Kosina SUSE Labs -- To unsubscri

Re: f_hid.c conversion to the new function interface and crash due to race

2017-08-10 Thread Felipe Balbi
Hi, (please break your lines at 80 columns) Variksla writes: >> On Aug 9, 2017, at 2:56 AM, Felipe Balbi >> wrote: > > Thanks for replying. >> >> >> Hi, >> >> noman pouigt writes: >>> Hello, >>> >>> I am currently using 3.18 linux kernel and getting below >> >> return -EKERNELTOOOLD; >>

Re: device registration callback for usb-serial

2017-08-10 Thread Samuel Thibault
Oliver Neukum, on jeu. 10 août 2017 10:03:51 +0200, wrote: > You cannot make assumptions about driver load. Your driver was loaded. > End of story. Register it with the proper subsystem. The subsystem in question is a line discipline. Registering a line discipline will not trigger applying it to t

Re: device registration callback for usb-serial

2017-08-10 Thread Oliver Neukum
Am Donnerstag, den 10.08.2017, 07:56 +0100 schrieb Okash Khawaja: > Hi, > > struct usb_serial_device has probe and attach callbacks. After attach > is invoked, device minor numbers are allocated and then registered with > driver core. So attach callback doesn't know minor number. > > Can a usb-se