Re: [PATCH 2/2] usb; dwc3: of-simple: Add support to get resets for the device

2017-03-15 Thread Vivek Gautam
Hi, On 03/15/2017 04:15 PM, Philipp Zabel wrote: On Wed, 2017-02-22 at 10:54 +0530, Vivek Gautam wrote: Add support to get a list of resets available for the device. These resets must be kept de-asserted until the device is in use. Cc: Felipe Balbi Signed-off-by: Vivek

Re: [PATCH 1/2] reset: Add API to count number of reset available with device

2017-03-15 Thread Vivek Gautam
Hi Philipp, On Wed, Mar 15, 2017 at 4:10 PM, Philipp Zabel wrote: > Hi Vivek, > > On Fri, 2017-03-10 at 20:10 +0530, Vivek Gautam wrote: >> Hi Philipp, >> >> >> On Wed, Feb 22, 2017 at 10:54 AM, Vivek Gautam >> wrote: >> > Count number of

Re: [PATCH v2 3/4] doc: dt-bindings: usb251xb: mark reg as required

2017-03-15 Thread Rob Herring
On Mon, Mar 06, 2017 at 09:24:22AM +0100, Richard Leitner wrote: > Mark the reg property as required and furthermore fix some typos and > spellings in the documentation. > > Signed-off-by: Richard Leitner > --- > Documentation/devicetree/bindings/usb/usb251xb.txt |

Re: [PATCH v2 2/4] usb: usb251xb: dt: add unit suffix to oc-delay and power-on-time

2017-03-15 Thread Rob Herring
On Mon, Mar 06, 2017 at 09:24:21AM +0100, Richard Leitner wrote: > Rename oc-delay-* to oc-delay-us and make it expect a time value. > Furthermore add -ms suffix to power-on-time. There changes were > suggested by Rob Herring in https://lkml.org/lkml/2017/2/15/1283. > > Signed-off-by: Richard

Re: [PATCH v3 2/3] dt-bindings: phy: add DT bindings for usb2-phy grf

2017-03-15 Thread Rob Herring
On Mon, Mar 06, 2017 at 09:29:37AM +0800, Meng Dongyang wrote: > Adds the device tree bindings description for usb2-phy grf > of RK3328 platform. > > Changes in v2: > - add usb2-phy grf specification > Chagnes in v3: > - remove the example of usb2-phy grf > > Signed-off-by: Meng Dongyang

Re: [RFC PATCH v2] usb: hub: Fix error loop seen after hub communication errors

2017-03-15 Thread Alan Stern
On Wed, 15 Mar 2017, Guenter Roeck wrote: > While stress testing a usb controller using a bind/unbind looop, the > following error loop was observed. > > usb 7-1.2: new low-speed USB device number 3 using xhci-hcd > usb 7-1.2: hub failed to enable device, error -108 > usb 7-1-port2: cannot

[RFC PATCH v2] usb: hub: Fix error loop seen after hub communication errors

2017-03-15 Thread Guenter Roeck
While stress testing a usb controller using a bind/unbind looop, the following error loop was observed. usb 7-1.2: new low-speed USB device number 3 using xhci-hcd usb 7-1.2: hub failed to enable device, error -108 usb 7-1-port2: cannot disable (err = -22) usb 7-1-port2: couldn't allocate

Re: [PATCH 02/16] USB: core: add helpers to retrieve endpoints in reverse order

2017-03-15 Thread Bjørn Mork
Johan Hovold writes: > + if ((!bulk_in || *bulk_in) && (!bulk_out || *bulk_out) && > + (!int_in || *int_in) && (!int_out || *int_out)) { > + return true; > + } > + > + return false; > +} Maybe I asked this before and got a good

Re: [PATCH 00/21] USB: serial: refactor endpoint sanity checks

2017-03-15 Thread Johan Hovold
On Mon, Mar 06, 2017 at 04:56:31PM +0100, Johan Hovold wrote: > On Mon, Mar 06, 2017 at 04:01:36PM +0100, Johan Hovold wrote: > > On Mon, Mar 06, 2017 at 02:14:51PM +0100, Oliver Neukum wrote: > > > Am Montag, den 06.03.2017, 12:27 +0100 schrieb Johan Hovold: > > > > On Mon, Mar 06, 2017 at

Re: [PATCH v2 13/14] usb: host: ehci-st: simplify optional reset handling

2017-03-15 Thread Philipp Zabel
Hi Alan, On Wed, 2017-03-15 at 10:35 -0400, Alan Stern wrote: > On Wed, 15 Mar 2017, Philipp Zabel wrote: > > > As of commit bb475230b8e5 ("reset: make optional functions really > > optional"), the reset framework API calls use NULL pointers to describe > > optional, non-present reset controls.

[PATCH 11/16] USB: lvstest: tighten endpoint sanity check

2017-03-15 Thread Johan Hovold
Use the new endpoint helpers to lookup the required interrupt-in endpoint. Note that this in fact both loosens and tightens the endpoint sanity check by accepting any interface with an interrupt-in endpoint rather than always using the first endpoint without verifying its type. Signed-off-by:

[PATCH 03/16] USB: adutux: refactor endpoint retrieval

2017-03-15 Thread Johan Hovold
Use the new endpoint helpers to lookup the required interrupt-in and interrupt-out endpoints. Also make sure to return -ENOMEM on all allocation failures and -EIO on a string-retrieval error (instead of returning -ENODEV for these errors). Note that the descriptors are searched in reverse order

[PATCH 12/16] USB: usblcd: refactor endpoint retrieval

2017-03-15 Thread Johan Hovold
Use the new endpoint helpers to lookup the required bulk-in and bulk-out endpoints. Signed-off-by: Johan Hovold --- drivers/usb/misc/usblcd.c | 47 ++- 1 file changed, 18 insertions(+), 29 deletions(-) diff --git

[PATCH 02/16] USB: core: add helpers to retrieve endpoints in reverse order

2017-03-15 Thread Johan Hovold
Several drivers have implemented their endpoint look-up loops in such a way that they have picked the last endpoint descriptor of the specified type should more than one such descriptor exist. To avoid any regressions, add corresponding helpers to lookup endpoints by searching the endpoint

[PATCH 01/16] USB: core: add helpers to retrieve endpoints

2017-03-15 Thread Johan Hovold
Many USB drivers iterate over the available endpoints to find required endpoints of a specific type and direction. Typically the endpoints are required for proper function and a missing endpoint should abort probe. To facilitate code reuse, add a helper to retrieve common endpoints (bulk or

[PATCH 00/16] USB: refactor endpoint retrieval

2017-03-15 Thread Johan Hovold
Many USB drivers iterate over the available endpoints to find required endpoints of a specific type and direction. Typically the endpoints are required for proper function and a missing endpoint should abort probe. To facilitate code reuse, this series adds a helper to retrieve common endpoints

[PATCH 15/16] USB: usbtmc: refactor endpoint retrieval

2017-03-15 Thread Johan Hovold
Use the new endpoint helpers to lookup the required bulk-in and bulk-out endpoints, and the optional interrupt-in endpoint. Signed-off-by: Johan Hovold --- drivers/usb/class/usbtmc.c | 56 +++--- 1 file changed, 18 insertions(+), 38

[PATCH 04/16] USB: appledisplay: refactor endpoint retrieval

2017-03-15 Thread Johan Hovold
Use the new endpoint helpers to lookup the required interrupt-in endpoint. Signed-off-by: Johan Hovold --- drivers/usb/misc/appledisplay.c | 19 ++- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/drivers/usb/misc/appledisplay.c

[PATCH 07/16] USB: idmouse: refactor endpoint retrieval

2017-03-15 Thread Johan Hovold
Use the new endpoint helpers to lookup the required bulk-in endpoint. Note that we now pick the first bulk-in endpoint regardless of whether it happens to be the first descriptor. Signed-off-by: Johan Hovold --- drivers/usb/misc/idmouse.c | 31 ---

[PATCH 10/16] USB: legousbtower: refactor endpoint retrieval

2017-03-15 Thread Johan Hovold
Use the new endpoint helpers to lookup the required interrupt-in and interrupt-out endpoints. Note that the descriptors are searched in reverse order to avoid any regressions. Signed-off-by: Johan Hovold --- drivers/usb/misc/legousbtower.c | 29 +++--

[PATCH 05/16] USB: chaoskey: refactor endpoint retrieval

2017-03-15 Thread Johan Hovold
Use the new endpoint helpers to lookup the required bulk-in endpoint. Signed-off-by: Johan Hovold --- drivers/usb/misc/chaoskey.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/drivers/usb/misc/chaoskey.c

[PATCH 16/16] USB: usb-skeleton: refactor endpoint retrieval

2017-03-15 Thread Johan Hovold
Use the new endpoint helpers to lookup the required bulk-in and bulk-out endpoints. Signed-off-by: Johan Hovold --- drivers/usb/usb-skeleton.c | 59 -- 1 file changed, 25 insertions(+), 34 deletions(-) diff --git

[PATCH 13/16] USB: uss720: add debug endpoint-type check

2017-03-15 Thread Johan Hovold
Use the new endpoint helpers to lookup the interrupt-in endpoint, and only print the corresponding debugging information in case it is found. Note that the descriptors are searched in reverse order to avoid any regressions. Signed-off-by: Johan Hovold ---

[PATCH 09/16] USB: ldusb: refactor endpoint retrieval

2017-03-15 Thread Johan Hovold
Use the new endpoint helpers to lookup the required interrupt-in endpoint and optional interrupt-out endpoint. Note that the descriptors are searched in reverse order to avoid any regressions. Signed-off-by: Johan Hovold --- drivers/usb/misc/ldusb.c | 23

[PATCH 06/16] USB: ftdi-elan: refactor endpoint retrieval

2017-03-15 Thread Johan Hovold
Use the new endpoint helpers to lookup the required bulk-in and bulk-out endpoints. Signed-off-by: Johan Hovold --- drivers/usb/misc/ftdi-elan.c | 42 +- 1 file changed, 17 insertions(+), 25 deletions(-) diff --git

[PATCH 14/16] USB: yurex: refactor endpoint retrieval

2017-03-15 Thread Johan Hovold
Use the new endpoint helpers to lookup the required interrupt-in endpoint. Signed-off-by: Johan Hovold --- drivers/usb/misc/yurex.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/usb/misc/yurex.c b/drivers/usb/misc/yurex.c index

[PATCH 08/16] USB: iowarrior: refactor endpoint retrieval

2017-03-15 Thread Johan Hovold
Use the new endpoint helpers to lookup the required interrupt-in endpoint. IOWarror56 devices also requires an interrupt-out endpoint, which is looked up in a second call. Note that the descriptors are searched in reverse order to avoid any regressions. Signed-off-by: Johan Hovold

Re: [RESEND PATCH v3 2/2] phy: Group vendor specific phy drivers

2017-03-15 Thread Vivek Gautam
On Wed, Mar 15, 2017 at 1:38 PM, Heiko Stübner wrote: > Am Dienstag, 14. März 2017, 11:52:50 CET schrieb Vivek Gautam: >> Adding vendor specific directories in phy to group >> phy drivers under their respective vendor umbrella. >> >> Also updated the MAINTAINERS file to reflect

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

2017-03-15 Thread Moreno Bartalucci
With usb-musb port in host mode, when the device is disconnected, either logically (because of a mode switch) or physically (by pulling the cable), the USB port should keep suppling VBUS, with no interruption, to prevent power loss on USB powered devices. Signed-off-by: Moreno Bartalucci

Re: [PATCH v2 13/14] usb: host: ehci-st: simplify optional reset handling

2017-03-15 Thread Alan Stern
On Wed, 15 Mar 2017, Philipp Zabel wrote: > As of commit bb475230b8e5 ("reset: make optional functions really > optional"), the reset framework API calls use NULL pointers to describe > optional, non-present reset controls. What does it use to describe genuine errors? > This allows to return

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

2017-03-15 Thread Diego Viola
On Tue, Mar 14, 2017 at 4:15 PM, Diego Viola wrote: > On Tue, Mar 14, 2017 at 2:20 PM, Diego Viola wrote: >> On Thu, Mar 9, 2017 at 2:15 PM, Diego Viola wrote: >>> On Thu, Mar 9, 2017 at 11:11 AM, Diego Viola

Re: unexpected TRB Type 4, Disable of device-initiated U1 failed

2017-03-15 Thread Mathias Nyman
Hi On 14.03.2017 18:16, Nathan Shearer wrote: I have been archiving data from old hard drives, and I have a drive that spins up, but does not finish detecting (the drive is faulty). When this happens on kernel 4.10.1 there is some kind of a timeout, and the usb port that my dock is plugged into

[PATCH v2 12/14] usb: dwc2: simplify optional reset handling

2017-03-15 Thread Philipp Zabel
As of commit bb475230b8e5 ("reset: make optional functions really optional"), the reset framework API calls use NULL pointers to describe optional, non-present reset controls. This allows to return errors from devm_reset_control_get_optional and to call reset_control_(de)assert unconditionally.

[PATCH v2 13/14] usb: host: ehci-st: simplify optional reset handling

2017-03-15 Thread Philipp Zabel
As of commit bb475230b8e5 ("reset: make optional functions really optional"), the reset framework API calls use NULL pointers to describe optional, non-present reset controls. This allows to return errors from devm_reset_control_get_optional_shared unconditionally. Signed-off-by: Philipp Zabel

[PATCH 1/1] sisusb_con: fix coccinelle warning

2017-03-15 Thread Jiri Slaby
After commit d705ff3818 (tty: vt, cleanup and document con_scroll), in the coccinelle output, we can see: drivers/usb/misc/sisusbvga/sisusb_con.c:852:8-9: WARNING: return of 0/1 in function 'sisusbcon_scroll_area' with return type bool Return true instead of 1 in the function returning bool

Re: [PATCH 2/2] usb; dwc3: of-simple: Add support to get resets for the device

2017-03-15 Thread Philipp Zabel
On Wed, 2017-02-22 at 10:54 +0530, Vivek Gautam wrote: > Add support to get a list of resets available for the device. > These resets must be kept de-asserted until the device is > in use. > > Cc: Felipe Balbi > Signed-off-by: Vivek Gautam > --- >

Re: [PATCH 1/2] reset: Add API to count number of reset available with device

2017-03-15 Thread Philipp Zabel
Hi Vivek, On Fri, 2017-03-10 at 20:10 +0530, Vivek Gautam wrote: > Hi Philipp, > > > On Wed, Feb 22, 2017 at 10:54 AM, Vivek Gautam > wrote: > > Count number of reset phandles available with the device node > > to know the resets a given device has. > > > > Cc:

Re: [PATCH 2/4] cdc-acm: fix possible invalid access when processing notification

2017-03-15 Thread Oliver Neukum
Am Dienstag, den 14.03.2017, 21:14 +0100 schrieb Tobias Herzog: > Notifications may only be 8 bytes so long. Accessing the 9th and > 10th byte of unimplemented/unknown notifications may be insecure. > Also check the length of known notifications before accessing anything > behind the 8th byte. >

Re: [PATCH 1/4] cdc-acm: reassemble fragmented notifications

2017-03-15 Thread Oliver Neukum
Am Dienstag, den 14.03.2017, 21:14 +0100 schrieb Tobias Herzog: > USB devices may have very limitited endpoint packet sizes, so that > notifications can not be transferred within one single usb packet. > Reassembling of multiple packages may be necessary. Hi, thank you for the patch.

Re: Fwd: dwc2 and ping protocol

2017-03-15 Thread Minas Harutyunyan
Hi Nick, In DMA mode handling NAKs internally by hardware performing starting from core v2.71a. Before v2.71a handling NAKs should be performed by driver. Your core is 2.65a. Thanks, Minas On 3/11/2017 7:14 PM, Nick Hudson wrote: > Hi, > > I'm using a mostly unmodified older version of the

Re: [RESEND PATCH v3 2/2] phy: Group vendor specific phy drivers

2017-03-15 Thread Heiko Stübner
Am Dienstag, 14. März 2017, 11:52:50 CET schrieb Vivek Gautam: > Adding vendor specific directories in phy to group > phy drivers under their respective vendor umbrella. > > Also updated the MAINTAINERS file to reflect the correct > directory structure for phy drivers. > > Signed-off-by: Vivek