Re: [PATCH v2] usb: core: Add runtime resume checking in choose_wakeup()

2016-08-10 Thread Baolin Wang
On 10 August 2016 at 22:31, Alan Stern wrote: > On Wed, 10 Aug 2016, Baolin Wang wrote: > >> Considering strict power management for mobile device, we should also power >> off the usb controller if there are no slaves attached even though it is usb >> host function, but

Re: [PATCH] usb: core: Add runtime resume checking

2016-08-10 Thread Baolin Wang
Hi Alan, On 10 August 2016 at 22:25, Alan Stern wrote: > On Wed, 10 Aug 2016, Baolin Wang wrote: > >> >> >> For example: No slave attached> usb interface runtime suspend >> >> >> > usb device runtime suspend -> xhci suspend -> power off >> >> >> usb

Re: [PATCH v16 0/4] Introduce usb charger framework to deal with the usb gadget power negotation

2016-08-10 Thread Baolin Wang
Hi Felipe, On 1 August 2016 at 15:09, Baolin Wang wrote: > Currently the Linux kernel does not provide any standard integration of this > feature that integrates the USB subsystem with the system power regulation > provided by PMICs meaning that either vendors must add

Re: [PATCH] scsi: introduce a quirk for false cache reporting

2016-08-10 Thread Martin K. Petersen
> "Oliver" == Oliver Neukum writes: Oliver> Some SATA to USB bridges fail to cooperate with some drives Oliver> resulting in no cache being present being reported to the Oliver> host. That causes the host to skip sending a command to Oliver> synchronize caches. That causes

[PATCH 1/1] mfd: rtsx_usb: avoid setting ucr->current_sg.status

2016-08-10 Thread Lu Baolu
Member "status" of struct usb_sg_request is managed by usb core. A spin lock is used to serialize the change of it. The driver could check the value of req->status, but should avoid changing it without the hold of the spinlock. Otherwise, it could cause race or error in usb core. This patch could

[PATCH v3 1/1] usb: misc: usbtest: add fix for driver hang

2016-08-10 Thread Lu Baolu
In sg_timeout(), req->status is set to "-ETIMEDOUT" before calling into usb_sg_cancel(). usb_sg_cancel() will do nothing and return directly if req->status has been set to a non-zero value. This will cause driver hang whenever transfer time out is triggered. This patch fixes this issue. It could

Re: [PATCH v2 1/1] usb: misc: usbtest: add fix for driver hang

2016-08-10 Thread Lu Baolu
Hi, On 08/10/2016 10:16 PM, Alan Stern wrote: > On Wed, 10 Aug 2016, Lu Baolu wrote: > >> In sg_timeout(), req->status is set to "-ETIMEDOUT" before calling >> into usb_sg_cancel(). usb_sg_cancel() will do nothing and return >> directly if req->status has been set to a non-zero value. This will

[PATCH v2 1/3] usb: dwc3: gadget: increment request->actual once

2016-08-10 Thread Felipe Balbi
When using SG lists, we would end up setting request->actual to: num_mapped_sgs * (request->length - count) Let's fix that up by incrementing request->actual only once. Cc: Reported-by: Brian E Rogers Signed-off-by: Felipe Balbi

Re: wusbcore crypto stack sg

2016-08-10 Thread Greg KH
On Wed, Aug 10, 2016 at 06:09:51AM -0700, Andy Lutomirski wrote: > Hi Herbert, etc- > > drivers/usb/wusbcore/crypto.c is another sg-pointing-to-the-stack > user. Want to fix it? > > (Does wusb hardware even exist in the wild?) Supposedly, but I've never seen any :( -- To unsubscribe from

[PATCH v2 2/3] usb: dwc3: gadget: fix for short pkts during chained xfers

2016-08-10 Thread Felipe Balbi
DWC3 has one interesting peculiarity with chained transfers. If we setup N chained transfers and we get a short packet before processing all N TRBs, DWC3 will (conditionally) issue a XferComplete or XferInProgress event and retire all TRBs from the one which got a short packet to the last without

Re: [PATCH 3/3] usb: gadget: u_ether: fix dereference after null check coverify warning

2016-08-10 Thread Felipe Balbi
Hi, Peter Chen writes: > On Fri, Jul 01, 2016 at 03:33:30PM +0800, Peter Chen wrote: >> skb is checked for null pointer at above code, so skb might be null. >> eem_wrap uses it without checking null pointer, fix it by adding null >> pointer check. >> >> Signed-off-by:

[PATCH v2 3/3] usb: dwc3: gadget: always cleanup all TRBs

2016-08-10 Thread Felipe Balbi
If we stop earlier due to short packet, we will not be able to giveback all TRBs. Cc: Cc: Brian E Rogers Signed-off-by: Felipe Balbi --- Changes since V1: - Avoid a regression with non scatterlist

Re: Erratic USB device behavior and device loss

2016-08-10 Thread Alan Stern
On Wed, 10 Aug 2016, Ritesh Raj Sarraf wrote: > Hi, > > [Please CC me in replies. I'm not subscribed to the list] > > For around a year, since I got this machine, I've run into this problem. I > never > reported the problem because it seemed to occur with the device (Card Reader) > that I

[PATCH v2 1/1] usb: misc: usbtest: add fix for driver hang

2016-08-10 Thread Lu Baolu
In sg_timeout(), req->status is set to "-ETIMEDOUT" before calling into usb_sg_cancel(). usb_sg_cancel() will do nothing and return directly if req->status has been set to a non-zero value. This will cause driver hang whenever transfer time out is triggered. This patch fixes this issue. It could

Re: Is it ok if ModemManager process is killed AFTER network-interface is brought up and IP-Address assigned?

2016-08-10 Thread Pavel Machek
Hi! > > We are using Sierra's USB-to-WWAN driver on Ubuntu-14 for Sierra's > > MC8090 modem, and we have a requirement wherein we need to have access > > to the modem-serial-port (from our user-application that is). > > > > Right now, we see that /usr/sbin/ModemManager is always connected to > >

Re: [PATCH] usb: core: Add runtime resume checking

2016-08-10 Thread Peter Chen
On Wed, Aug 10, 2016 at 02:43:50PM +0800, Baolin Wang wrote: > Hi Peter, > > On 10 August 2016 at 14:18, Peter Chen wrote: > > On Wed, Aug 10, 2016 at 10:33:31AM +0800, Baolin Wang wrote: > >> Hi Greg, > >> > >> On 9 August 2016 at 18:26, Greg KH

[PACTH v6 2/2] usb: xhci: plat: Enable async suspend/resume

2016-08-10 Thread robert . foss
From: Andrew Bresticker USB host controllers can take a significant amount of time to suspend and resume, adding several hundred miliseconds to the kernel resume time. Since the XHCI controller has no outside dependencies (other than clocks, which are suspended

[PACTH v6 0/2] usb: xhci: plat: Enable runtime PM

2016-08-10 Thread robert . foss
From: Robert Foss This series enables runtime PM and asynchronous resume/suspend support for xhci-plat devices. Changes since v1: - Added Signed-off-by: Robert Foss - Added proper metadata tags to series Changes since v2: - Added missing

[PACTH v6 1/2] usb: xhci: plat: Enable runtime PM

2016-08-10 Thread robert . foss
From: Robert Foss Enable runtime PM for the xhci-plat device so that the parent device may implement runtime PM. Signed-off-by: Robert Foss Tested-by: Robert Foss --- drivers/usb/host/xhci-plat.c | 29

RE: [PATCH v4 2/3] usbip: vhci extension: modifications to userspace

2016-08-10 Thread fx IWATA NOBUO
Dear Greg, I remembered the dependency. --- from the cover letter --- 5. Dependencies This series depends on 'usbip: exporting devices' patch set because this includes changes to application side daemon which introduced the patch set. --- I checked this patch set works well to the latest

wusbcore crypto stack sg

2016-08-10 Thread Andy Lutomirski
Hi Herbert, etc- drivers/usb/wusbcore/crypto.c is another sg-pointing-to-the-stack user. Want to fix it? (Does wusb hardware even exist in the wild?) --Andy -- Andy Lutomirski AMA Capital Management, LLC -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a

Re: [PATCH v2] usb: core: Add runtime resume checking in choose_wakeup()

2016-08-10 Thread Alan Stern
On Wed, 10 Aug 2016, Baolin Wang wrote: > Considering strict power management for mobile device, we should also power > off the usb controller if there are no slaves attached even though it is usb > host function, but it will meet usb device resume failure in below situation. > > Suppose that no

Re: [PATCH v5 5/6] usb: chipidea: let chipidea core device of_node equal's glue layer device of_node

2016-08-10 Thread Peter Chen
On Wed, Aug 10, 2016 at 09:00:15AM +, Jun Li wrote: > Hi, Peter > > > -Original Message- > > From: linux-usb-ow...@vger.kernel.org [mailto:linux-usb- > > ow...@vger.kernel.org] On Behalf Of Peter Chen > > Sent: Wednesday, August 10, 2016 11:12 AM > > To: Stephen Boyd

Re: [PATCH] usb: core: Add runtime resume checking

2016-08-10 Thread Baolin Wang
Hi Peter, On 10 August 2016 at 14:18, Peter Chen wrote: > On Wed, Aug 10, 2016 at 10:33:31AM +0800, Baolin Wang wrote: >> Hi Greg, >> >> On 9 August 2016 at 18:26, Greg KH wrote: >> > On Tue, Aug 09, 2016 at 05:33:33PM +0800, Baolin Wang wrote:

Re: [PATCH] usb: core: Add runtime resume checking

2016-08-10 Thread Alan Stern
On Wed, 10 Aug 2016, Baolin Wang wrote: > >> >> For example: No slave attached> usb interface runtime suspend > >> >> > usb device runtime suspend -> xhci suspend -> power off > >> >> usb controller. After that if the system wants to enter suspend state, > >> >> then it also will

Re: [PATCHv4 0/2] USB Type-C Connector class

2016-08-10 Thread Oliver Neukum
On Tue, 2016-08-09 at 09:23 -0700, Guenter Roeck wrote: > > I'm not going to take this series until everyone agrees on it, > sorry. > > I'll wait for you and Guenter and Oliver to all come up with a > solution > > that works for everyone. > > > > I have not heard from Heikko for a while. There

[PATCH 1/3] usb: dwc3: gadget: increment request->actual once

2016-08-10 Thread Felipe Balbi
When using SG lists, we would end up setting request->actual to: num_mapped_sgs * (request->length - count) Let's fix that up by incrementing request->actual only once. Cc: Reported-by: Brian E Rogers Signed-off-by: Felipe Balbi

Re: [PATCH V2] usb: chipidea: udc: Use direction flags consequently

2016-08-10 Thread Stefan Wahren
I have already queued it at local tree for testing, and make the similar changes: commit c95b4427b7328b2618ca70fea65de0427f5d5734 Author: Stefan Wahren Date: Sat Jul 9 14:16:40 2016 + usb: chipidea: udc: Use direction flags consequently This driver

RE: [PATCH v5 5/6] usb: chipidea: let chipidea core device of_node equal's glue layer device of_node

2016-08-10 Thread Jun Li
Hi, Peter > -Original Message- > From: linux-usb-ow...@vger.kernel.org [mailto:linux-usb- > ow...@vger.kernel.org] On Behalf Of Peter Chen > Sent: Wednesday, August 10, 2016 11:12 AM > To: Stephen Boyd > Cc: Peter Chen ;

Re: [PATCH 2/4] usb: gadget: f_midi: defaults buflen sizes to 512

2016-08-10 Thread Felipe Balbi
Hi, "Felipe F. Tonello" writes: > 512 is the value used by wMaxPacketSize, as specified by the USB Spec. This this is only true for HS :-) FS and SS use different sizes. Do you want to use 1024 (SS maxp) by default instead? Then all speeds will have this working out

Re: [PATCH] usb: core: Add runtime resume checking

2016-08-10 Thread Baolin Wang
Hi Greg, On 10 August 2016 at 16:17, Greg KH wrote: > On Wed, Aug 10, 2016 at 10:33:31AM +0800, Baolin Wang wrote: >> Hi Greg, >> >> On 9 August 2016 at 18:26, Greg KH wrote: >> > On Tue, Aug 09, 2016 at 05:33:33PM +0800, Baolin Wang

Re: [PATCH] usb: core: Add runtime resume checking

2016-08-10 Thread Baolin Wang
On 10 August 2016 at 17:07, Peter Chen wrote: > On Wed, Aug 10, 2016 at 02:43:50PM +0800, Baolin Wang wrote: >> Hi Peter, >> >> On 10 August 2016 at 14:18, Peter Chen wrote: >> > On Wed, Aug 10, 2016 at 10:33:31AM +0800, Baolin Wang wrote: >> >> Hi

Re: [PATCH 3/3] usb: dwc3: gadget: always cleanup all TRBs

2016-08-10 Thread Felipe Balbi
Hi, Felipe Balbi writes: > If we stop earlier due to short packet, we will > want to giveback all TRBs. > > Cc: > Cc: Brian E Rogers > Signed-off-by: Felipe Balbi Wait a minute with

Re: [PATCHv4 0/2] USB Type-C Connector class

2016-08-10 Thread Felipe Balbi
Hi, Guenter Roeck writes: > On Tue, Aug 09, 2016 at 04:01:53PM +0200, Greg KH wrote: >> On Wed, Jun 29, 2016 at 04:38:36PM +0300, Heikki Krogerus wrote: >> > Hi, >> > >> > The USB Type-C class is meant to provide unified interface to the >> > userspace to present the USB

Re: USB - current limit ?

2016-08-10 Thread Oliver Neukum
On Tue, 2016-08-09 at 13:02 -0400, Alan Stern wrote: > There is a mechanism for the host system to tell the device how much > current to limit itself to. The host tells the device which > configuration to install; each configuration has a current limit > described by the bMaxPower field in

[PATCH v2] usb: core: Add runtime resume checking in choose_wakeup()

2016-08-10 Thread Baolin Wang
Considering strict power management for mobile device, we should also power off the usb controller if there are no slaves attached even though it is usb host function, but it will meet usb device resume failure in below situation. Suppose that no slave attached > usb interface runtime suspend

Re: [PATCH] usb: core: Add runtime resume checking

2016-08-10 Thread Peter Chen
On Wed, Aug 10, 2016 at 10:33:31AM +0800, Baolin Wang wrote: > Hi Greg, > > On 9 August 2016 at 18:26, Greg KH wrote: > > On Tue, Aug 09, 2016 at 05:33:33PM +0800, Baolin Wang wrote: > >> When the usb device has entered suspend state by runtime suspend method, > >>

Erratic USB device behavior and device loss

2016-08-10 Thread Ritesh Raj Sarraf
Hi, [Please CC me in replies. I'm not subscribed to the list] For around a year, since I got this machine, I've run into this problem. I never reported the problem because it seemed to occur with the device (Card Reader) that I didn't care much about. But now, it looks like the issue is hitting

Re: [PATCH 1/4] usb: gadget: f_midi: fixed endianness when using wMaxPacketSize

2016-08-10 Thread Felipe Balbi
Hi, Baolin Wang writes: > On 26 July 2016 at 07:15, Felipe F. Tonello wrote: >> USB spec specifies wMaxPacketSize to be little endian (as other properties), >> so when using this variable in the driver we should convert to the current >> CPU

[PATCH] usb: dwc3: gadget: stop processing on HWO set

2016-08-10 Thread Felipe Balbi
stop consuming TRBs when we reach one with HWO bit already set. This will prevent us from prematurely retiring a TRB. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git

Re: [PATCH 1/1] usb: misc: usbtest: add fix for driver hang

2016-08-10 Thread Lu Baolu
Hi, On 08/09/2016 10:18 PM, Alan Stern wrote: > On Tue, 9 Aug 2016, Felipe Balbi wrote: > >> Hi, >> >> Lu Baolu writes: >>> In sg_timeout(), req->status is set to "-ETIMEDOUT" before calling >>> into usb_sg_cancel(). usb_sg_cancel() will do nothing and return >>>

[PATCH] usb: dwc2: Add reset control to dwc2

2016-08-10 Thread Dinh Nguyen
From: Dinh Nguyen Allow for platforms that have a reset controller driver in place to bring the USB IP out of reset. Signed-off-by: Dinh Nguyen Acked-by: John Youn Tested-by: Stefan Wahren

[PATCH] usb: dwc3: don't set last bit for ISOC endpoints

2016-08-10 Thread Felipe Balbi
From: Janusz Dziedzic According to Synopsys Databook 2.60a, section 8.3.4, it's stated that: The LST bit should be set to 0 (isochronous transfers normally continue until the endpoint is removed entirely, at which time an End Transfer

[PATCH] USB: bcma: support old USB 2.0 controller on Northstar devices

2016-08-10 Thread Rafał Miłecki
From: Rafał Miłecki Currently bcma-hcd driver handles 3 different bcma cores: 1) BCMA_CORE_USB20_HOST (0x819) 2) BCMA_CORE_NS_USB20 (0x504) 3) BCMA_CORE_NS_USB30 (0x505) The first one was introduced years ago and so far was used on MIPS devices only. All Northstar (ARM)

Re: [PACTH v5 1/2] usb: xhci: plat: Enable runtime PM

2016-08-10 Thread Felipe Balbi
Hi, robert.f...@collabora.com writes: > From: Robert Foss > > Enable runtime PM for the xhci-plat device so that the parent device > may implement runtime PM. > > Signed-off-by: Robert Foss > > Tested-by: Robert Foss

Re: [PATCH v2 1/1] usb: misc: usbtest: add fix for driver hang

2016-08-10 Thread Alan Stern
On Wed, 10 Aug 2016, Lu Baolu wrote: > In sg_timeout(), req->status is set to "-ETIMEDOUT" before calling > into usb_sg_cancel(). usb_sg_cancel() will do nothing and return > directly if req->status has been set to a non-zero value. This will > cause driver hang whenever transfer time out is

[PATCH 2/3] usb: dwc3: gadget: fix for short pkts during chained xfers

2016-08-10 Thread Felipe Balbi
DWC3 has one interesting peculiarity with chained transfers. If we setup N chained transfers and we get a short packet before processing all N TRBs, DWC3 will (conditionally) issue a XferComplete or XferInProgress event and retire all TRBs from the one which got a short packet to the last without

[PATCH 3/3] usb: dwc3: gadget: always cleanup all TRBs

2016-08-10 Thread Felipe Balbi
If we stop earlier due to short packet, we will want to giveback all TRBs. Cc: Cc: Brian E Rogers Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 23 +++ 1 file changed, 3

Re: [PATCH] usb: gadget: fix check in sync read from ep in gadgetfs

2016-08-10 Thread Felipe Balbi
Binyamin Sharet writes: > On Mon, Jul 11, 2016 at 8:47 AM, Peter Chen wrote: >> On Sun, Jul 10, 2016 at 11:25:17AM +0300, Binyamin Sharet wrote: >>> Hi, >>> >>> Could someone please advise whether I should also open a bug in >>> bugzilla for this

[PATCH] usb: host: xhci-rcar: update firmware for R-Car H3 and M3-W

2016-08-10 Thread Yoshihiro Shimoda
This patch updates the firmware files for R-Car H3 and M3-W to fix the device detection issue. The md5sum of the files are: 645db7e9056029efa15f158e51cc8a11 r8a779x_usb3_v2.dlmem 687d5d42f38f9850f8d5a6071dca3109 r8a779x_usb3_v3.dlmem Signed-off-by: Yoshihiro Shimoda