Re: [PATCH] usb: dwc3 dwc3_exynos_probe() change goto labels to meaningful names

2017-03-17 Thread Felipe Balbi
Shuah Khan writes: > On 01/30/2017 12:25 PM, Shuah Khan wrote: >> Change goto labels to meaningful names from a series of errNs. >> >> Signed-off-by: Shuah Khan >> --- >> >> Rebased to usb-next > > Hi Felipe, > > Are you planning to get this in or is there something you are > waiting in for me

[PATCH 0/3] usb: host: xhci-plat: add support suspend/resume for R-Car

2017-03-17 Thread Yoshihiro Shimoda
This patch adds support suspend/resume for R-Car controllers. The controllers need firmware downloading and the current code has such process only when probe timing. After suspend the system and the power of controller down, the driver needs to re-download the firmware in resume timing. This patch

[PATCH 3/3] usb: host: xhci-plat: set resume_quirk() for R-Car controllers

2017-03-17 Thread Yoshihiro Shimoda
This patch sets resume_quirk() for R-Car controllers to re-download the firmware in resume timing. Otherwise, if the controller's power is down in suspend timing, the firmware in the controller goes away, and then the controller doesn't work after resume. Signed-off-by: Yoshihiro Shimoda --- dri

[PATCH 2/3] usb: host: xhci-plat: add resume_quirk()

2017-03-17 Thread Yoshihiro Shimoda
This patch adds resume_quirk() to do platform specific process in resume timing. Signed-off-by: Yoshihiro Shimoda --- drivers/usb/host/xhci-plat.c | 15 +++ drivers/usb/host/xhci-plat.h | 1 + 2 files changed, 16 insertions(+) diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb

[PATCH 1/3] usb: host: xhci-plat: enable clk in resume timing

2017-03-17 Thread Yoshihiro Shimoda
This patch enables the clk in resume timing when device_may_wakeup() is false. Otherwise, kernel panic happens when R-Car resumes the system from Suspend-to-RAM because the clk is disabled. Signed-off-by: Yoshihiro Shimoda --- drivers/usb/host/xhci-plat.c | 11 ++- 1 file changed, 10 ins

[PATCH v2 00/21] USB: refactor endpoint retrieval

2017-03-17 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 (b

[PATCH v2 12/21] USB: legousbtower: refactor endpoint retrieval

2017-03-17 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. Cc: Juergen Stuber Cc: legousb-de...@lists.sourceforge.net Signed-off-by: Johan Hovold --- drivers/usb/misc/legousbtow

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

2017-03-17 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 descrip

[PATCH v2 07/21] USB: chaoskey: refactor endpoint retrieval

2017-03-17 Thread Johan Hovold
Use the new endpoint helpers to lookup the required bulk-in endpoint. Cc: Keith Packard Signed-off-by: Johan Hovold --- drivers/usb/misc/chaoskey.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/drivers/usb/misc/chaoskey.c b/drivers/usb/misc/chaoske

[PATCH v2 03/21] USB: adutux: drop redundant sanity check

2017-03-17 Thread Johan Hovold
Drop a redundant sanity check for a NULL parent usb device, which is never true. Signed-off-by: Johan Hovold --- drivers/usb/misc/adutux.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/usb/misc/adutux.c b/drivers/usb/misc/adutux.c index db9a9e6ff6be..f0116d120468 100644 --- a/d

[PATCH v2 04/21] USB: adutux: fix up error paths

2017-03-17 Thread Johan Hovold
Make sure to return -ENOMEM on all allocation failures and -EIO on a string-retrieval error (instead of returning -ENODEV for some such errors). Signed-off-by: Johan Hovold --- drivers/usb/misc/adutux.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a

[PATCH v2 21/21] USB: usblp: refactor endpoint retrieval

2017-03-17 Thread Johan Hovold
Use the new endpoint helpers to lookup the required bulk-out endpoint and the depending on protocol likewise required bulk-in endpoint. Cc: Pete Zaitcev Signed-off-by: Johan Hovold --- drivers/usb/class/usblp.c | 35 +-- 1 file changed, 13 insertions(+), 22 delet

[PATCH v2 05/21] USB: adutux: refactor endpoint retrieval

2017-03-17 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/adutux.c | 31 --- 1 file changed, 8 inser

[PATCH v2 10/21] USB: iowarrior: refactor endpoint retrieval

2017-03-17 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 --- drivers/

[PATCH v2 09/21] USB: idmouse: refactor endpoint retrieval

2017-03-17 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 --- 1 file changed, 12

[PATCH v2 08/21] USB: ftdi-elan: refactor endpoint retrieval

2017-03-17 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 a/drivers/usb/misc/ftdi-elan.c b/drivers

[PATCH v2 20/21] USB: storage: refactor endpoint retrieval

2017-03-17 Thread Johan Hovold
Use the new endpoint helpers to lookup the required bulk-in and bulk-out endpoints and the (typically) optional interrupt-in endpoint. Cc: Alan Stern Cc: usb-stor...@lists.one-eyed-alien.net Signed-off-by: Johan Hovold --- drivers/usb/storage/usb.c | 40 +---

[PATCH v2 18/21] USB: usb-skeleton: refactor endpoint retrieval

2017-03-17 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 a/drivers/usb/usb-skeleton.c b/drivers

[PATCH v2 11/21] USB: ldusb: refactor endpoint retrieval

2017-03-17 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 +-- 1 file changed,

[PATCH v2 13/21] USB: lvstest: tighten endpoint sanity check

2017-03-17 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: Joh

[PATCH v2 14/21] USB: usblcd: refactor endpoint retrieval

2017-03-17 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 a/drivers/usb/misc/usblcd.c b/drivers/

[PATCH v2 15/21] USB: uss720: add debug endpoint-type check

2017-03-17 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 --- drivers/usb/misc/uss720.c | 10 ++--

[PATCH v2 19/21] USB: cdc-acm: refactor endpoint retrieval

2017-03-17 Thread Johan Hovold
Use the new endpoint helpers to lookup the required bulk-in, bulk-out and interrupt-in endpoints for collapsed interfaces. Note that there is already a check verifying that there are exactly three endpoints so we'd still be bailing out if there's an unexpected endpoint type. Cc: Oliver Neukum Si

[PATCH v2 16/21] USB: yurex: refactor endpoint retrieval

2017-03-17 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 | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/drivers/usb/misc/yurex.c b/drivers/usb/misc/yurex.c index 54e53ac4c08f..58abdf

[PATCH v2 06/21] USB: appledisplay: refactor endpoint retrieval

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

[PATCH v2 17/21] USB: usbtmc: refactor endpoint retrieval

2017-03-17 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 deletions(-) diff --gi

Re: [PATCH 0/7] Input: fix NULL-derefs at probe

2017-03-17 Thread Johan Hovold
On Thu, Mar 16, 2017 at 03:37:28PM -0700, Dmitry Torokhov wrote: > On Mon, Mar 13, 2017 at 04:45:52PM +0100, Johan Hovold wrote: > > On Mon, Mar 13, 2017 at 04:15:18PM +0100, Oliver Neukum wrote: > > > Am Montag, den 13.03.2017, 13:35 +0100 schrieb Johan Hovold: > > > > This series fixes a number o

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

2017-03-17 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 interr

Re: [PATCH v4] USB: Proper handling of Race Condition when two USB class drivers try to call init_usb_class simultaneously

2017-03-17 Thread Ajay Kaher
There is race condition when two USB class drivers try to call init_usb_class at the same time and leads to crash. code path: probe->usb_register_dev->init_usb_class To solve this, mutex locking has been added in init_usb_class() and destroy_usb_class(). As pointed by Alan, removed "if (usb_clas

Re: [PATCH RFC] dwc2: Don't assume URB transfer_buffer are dword-aligned

2017-03-17 Thread Mauro Carvalho Chehab
Hi Greg, (c/c media ML) Em Fri, 17 Mar 2017 10:24:15 +0900 Greg Kroah-Hartman escreveu: > On Thu, Mar 16, 2017 at 09:08:40PM -0300, Mauro Carvalho Chehab wrote: > > The dwc2 hardware doesn't like to do DMA transfers without > > aligning data in DWORD. The driver also assumes that, even > > when

RE: [PATCH net-next] r8152: simply the arguments

2017-03-17 Thread David Laight
From: Hayes Wang > Sent: 17 March 2017 03:00 > To: David Laight; net...@vger.kernel.org > Cc: nic_swsd; linux-ker...@vger.kernel.org; linux-usb@vger.kernel.org > Subject: RE: [PATCH net-next] r8152: simply the arguments > > David Laight [mailto:david.lai...@aculab.com] > > Sent: Thursday, March 16

Re: [PATCH] usb: dwc3 dwc3_exynos_probe() change goto labels to meaningful names

2017-03-17 Thread Shuah Khan
On 03/17/2017 12:24 AM, Vivek Gautam wrote: > On Tue, Jan 31, 2017 at 12:55 AM, Shuah Khan wrote: >> Change goto labels to meaningful names from a series of errNs. >> >> Signed-off-by: Shuah Khan >> --- >> >> Rebased to usb-next >> >> drivers/usb/dwc3/dwc3-exynos.c | 22 +++--- >>

Re: [PATCH v2 07/21] USB: chaoskey: refactor endpoint retrieval

2017-03-17 Thread Keith Packard
Johan Hovold writes: > Use the new endpoint helpers to lookup the required bulk-in endpoint. > > Cc: Keith Packard > Signed-off-by: Johan Hovold Reviewed-by: Keith Packard -- -keith signature.asc Description: PGP signature

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

2017-03-17 Thread Diego Viola
On Thu, Mar 16, 2017 at 12:07 PM, Alan Stern wrote: > On Thu, 16 Mar 2017, Ulf Hansson wrote: > >> +Alan >> >> On 15 March 2017 at 15:00, Diego Viola wrote: >> > 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, M

Re: [PATCH v2 20/21] USB: storage: refactor endpoint retrieval

2017-03-17 Thread Alan Stern
On Fri, 17 Mar 2017, Johan Hovold wrote: > Use the new endpoint helpers to lookup the required bulk-in and bulk-out > endpoints and the (typically) optional interrupt-in endpoint. > > Cc: Alan Stern > Cc: usb-stor...@lists.one-eyed-alien.net > Signed-off-by: Johan Hovold > --- > drivers/usb/st

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

2017-03-17 Thread Alan Stern
On Fri, 17 Mar 2017, Diego Viola wrote: > Hi, > > Here's the log to the netconsole dmesg capture, I've used > xhci_hcd.dyndbg no_console_suspend=1 as the kernel parameters. > > I did the usual suspend/resume cycle with i3lock, it hung after the > third attempt when trying to resume from suspend.

Re: Oops with dwc3 in device mode and functionfs

2017-03-17 Thread Andy Shevchenko
On Sat, 2017-01-07 at 04:07 +, Vincent Pelletier wrote: > On Fri, 6 Jan 2017 15:21:17 +, Vincent Pelletier > wrote: > > The next issue is that often (>9 times out of 10) the dwc3 fails to > > respond to the SET_CONFIGURATION standard request. As a result, only > > EP0 works. > > I capture

[PATCH] USB: qcserial: add Dell DW5811e

2017-03-17 Thread Bjørn Mork
This is a Dell branded Sierra Wireless EM7455. Cc: Signed-off-by: Bjørn Mork --- drivers/usb/serial/qcserial.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c index 696458db7e3c..38b3f0d8cd58 100644 --- a/drivers/usb/serial/qcs

[PATCH net,stable] qmi_wwan: add Dell DW5811e

2017-03-17 Thread Bjørn Mork
This is a Dell branded Sierra Wireless EM7455. It is operating in MBIM mode by default, but can be configured to provide two QMI/RMNET functions. Signed-off-by: Bjørn Mork --- Note regarding stable backports: This device should only be added to v4.5 and later. It depends on commit 32f7adf633b9 (

Re: EHCI

2017-03-17 Thread Alan Stern
On Fri, 17 Mar 2017, Lipengcheng wrote: > Hi, > In the ehci-hub.c,the ehci_handshake(ehci, status_reg, PORT_RESET, 0, > 1000) use that the timeout is 1000us. The 1000us timeout can not > satisfy all the chips. The EHCI protocol describes:A host controller > must terminate the reset and stabilize t

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

2017-03-17 Thread Alan Stern
On Thu, 16 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 disabl

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

2017-03-17 Thread Diego Viola
On Fri, Mar 17, 2017 at 1:24 PM, Alan Stern wrote: > On Fri, 17 Mar 2017, Diego Viola wrote: > >> Hi, >> >> Here's the log to the netconsole dmesg capture, I've used >> xhci_hcd.dyndbg no_console_suspend=1 as the kernel parameters. >> >> I did the usual suspend/resume cycle with i3lock, it hung af

[RFC PATCH] usb: hub: Disable autosuspend before disabling usb device

2017-03-17 Thread Guenter Roeck
While running a bind/unbind stress test with the dwc3 usb driver on rk3399, the following crash was observed. Unable to handle kernel NULL pointer dereference at virtual address 0218 pgd = ffc00165f000 [0218] *pgd=0174f003, *pud=0174f003,

Re: [RFC PATCH] usb: hub: Disable autosuspend before disabling usb device

2017-03-17 Thread Alan Stern
On Fri, 17 Mar 2017, Guenter Roeck wrote: > While running a bind/unbind stress test with the dwc3 usb driver on rk3399, > the following crash was observed. > > Unable to handle kernel NULL pointer dereference at virtual address 0218 > pgd = ffc00165f000 > [0218] *pgd=0174f003,

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

2017-03-17 Thread Diego Viola
On Fri, Mar 17, 2017 at 1:57 PM, Diego Viola wrote: > On Fri, Mar 17, 2017 at 1:24 PM, Alan Stern wrote: >> On Fri, 17 Mar 2017, Diego Viola wrote: >> >>> Hi, >>> >>> Here's the log to the netconsole dmesg capture, I've used >>> xhci_hcd.dyndbg no_console_suspend=1 as the kernel parameters. >>> >

Re: [PATCH 0/7] Input: fix NULL-derefs at probe

2017-03-17 Thread Dmitry Torokhov
On Fri, Mar 17, 2017 at 11:53:37AM +0100, Johan Hovold wrote: > On Thu, Mar 16, 2017 at 03:37:28PM -0700, Dmitry Torokhov wrote: > > On Mon, Mar 13, 2017 at 04:45:52PM +0100, Johan Hovold wrote: > > > On Mon, Mar 13, 2017 at 04:15:18PM +0100, Oliver Neukum wrote: > > > > Am Montag, den 13.03.2017,

Re: [RFC PATCH] usb: hub: Disable autosuspend before disabling usb device

2017-03-17 Thread Guenter Roeck
On Fri, Mar 17, 2017 at 04:07:14PM -0400, Alan Stern wrote: > On Fri, 17 Mar 2017, Guenter Roeck wrote: > > > While running a bind/unbind stress test with the dwc3 usb driver on rk3399, > > the following crash was observed. > > > > Unable to handle kernel NULL pointer dereference at virtual addre

[PATCH] net: usb: pegasus: use new api ethtool_{get|set}_link_ksettings

2017-03-17 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes --- drivers/net/usb/pegasus.c | 14 -- 1 files changed, 8 ins

Re: [PATCH RFC] dwc2: Don't assume URB transfer_buffer are dword-aligned

2017-03-17 Thread Michael Zoran
On Fri, 2017-03-17 at 10:24 +0900, Greg Kroah-Hartman wrote: > On Thu, Mar 16, 2017 at 09:08:40PM -0300, Mauro Carvalho Chehab > wrote: > > The dwc2 hardware doesn't like to do DMA transfers without > > aligning data in DWORD. The driver also assumes that, even > > when there's no DMA, at dwc2_read

[PATCH] usbtmc: don't return zero on failure path in usbtmc_probe()

2017-03-17 Thread Alexey Khoroshilov
usbtmc_probe() returns zero in case of allocation failures. The patch fixes that. By the way it rearranges error lables just to improve readability of quite complex dependencies in error handling code. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshil

RE: EHCI

2017-03-17 Thread Lipengcheng
Hi, > -Original Message- > From: Alan Stern [mailto:st...@rowland.harvard.edu] > Sent: Saturday, March 18, 2017 12:44 AM > To: Lipengcheng > Cc: gre...@linuxfoundation.org; linux-usb@vger.kernel.org; > linux-ker...@vger.kernel.org > Subject: Re: EHCI > > On Fri, 17 Mar 2017, Lipengcheng

Re: Passionate Partner

2017-03-17 Thread Castano Giovanni
Dear Sir, Did you recieved my mail? I have sent it twice without a response. Castano Giovanni -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH RFC] dwc2: Don't assume URB transfer_buffer are dword-aligned

2017-03-17 Thread Greg Kroah-Hartman
On Fri, Mar 17, 2017 at 04:25:21PM -0700, Michael Zoran wrote: > On Fri, 2017-03-17 at 10:24 +0900, Greg Kroah-Hartman wrote: > > On Thu, Mar 16, 2017 at 09:08:40PM -0300, Mauro Carvalho Chehab > > wrote: > > > The dwc2 hardware doesn't like to do DMA transfers without > > > aligning data in DWORD.