Re: [PATCH] net: hso: register netdev later to avoid a race condition

2017-04-27 Thread Johan Hovold
On Wed, Apr 26, 2017 at 07:26:40PM +0200, Andreas Kemnade wrote: > If the netdev is accessed before the urbs are initialized, > there will be NULL pointer dereferences. That is avoided by > registering it when it is fully initialized. > Reported-by: H. Nikolaus Schaller > Signed-off-by: Andreas K

[PATCH] usb: gadget: udc-xilinx: clean up a variable name

2017-04-27 Thread Dan Carpenter
"ep->udc->lock" and "udc->lock" are the same thing. It confuses Smatch if we don't use the same name consistently. Signed-off-by: Dan Carpenter diff --git a/drivers/usb/gadget/udc/udc-xilinx.c b/drivers/usb/gadget/udc/udc-xilinx.c index 588e2531b8b8..de207a90571e 100644 --- a/drivers/usb/gadge

Re: [PATCH 1/1] usb: host: xhci-ring: don't need to clear interrupt pending for MSI enabled hcd

2017-04-27 Thread Peter Chen
On Mon, Apr 17, 2017 at 04:20:43PM +0800, Peter Chen wrote: > According to xHCI spec Figure 30: Interrupt Throttle Flow Diagram > > If PCI Message Signaled Interrupts (MSI or MSI-X) are enabled, > then the assertion of the Interrupt Pending (IP) flag in Figure > 30 >

Re: [PATCH, 3.18-stable regression] gadgetfs: fix uninitialized variable in error handling

2017-04-27 Thread Greg KH
On Fri, Apr 21, 2017 at 03:06:12PM +0200, Arnd Bergmann wrote: > gcc warns about a bug in 3.18.y: > > drivers/usb/gadget/legacy/inode.c:648:10: warning: 'value' may be used > > This is caused by the backport of f01d35a15fa0416 from 4.0 to 3.18: > c81fc59be42c6e0 gadgetfs: use-after-free in ->aio_

[PATCH] usb: musb: musb_host: Introduce postponed URB giveback

2017-04-27 Thread Matwey V. Kornilov
This commit changes the order of actions undertaken in musb_advance_schedule() in order to overcome issue with broken isochronous transfer [1]. There is no harm to split musb_giveback into two pieces. The first unlinks finished urb, the second givebacks it. The issue here that givebacking may be

Re: [PATCH 1/1] usb: host: xhci-ring: don't need to clear interrupt pending for MSI enabled hcd

2017-04-27 Thread Mathias Nyman
Hi On 27.04.2017 12:49, Peter Chen wrote: On Mon, Apr 17, 2017 at 04:20:43PM +0800, Peter Chen wrote: According to xHCI spec Figure 30: Interrupt Throttle Flow Diagram If PCI Message Signaled Interrupts (MSI or MSI-X) are enabled, then the assertion of the Interrupt Pen

[PATCH 0/2] usb: dwc2: Replace polling code with function calls

2017-04-27 Thread Sevak Arakelyan
This series moves dwc2_hsotg_wait_bit_set polling function to core.c and replaces all the register polling parts of code with function calls Tested on HAPS platform with DWC_hsotg IP version 3.30a. Sevak Arakelyan (2): usb: dwc2: Move polling function to core.c. usb: dwc2: Use common polling

[PATCH 1/2] usb: dwc2: Move polling function to core.c.

2017-04-27 Thread Sevak Arakelyan
Move polling function to core.c so it can be used anywhere in the code. Signed-off-by: Sevak Arakelyan --- drivers/usb/dwc2/core.c | 23 +++ drivers/usb/dwc2/core.h | 4 drivers/usb/dwc2/gadget.c | 14 -- 3 files changed, 27 insertions(+), 14 deletions(-

[PATCH 2/2] usb: dwc2: Use common polling function.

2017-04-27 Thread Sevak Arakelyan
Replace all the parts of register polling code with dwc2_hsotg_wait_bit_set function calls. Signed-off-by: Sevak Arakelyan --- drivers/usb/dwc2/core.c | 61 +-- drivers/usb/dwc2/gadget.c | 24 --- drivers/usb/dwc2/hcd.c| 18 +-

Re: [PATCH] usb: gadget: udc-xilinx: clean up a variable name

2017-04-27 Thread Sören Brinkmann
On Thu, 2017-04-27 at 12:11:18 +0300, Dan Carpenter wrote: > "ep->udc->lock" and "udc->lock" are the same thing. It confuses Smatch > if we don't use the same name consistently. > > Signed-off-by: Dan Carpenter Reviewed-by: Sören Brinkmann Sören -- To unsubscribe from this list: send t

Re: [PATCH] usb: musb: musb_host: Introduce postponed URB giveback

2017-04-27 Thread Bin Liu
Hi Matwey, On Thu, Apr 27, 2017 at 01:20:33PM +0300, Matwey V. Kornilov wrote: > This commit changes the order of actions undertaken in > musb_advance_schedule() in order to overcome issue with broken > isochronous transfer [1]. > > There is no harm to split musb_giveback into two pieces. The fi

Re: [PATCH] usb: musb: musb_host: Introduce postponed URB giveback

2017-04-27 Thread Matwey V. Kornilov
2017-04-27 18:35 GMT+03:00 Bin Liu : > Hi Matwey, > > On Thu, Apr 27, 2017 at 01:20:33PM +0300, Matwey V. Kornilov wrote: >> This commit changes the order of actions undertaken in >> musb_advance_schedule() in order to overcome issue with broken >> isochronous transfer [1]. >> >> There is no harm t

Re: [PATCH] usb: musb: musb_host: Introduce postponed URB giveback

2017-04-27 Thread Bin Liu
On Thu, Apr 27, 2017 at 07:26:31PM +0300, Matwey V. Kornilov wrote: > 2017-04-27 18:35 GMT+03:00 Bin Liu : > > Hi Matwey, > > > > On Thu, Apr 27, 2017 at 01:20:33PM +0300, Matwey V. Kornilov wrote: > >> This commit changes the order of actions undertaken in > >> musb_advance_schedule() in order to

Re: [PATCH v17 2/3] usb: USB Type-C connector class

2017-04-27 Thread Guenter Roeck
On Thu, Apr 27, 2017 at 11:50:12AM +0530, Rajaram R wrote: > On Tue, Apr 25, 2017 at 7:40 PM, Guenter Roeck wrote: > > On 04/25/2017 01:26 AM, Rajaram R wrote: > >> > >> On Mon, Apr 24, 2017 at 11:20 PM, Badhri Jagan Sridharan > >> wrote: > >>> > >>> On Sat, Apr 22, 2017 at 2:23 AM, Rajaram R >

[PATCH] usb: r8a66597-hcd: decrease timeout

2017-04-27 Thread Chris Brandt
The timeout for BULK packets was 300ms which is a long time if other endpoints or devices are waiting for their turn. Changing it to 50ms greatly increased the overall performance for multi-endpoint devices. Fixes: 5d3043586db4 ("usb: r8a66597-hcd: host controller driver for R8A6659") Signed-off-b

[PATCH] usb: r8a66597-hcd: select a different endpoint on timeout

2017-04-27 Thread Chris Brandt
If multiple endpoints on a single device have pending IN URBs and one endpoint times out due to NAKs (perfectly legal), select a different endpoint URB to try. The existing code only checked to see another device address has pending URBs and ignores other IN endpoints on the current device address.

xhci_hcd 0000:00:14.0: WARN Event TRB for slot 4 ep 6 with no TDs queued?

2017-04-27 Thread Cristian
Hello, My report: https://bugzilla.kernel.org/show_bug.cgi?id=195599 "dmesg: [ 418.501019] xhci_hcd :00:14.0: WARN Event TRB for slot 4 ep 6 with no TDs queued? [ 418.509810] xhci_hcd :00:14.0: WARN Event TRB for slot 4 ep 6 with no TDs queued? [ 418.516116] xhci_hcd :00:14.0: WARN Ev

blk_update_request: I/O error, dev sr0, sector 1040

2017-04-27 Thread Cristian
Hello, My report: https://bugzilla.kernel.org/show_bug.cgi?id=195601 "dmesg: [ 2054.798478] blk_update_request: I/O error, dev sr0, sector 1040 [ 2054.799325] sr 6:0:0:0: [sr0] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [ 2054.799329] sr 6:0:0:0: [sr0] tag#0 Sense Key : Not Read

[PATCH v7 2/3] staging: typec: Type-C Port Controller Interface driver (tcpci)

2017-04-27 Thread Guenter Roeck
From: Guenter Roeck The port controller interface driver interconnects the Type-C Port Manager with a Type-C Port Controller Interface (TCPCI) compliant port controller. Signed-off-by: Guenter Roeck Signed-off-by: Guenter Roeck --- v7: - Adjust subject to indicate that this is a staging driver

[PATCH v7 1/3] staging: typec: USB Type-C Port Manager (tcpm)

2017-04-27 Thread Guenter Roeck
From: Guenter Roeck This driver implements the USB Type-C Power Delivery state machine for both source and sink ports. Alternate mode support is not fully implemented. The driver attaches to the USB Type-C class code implemented in the following patches. usb: typec: add driver for Intel

[PATCH v7 3/3] staging: typec: Fairchild FUSB302 Type-c chip driver

2017-04-27 Thread Guenter Roeck
From: Yueyao Zhu Fairchild FUSB302 Type-C chip driver that works with Type-C Port Controller Manager to provide USB PD and USB Type-C functionalities. Signed-off-by: Yueyao Zhu Signed-off-by: Guenter Roeck --- v7: Added patch to series drivers/staging/typec/Kconfig |2 + dr

usb usb4-port2: cannot disable (err = -32)

2017-04-27 Thread Cristian
Hello, My report: https://bugzilla.kernel.org/show_bug.cgi?id=195603 "dmesg: [ 3.271343] usb usb4-port2: cannot disable (err = -32) [ 3.271382] xhci_hcd :00:14.0: Cannot set link state. [ 3.271398] usb usb4-port2: cannot disable (err = -32)" Regards, -- Cristian -- To unsubscribe from this

Re: blk_update_request: I/O error, dev sr0, sector 1040

2017-04-27 Thread Alan Stern
On Thu, 27 Apr 2017, Cristian wrote: > Hello, > > My report: > https://bugzilla.kernel.org/show_bug.cgi?id=195601 > > "dmesg: > [ 2054.798478] blk_update_request: I/O error, dev sr0, sector 1040 > [ 2054.799325] sr 6:0:0:0: [sr0] tag#0 FAILED Result: hostbyte=DID_OK > driverbyte=DRIVER_SENSE > [

Re: usb usb4-port2: cannot disable (err = -32)

2017-04-27 Thread Chunfeng Yun
Hi, This is introduced by patch in core/hub.c: "3bc02bc usb: hub: Move hub_port_disable() to fix warning if PM is disabled" When plug out a device, it try to set port to U3 state, but the port is disabled before. But I don't know how to fix it properly On Thu, 2017-04-27 at 18:13 -0300, Cristia

Re: [PATCH 1/1] usb: host: xhci-ring: don't need to clear interrupt pending for MSI enabled hcd

2017-04-27 Thread Peter Chen
On Thu, Apr 27, 2017 at 03:43:28PM +0300, Mathias Nyman wrote: > Hi > > On 27.04.2017 12:49, Peter Chen wrote: > >On Mon, Apr 17, 2017 at 04:20:43PM +0800, Peter Chen wrote: > >>According to xHCI spec Figure 30: Interrupt Throttle Flow Diagram > >> > >>If PCI Message Signaled Interrupts (MSI o

Re: usb usb4-port2: cannot disable (err = -32)

2017-04-27 Thread Alan Stern
On Fri, 28 Apr 2017, Chunfeng Yun wrote: > Hi, > > This is introduced by patch in core/hub.c: > "3bc02bc usb: hub: Move hub_port_disable() to fix warning if PM is > disabled" > > When plug out a device, it try to set port to U3 state, but the > port is disabled before. > > But I don't know how