[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:

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

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

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 > > >

[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

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

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

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;

[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,

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

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

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: [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

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

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

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

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

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 >

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

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

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

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

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

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

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 >

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 > >

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

[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 ---

[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

[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

[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

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

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 >

[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

[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

[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 ---

[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

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: >

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

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

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

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); > >+

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

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

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.

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: 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.

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

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

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

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

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

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

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

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

2017-03-27 Thread Krzysztof Opasiak
+ Shuah Khan On 03/23/2017 03:46 AM, Yuyang Du wrote: The commit 0775a9cbc694e8c72 ("usbip: vhci extension: modifications to vhci driver") introduced multiple controllers, and nports as a sys file, and claimed to read the nports from it, but it didn't. In addition, the get_nports() has been so

Re: [PATCH 1/6] usb: usbip: Remove unnecessary get_vdev()

2017-03-27 Thread Krzysztof Opasiak
+ Shuah Khan On 03/27/2017 08:41 AM, Krzysztof Opasiak wrote: On 03/23/2017 03:46 AM, Yuyang Du wrote: vhci_tx_urb() should be able to get the vhci_device from its caller vhci_urb_enqueue(), instead of brutal-force searching it. Signed-off-by: Yuyang Du Reviewed-by:

Re: [PATCH 1/6] usb: usbip: Remove unnecessary get_vdev()

2017-03-27 Thread Krzysztof Opasiak
On 03/23/2017 03:46 AM, Yuyang Du wrote: vhci_tx_urb() should be able to get the vhci_device from its caller vhci_urb_enqueue(), instead of brutal-force searching it. Signed-off-by: Yuyang Du Reviewed-by: Krzysztof Opasiak -- Krzysztof Opasiak

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

2017-03-27 Thread Kishon Vijay Abraham I
Hi Tony, On Thursday 23 March 2017 05:16 AM, Tony Lindgren wrote: > Some Motorola phones like droid 4 use a custom CPCAP PMIC that has a > multiplexing USB PHY. > > This USB PHY can operate at least in four modes using pin multiplexing > and two control GPIOS: > > - Pass through companion PHY