Re: [PATCH 3/6] usb: usbip: Export the number of VHCI controllers in a sysfs file

2017-03-27 Thread Krzysztof Opasiak
+ Shuah Khan On 03/23/2017 03:46 AM, Yuyang Du wrote: This number facilitates user space tool to easily know what we have. Signed-off-by: Yuyang Du --- drivers/usb/usbip/vhci_sysfs.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/drivers/usb/usbip/vhc

Re: [PATCH 4/6] usb: usbip tool: Add ncontrollers in vhci_driver structure

2017-03-27 Thread Krzysztof Opasiak
+ Shuah Khan On 03/23/2017 03:46 AM, Yuyang Du wrote: This field is read from the newly added ncontroller sysfs. Signed-off-by: Yuyang Du --- tools/usb/usbip/libsrc/vhci_driver.c | 18 +- tools/usb/usbip/libsrc/vhci_driver.h | 1 + 2 files changed, 18 insertions(+), 1 deletio

Re: Dell Inspiron 5558/0VNM2T hangs at resume from suspend when USB 3 is enabled

2017-03-27 Thread Mathias Nyman
On 24.03.2017 18:25, Diego Viola wrote: On Thu, Mar 23, 2017 at 2:12 PM, Diego Viola wrote: On Thu, Mar 23, 2017 at 2:02 PM, Mathias Nyman wrote: On 22.03.2017 19:51, Mathias Nyman wrote: On 22.03.2017 00:52, Diego Viola wrote: On Tue, Mar 21, 2017 at 12:29 PM, Diego Viola wrote: On Tu

Re: [PATCH 5/6] usb: usbip tool: Fix refresh_imported_device_list()

2017-03-27 Thread Krzysztof Opasiak
+ Shuah Khan On 03/23/2017 03:46 AM, Yuyang Du wrote: The commit 0775a9cbc694e8c7 ("usbip: vhci extension: modifications to vhci driver") introduced multiple controllers, but the status of the ports are only extracted from the first status file, fix it. Signed-off-by: Yuyang Du --- tools/usb

Re: [PATCH 6/6] usb: usbip tool: Fix parse_status()

2017-03-27 Thread Krzysztof Opasiak
+ Shuah Khan On 03/23/2017 03:46 AM, Yuyang Du wrote: parse_status() reads the status file one by one, so it can only update the available and according vhci_driver->idev's. Signed-off-by: Yuyang Du --- tools/usb/usbip/libsrc/vhci_driver.c | 34 ++ tools/usb/us

Re: Oops with dwc3 in device mode and functionfs

2017-03-27 Thread Felipe Balbi
Hi, Vincent Pelletier writes: > Hello, > > On Sun, Mar 26, 2017 at 9:20 PM, Andy Shevchenko > wrote: >> On Sat, 2017-03-25 at 08:06 +0900, Vincent Pelletier wrote: >>> FWIW, at home enumeration happens much more reliably behind a hub than >>> directly on a host (both being xHCI). Maybe my ediso

usb: host: xhci: stalled endpoint ring not cleared on empty td_list

2017-03-27 Thread Christian Gromm
Hi, we observe an issue with a td_list running empty and an endpoint being stalled at the same time on Linux ihu-low 4.1.27-abl #1 SMP PREEMPT Mon Mar 20 13:51:51 CET 2017 x86_64 x86_64 x86_64 GNU/Linux. According to the logs, the halt condition of the endpoint is detected on host side, but n

Re: usb: host: xhci: stalled endpoint ring not cleared on empty td_list

2017-03-27 Thread Felipe Balbi
Hi, Christian Gromm writes: > we observe an issue with a td_list running empty and an > endpoint being stalled at the same time on > > Linux ihu-low 4.1.27-abl #1 SMP PREEMPT Mon Mar 20 13:51:51 CET 2017 > x86_64 x86_64 x86_64 GNU/Linux. this is one old kernel. Please upgrade to v4.11-rc4 or v

Re: USB device disconnect after suspend/resume

2017-03-27 Thread Oliver Neukum
Am Sonntag, den 26.03.2017, 17:31 +0200 schrieb Stephan Müller: > > Is there a way to reset the hub or to force a scanning the ports for > potentially attached devices? Try adding a RESET_RESUME quirk for your device. And make sure there is a medium in it. It may disconnect because it is empty.

Re: [PATCH 0/2] add support of u2phy for rk3328

2017-03-27 Thread Kishon Vijay Abraham I
On Wednesday 01 March 2017 03:43 PM, Meng Dongyang wrote: > The config information of RK3328 about address and port property > is different from before platform. So add config information in the > data of match table and documentation of the device tree bindings > of u2phy. merged, thanks. -Kis

Re: [PATCH] usb-musb: keep VBUS on when device is disconnected

2017-03-27 Thread Moreno Bartalucci
> Il giorno 25 mar 2017, alle ore 08:21, Lars Melin ha > scritto: > >> >> The usb device has been disconnected, why it still cares about VBUS >> power? > > Morphing devices (3G dongles, wifi dongles, some printers) boots up in > install mode, usually only as a virtual cd-rom containing Window

Re: [PATCH] usb-musb: keep VBUS on when device is disconnected

2017-03-27 Thread Bin Liu
On Mon, Mar 27, 2017 at 02:53:27PM +0200, Moreno Bartalucci wrote: > > Il giorno 25 mar 2017, alle ore 08:21, Lars Melin ha > > scritto: > > > >> > >> The usb device has been disconnected, why it still cares about VBUS > >> power? > > > > Morphing devices (3G dongles, wifi dongles, some printe

Re: [PATCH 3/6] usb: usbip: Export the number of VHCI controllers in a sysfs file

2017-03-27 Thread Yuyang Du
On Mon, Mar 27, 2017 at 09:00:06AM +0200, Krzysztof Opasiak wrote: > >+static ssize_t ncontrollers_show(struct device *dev, struct > >device_attribute *attr, > >+ char *out) > >+{ > >+char *s = out; > >+ > >+out += sprintf(out, "%d\n", vhci_num_controllers); > >+r

Re: [PATCH 2/6] usb: usbip tool: Fix get_nports()

2017-03-27 Thread Yuyang Du
On Mon, Mar 27, 2017 at 08:56:44AM +0200, Krzysztof Opasiak wrote: > + Shuah Khan Sorry for not having sent to Shuah. > On 03/23/2017 03:46 AM, Yuyang Du wrote: ... > As strtoul() returns long and get_nports() should return int I'd > prefer to do here some explicit cast to int to avoid some po

Re: [PATCH 5/6] usb: usbip tool: Fix refresh_imported_device_list()

2017-03-27 Thread Yuyang Du
On Mon, Mar 27, 2017 at 09:07:50AM +0200, Krzysztof Opasiak wrote: > > As now we have multiple controllers I would be more than happy if we > could fix functions like this one to take a controller as a > parameter and invoke commands on it instead hardcoding loops like > this one with some unclear

Re: [PATCH 0/7] dwc3 - bug fixes and use meaningful goto labels

2017-03-27 Thread Shuah Khan
On 03/25/2017 01:51 AM, Felipe Balbi wrote: > > Hi, > > Shuah Khan writes: >> This patch series consists of two fixes and changes to goto labels > > we *NEVER* put cleanups and fixes together. > >> to use meaningful names. >> >> While working on goto label changes, I noticed put_sync calls wi

Re: [PATCH 2/6] usb: usbip tool: Fix get_nports()

2017-03-27 Thread Shuah Khan
On 03/26/2017 11:28 PM, Yuyang Du wrote: > On Mon, Mar 27, 2017 at 08:56:44AM +0200, Krzysztof Opasiak wrote: >> + Shuah Khan > > Sorry for not having sent to Shuah. Can you send me the patches - aren't in my inbox to review. thanks, -- Shuah > >> On 03/23/2017 03:46 AM, Yuyang Du wrote: > >

[PATCH 1/3] xhci: plat: Register shutdown for xhci_plat

2017-03-27 Thread Mathias Nyman
From: Adam Wallis Shutdown should be called for xhci_plat devices especially for situations where kexec might be used by stopping DMA transactions. Signed-off-by: Adam Wallis Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-plat.c | 1 + 1 file changed, 1 insertion(+) diff --git a/driv

[PATCH 0/3] xhci fixes for usb-linus

2017-03-27 Thread Mathias Nyman
Hi Greg A few more xhci fixes for usb-linus 4.11-rc Most important is the URB dequeue fix that resolves a hang on resume reported by Diego Viola on his DELL Inspiron 5558. Adam Wallis (1): xhci: plat: Register shutdown for xhci_plat Mathias Nyman (2): xhci: Set URB actual length for stopped

[PATCH 2/3] xhci: Set URB actual length for stopped control transfers

2017-03-27 Thread Mathias Nyman
A control transfer that stopped at the status stage incorrectly warned about a "unexpected TRB Type 4", and did not set the tranferred actual_length for the URB. The tranferred actual_length should be set the same way for COMP_STOPPED control tranfers as in the generic cases. generic case if we g

[PATCH 3/3] xhci: Manually give back cancelled URB if queuing it for cancel fails

2017-03-27 Thread Mathias Nyman
Manually give back URB if we are can not add it to the cancel queue, and stop the endpoint normally. This can happen if device just reset before URB timed out and dequeued, leading to missing endpoint ring. This caused a hang on Dell Inspiron 5558/0VNM2T at resume from suspend as urb was never ret

Re: [PATCH 2/3] xhci: Set URB actual length for stopped control transfers

2017-03-27 Thread Greg KH
On Mon, Mar 27, 2017 at 04:58:39PM +0300, Mathias Nyman wrote: > A control transfer that stopped at the status stage incorrectly > warned about a "unexpected TRB Type 4", and did not set the > tranferred actual_length for the URB. > > The tranferred actual_length should be set the same way for > C

Re: [PATCH 2/3] xhci: Set URB actual length for stopped control transfers

2017-03-27 Thread Mathias Nyman
On 27.03.2017 17:07, Greg KH wrote: On Mon, Mar 27, 2017 at 04:58:39PM +0300, Mathias Nyman wrote: A control transfer that stopped at the status stage incorrectly warned about a "unexpected TRB Type 4", and did not set the tranferred actual_length for the URB. The tranferred actual_length shoul

[PATCH v2 3/3] xhci: Manually give back cancelled URB if queuing it for cancel fails

2017-03-27 Thread Mathias Nyman
Manually give back URB if we are can not add it to the cancel queue, and stop the endpoint normally. This can happen if device just reset before URB timed out and dequeued, leading to missing endpoint ring. This caused a hang on Dell Inspiron 5558/0VNM2T at resume from suspend as urb was never ret

[PATCH v2 2/3] xhci: Set URB actual length for stopped control transfers

2017-03-27 Thread Mathias Nyman
A control transfer that stopped at the status stage incorrectly warned about a "unexpected TRB Type 4", and did not set the transferred actual_length for the URB. The transferred actual_length should be set the same way for COMP_STOPPED control transfers as in the generic cases. generic case if w

[PATCH v2 0/3] xhci fixes for usb-linus

2017-03-27 Thread Mathias Nyman
Hi Greg Second try A few more xhci fixes for usb-linus 4.11-rc Most important is the URB dequeue fix that resolves a hang on resume reported by Diego Viola on his DELL Inspiron 5558. v2: Don't add extra blank line, and Fix tranfer -> transfer typos Adam Wallis (1): xhci: plat: Register shut

[PATCH v2 1/3] xhci: plat: Register shutdown for xhci_plat

2017-03-27 Thread Mathias Nyman
From: Adam Wallis Shutdown should be called for xhci_plat devices especially for situations where kexec might be used by stopping DMA transactions. Signed-off-by: Adam Wallis Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-plat.c | 1 + 1 file changed, 1 insertion(+) diff --git a/driv

Re: [PATCH 5/6] usb: usbip tool: Fix refresh_imported_device_list()

2017-03-27 Thread Krzysztof Opasiak
On 03/27/2017 07:25 AM, Yuyang Du wrote: On Mon, Mar 27, 2017 at 09:07:50AM +0200, Krzysztof Opasiak wrote: As now we have multiple controllers I would be more than happy if we could fix functions like this one to take a controller as a parameter and invoke commands on it instead hardcoding l

Re: [PATCH] usb-musb: keep VBUS on when device is disconnected

2017-03-27 Thread Tony Lindgren
* Bin Liu [170327 06:22]: > On Mon, Mar 27, 2017 at 02:53:27PM +0200, Moreno Bartalucci wrote: > > > Il giorno 25 mar 2017, alle ore 08:21, Lars Melin ha > > > scritto: > > > > > >> > > >> The usb device has been disconnected, why it still cares about VBUS > > >> power? > > > > > > Morphing d

Re: [PATCH v2 2/3] xhci: Set URB actual length for stopped control transfers

2017-03-27 Thread Felipe Balbi
Hi, Mathias Nyman writes: > A control transfer that stopped at the status stage incorrectly > warned about a "unexpected TRB Type 4", and did not set the > transferred actual_length for the URB. > > The transferred actual_length should be set the same way for > COMP_STOPPED control transfers as

Re: [PATCH v2 3/3] xhci: Manually give back cancelled URB if queuing it for cancel fails

2017-03-27 Thread Felipe Balbi
Hi, Mathias Nyman writes: > Manually give back URB if we are can not add it to the cancel queue, and > stop the endpoint normally. this sentence doesn't parse very well ;-) > This can happen if device just reset before URB timed out and dequeued, > leading to missing endpoint ring. seems like

Re: [PATCH v2 3/3] xhci: Manually give back cancelled URB if queuing it for cancel fails

2017-03-27 Thread Felipe Balbi
Felipe Balbi writes: > Hi, > > Mathias Nyman writes: >> Manually give back URB if we are can not add it to the cancel queue, and >> stop the endpoint normally. > > this sentence doesn't parse very well ;-) > >> This can happen if device just reset before URB timed out and dequeued, >> leading to

Re: [PATCHv2] phy: cpcap-usb: Add CPCAP PMIC USB support

2017-03-27 Thread Tony Lindgren
* Kishon Vijay Abraham I [170326 23:27]: > On Thursday 23 March 2017 05:16 AM, Tony Lindgren wrote: > > +static const struct phy_ops ops = { > > + .owner = THIS_MODULE, > > +}; > > Given that this phy doesn't have any phy_ops, Is there a reason for > registering > this phy with the ph

Re: [PATCH v2 3/3] xhci: Manually give back cancelled URB if queuing it for cancel fails

2017-03-27 Thread Mathias Nyman
On 27.03.2017 17:54, Felipe Balbi wrote: Hi, Mathias Nyman writes: Manually give back URB if we are can not add it to the cancel queue, and stop the endpoint normally. this sentence doesn't parse very well ;-) This can happen if device just reset before URB timed out and dequeued, leading

Re: [PATCH v2] usb: musb: cppi_dma.c: use DIV_ROUND_UP macro in cppi_next_(r|t)x_segment()

2017-03-27 Thread Bin Liu
On Sat, Mar 25, 2017 at 12:52:58PM +0300, Ivan Safonov wrote: > DIV_ROUND_UP is bit useful than series of "/" and "%" operations. > Replace "/%" sequence with DIV_ROUND_UP macro. > > Signed-off-by: Ivan Safonov Applied. Thanks. -Bin. > --- > Changes in v2: > - little style fix > > drivers/us

Re: [PATCH v2 2/3] xhci: Set URB actual length for stopped control transfers

2017-03-27 Thread Mathias Nyman
On 27.03.2017 17:47, Felipe Balbi wrote: Hi, Mathias Nyman writes: A control transfer that stopped at the status stage incorrectly warned about a "unexpected TRB Type 4", and did not set the transferred actual_length for the URB. The transferred actual_length should be set the same way for C

Re: [PATCH] usb-musb: keep VBUS on when device is disconnected

2017-03-27 Thread Moreno Bartalucci
> Il giorno 27 mar 2017, alle ore 16:30, Tony Lindgren ha > scritto: > > […] > I wonder if the following test patch allows the mode changing > devices to been properly found? Of course it's just for testing, > and scanning for devices takes now 5 seconds.. But it might > provide clues why musb

Re: [RESEND PATCH v6 4/4] usb: musb: da8xx: Add a primary support of PM runtime

2017-03-27 Thread Alexandre Bailon
Hello Grygorii, On 03/24/2017 06:26 PM, Grygorii Strashko wrote: On 03/24/2017 09:36 AM, Alexandre Bailon wrote: > Currently, MUSB DA8xx glue driver doesn't have PM runtime support. > Because the CPPI 4.1 is using the same clock as MUSB DA8xx and > CPPI 4.1 is a child of MUSB DA8xx glue, add su

Re: [PATCH] usb-musb: keep VBUS on when device is disconnected

2017-03-27 Thread Tony Lindgren
* Moreno Bartalucci [170327 09:23]: > If I understood your patch, however, if the device (anyone, not just my one) > takes longer to switch, VBUS is deasserted anyway. Yeah some of them can take at least 10 seconds even to enumerate. So probably we need to have to have some longer timeout set fo

Re: [PATCH] usb-musb: keep VBUS on when device is disconnected

2017-03-27 Thread Bin Liu
On Mon, Mar 27, 2017 at 09:59:47AM -0700, Tony Lindgren wrote: > * Moreno Bartalucci [170327 09:23]: > > If I understood your patch, however, if the device (anyone, not just my > > one) takes longer to switch, VBUS is deasserted anyway. > > Yeah some of them can take at least 10 seconds even to

Re: [RESEND PATCH v6 4/4] usb: musb: da8xx: Add a primary support of PM runtime

2017-03-27 Thread Grygorii Strashko
On 03/27/2017 11:39 AM, Alexandre Bailon wrote: > Hello Grygorii, > On 03/24/2017 06:26 PM, Grygorii Strashko wrote: >> >> >> On 03/24/2017 09:36 AM, Alexandre Bailon wrote: >> > Currently, MUSB DA8xx glue driver doesn't have PM runtime support. >> > Because the CPPI 4.1 is using the same clock a

Re: [PATCH] usb-musb: keep VBUS on when device is disconnected

2017-03-27 Thread Tony Lindgren
* Bin Liu [170327 10:17]: > On Mon, Mar 27, 2017 at 09:59:47AM -0700, Tony Lindgren wrote: > > * Moreno Bartalucci [170327 09:23]: > > > If I understood your patch, however, if the device (anyone, not just my > > > one) takes longer to switch, VBUS is deasserted anyway. > > > > Yeah some of the

kernel hangs forever when unloading dwc3-of-simple

2017-03-27 Thread Thomas Reifferscheid
Hi kernel-4.9.17 is hanging in a readl() forever when calling rmmod dwc3-of-simple root@L:~# rmmod dwc3-of-simple [48.980006] xhci-hcd xhci-hcd.1.auto: remove, state 1 [48.980094] usb usb4: USB disconnect, device number 1 [48.985172] xhci-hcd xhci-hcd.1.auto: USB

Re: [RESEND PATCH v6 4/4] usb: musb: da8xx: Add a primary support of PM runtime

2017-03-27 Thread Alexandre Bailon
On 03/27/2017 07:38 PM, Grygorii Strashko wrote: On 03/27/2017 11:39 AM, Alexandre Bailon wrote: Hello Grygorii, On 03/24/2017 06:26 PM, Grygorii Strashko wrote: On 03/24/2017 09:36 AM, Alexandre Bailon wrote: Currently, MUSB DA8xx glue driver doesn't have PM runtime support. Because the C

Re: kernel hangs forever when unloading dwc3-of-simple

2017-03-27 Thread Thomas Reifferscheid
Am 27.03.2017 um 20:01 schrieb Thomas Reifferscheid: kernel-4.9.17 is hanging in a readl() forever when calling rmmod dwc3-of-simple I ended up fixing clock assignments in my local dtsi file. dwc3-of-simple removal is working great in stock linux-4.9.xx Sorry for the noise. Thomas -- To unsub

[PATCH] usb: gadget: udc: remove redundant initial assignments to the pointer 's'

2017-03-27 Thread Colin King
From: Colin Ian King The initial setting of pointer s to the driver name or to the literal string "(none)" is redundant as later it is always set to point to a different literal string before it is printed log. Remove this redundant code. Detected with CoverityScan, CID#1227032, CID#1227033 ("U

RE: [PATCH] usb: gadget: udc: remove redundant initial assignments to the pointer 's'

2017-03-27 Thread YUAN Linyu
Hi, > -Original Message- > From: Colin King [mailto:colin.k...@canonical.com] > Sent: Tuesday, March 28, 2017 6:35 AM > To: Felipe Balbi; Greg Kroah-Hartman; YUAN Linyu; Bhumika Goyal; Michal > Nazarewicz; linux-usb@vger.kernel.org > Cc: kernel-janit...@vger.kernel.org; linux-ker...@vger.k

Re: USB device disconnect after suspend/resume

2017-03-27 Thread Stephan Müller
Am Montag, 27. März 2017, 12:52:02 CEST schrieb Oliver Neukum: Hi Oliver, > Am Sonntag, den 26.03.2017, 17:31 +0200 schrieb Stephan Müller: > > Is there a way to reset the hub or to force a scanning the ports for > > potentially attached devices? > > Try adding a RESET_RESUME quirk for your devi

Re: [RESEND PATCH v6 4/4] usb: musb: da8xx: Add a primary support of PM runtime

2017-03-27 Thread Kevin Hilman
Alexandre Bailon writes: > Currently, MUSB DA8xx glue driver doesn't have PM runtime support. > Because the CPPI 4.1 is using the same clock as MUSB DA8xx and > CPPI 4.1 is a child of MUSB DA8xx glue, add support of PM runtime > to the DA8xx glue driver in order to let the CPPI 4.1 driver manage

[PATCH 1/1] usb: chipidea: core: add sysfs group

2017-03-27 Thread Peter Chen
Sometimes, the user needs to adjust some properties for controllers, eg the role for controller, we add sysfs group for them. The attribute 'role' is used to switch host/gadget role dynamically, the uewr can read the current role, and write the other role compare to current one to finish the switc

Re: USB device disconnect after suspend/resume

2017-03-27 Thread Peter Chen
On Tue, Mar 28, 2017 at 01:45:41AM +0200, Stephan Müller wrote: > Am Montag, 27. März 2017, 12:52:02 CEST schrieb Oliver Neukum: > > Hi Oliver, > > > Am Sonntag, den 26.03.2017, 17:31 +0200 schrieb Stephan Müller: > > > Is there a way to reset the hub or to force a scanning the ports for > > > po

Re: Issue with musb on omap3530

2017-03-27 Thread Bin Liu
Hi, I apologize for my late response. I failed to flag this email for reply. On Fri, Jan 27, 2017 at 08:50:24PM +0100, Tasslehoff Kjappfot wrote: > Hi. > > I'm struggling with an issue on an old omap 3530 running linux 2.6.39, and > since you seem to be the maintainer for musb I'll chance asking

BUG Report: USB Storage is not working when connecting on a Thunderbolt 3.0 port

2017-03-27 Thread Olivier Langlois
Hardware: HP Spectre 13 http://h10032.www1.hp.com/ctg/Manual/c05228576.pdf Kernel version: 4.10.6 SMP PREEMPT x86_64 When I plug my usb storage on the USB 3.1 Gen1 port, the storage is working: [  498.070841] usb 2-3: new SuperSpeed USB device number 2 using xhci_hcd [  498.114368] usb-storage 2-

[PATCH] usb: mtu3: Replace the extcon API

2017-03-27 Thread Chanwoo Choi
This patch uses the resource-managed extcon API for extcon_register_notifier() and replaces the deprecated extcon API as following: - extcon_get_cable_state_() -> extcon_get_state() Cc: Greg Kroah-Hartman Cc: Chunfeng Yun Cc: linux-usb@vger.kernel.org Signed-off-by: Chanwoo Choi --- drivers/us

Re: [PATCH] usb-musb: keep VBUS on when device is disconnected

2017-03-27 Thread Moreno Bartalucci
> Il giorno 27 mar 2017, alle ore 19:15, Bin Liu ha scritto: > > […] > > The MUSB otg state machine has been changed in many place since the last > time I looked at it, and I am not sure how exactly it works now. > > If the $subject patch can correctly keep the VBUS on for host-only mode, > we

Re: [PATCH v2 3/3] xhci: Manually give back cancelled URB if queuing it for cancel fails

2017-03-27 Thread Felipe Balbi
Hi, Mathias Nyman writes: > On 27.03.2017 17:54, Felipe Balbi wrote: >> >> Hi, >> >> Mathias Nyman writes: >>> Manually give back URB if we are can not add it to the cancel queue, and >>> stop the endpoint normally. >> >> this sentence doesn't parse very well ;-) >> >>> This can happen if devic