Re: [PATCH] phy: phy-mt65xx-usb3: fix test fail of HS receiver sensitivity

2015-11-16 Thread chunfeng yun
Hi, On Mon, 2015-11-16 at 22:16 -0800, Greg KH wrote: > On Tue, Nov 17, 2015 at 02:02:58PM +0800, Chunfeng Yun wrote: > > when use the default value 8 of RG_USB20_SQTH, the HS receiver > > sensitivity test of HQA will fail, set it as 2 to fix up the > > issue. > > > > Change-Id: Ia5bdbbfc8ebb170d3

[PATCH v4 04/12] usb: xhci: dbc: add support for Intel xHCI dbc quirk

2015-11-16 Thread Lu Baolu
On Intel platforms, if the debug target is connected with debug host, enabling DCE bit in command register leads to a port hung state. In the hung state, the host system will not see a port connected status bit set. Hence debug target fails to be probed. The state could be resolved by performing a

[PATCH v4 00/12] usb: early: add support for early printk through USB3 debug port

2015-11-16 Thread Lu Baolu
Hi, This patch series adds support for early printk through USB3 debug port. USB3 debug port is described in xHCI specification as an optional extended capability. The first patch adds a file in sysfs, through which users can check whether the debug capability is supported by a specific host cont

[PATCH v4 01/12] usb: xhci: add sysfs file for xHCI debug port

2015-11-16 Thread Lu Baolu
This patch adds a sysfs file for users to check 1) whether the debug capability is implemented by hardware; 2) if supported, which state does it stay at. With a host that supports debug port, a file named "debug_port_state" will be created under the device sysfs directory. Reading this file will s

[PATCH v4 03/12] usb: xhci: dbc: probe and setup xhci debug capability

2015-11-16 Thread Lu Baolu
xHCI debug capability (DbC) is an optional functionality provided by an xHCI host controller. Software learns this capability by walking through the extended capability list in mmio of the host. This patch introduces the code to probe and initialize the debug capability hardware during early boot.

[PATCH v4 02/12] x86: fixmap: add permanent fixmap for xhci debug port

2015-11-16 Thread Lu Baolu
xHCI compatible USB3 host controller may provide debug capability which enables low-level system debug over USB. In order to probing this debug capability, Linux kernel needs to map and access the mmio of the host controller during early boot. This patch adds permenent fixmap pages in fixed_addres

[PATCH v4 06/12] usb: xhci: dbc: add bulk out and bulk in interfaces

2015-11-16 Thread Lu Baolu
This patch adds interfaces for bulk out and bulk in ops. These interfaces could be used to implement early printk bootconsole or hook to various system debuggers. Signed-off-by: Lu Baolu --- drivers/usb/early/xhci-dbc.c | 373 +++ include/linux/usb/xhci-db

[PATCH v4 05/12] usb: xhci: dbc: add debug buffer

2015-11-16 Thread Lu Baolu
"printk" is not suitable for dbc debugging especially when console is in usage. This patch adds a debug buffer in dbc driver and puts the debug messages in this local buffer. The debug buffer could be dumped whenever the console is not in use. This part of code will not be visible unless DBC_DEBUG

[PATCH v4 08/12] usb: xhci: dbc: handle endpoint stall

2015-11-16 Thread Lu Baolu
In case of endpoint stall, software is able to detect the situation by reading DCCTRL.HIT or DCCTRL.HOT bits. DbC follows the normal USB framework to handle endpoint stall. When software detects endpoint stall situation, it should wait until endpoint is recovered before read or write oprations. Si

[PATCH v4 07/12] usb: xhci: dbc: handle dbc-configured exit

2015-11-16 Thread Lu Baolu
DbC might exit configured state in some cases (refer to 7.6.4.4 in xHCI spec 1.1). Software needs detect and clear this situation by clearing DCCTRL.DCR and wait until the DbC configured before read or write oprations. Signed-off-by: Lu Baolu --- drivers/usb/early/xhci-dbc.c | 28 +++

[PATCH v4 10/12] usb: xhci: dbc: add handshake between debug target and host

2015-11-16 Thread Lu Baolu
After DbC setup, debug target needs to wait until tty driver and application (e.g. mincom) on debug taget start. Otherwise, out messages might be ignored. This patch adds a ping/pong mechanism between debug target and host. Debug target will be waiting there until user presses 'Y' or 'y' in the t

[PATCH v4 09/12] x86: early_printk: add USB3 debug port earlyprintk support

2015-11-16 Thread Lu Baolu
Add support for early printk by writing debug messages to the USB3 debug port. Users can use this type of early printk by specifying kernel parameter of "earlyprintk=xdbc". This gives users a chance of providing debug output. Signed-off-by: Lu Baolu --- Documentation/kernel-parameters.txt | 1 +

[PATCH v4 11/12] usb: serial: usb_debug: add support for dbc debug device

2015-11-16 Thread Lu Baolu
This patch add dbc debug device support in usb_debug driver. Signed-off-by: Lu Baolu Acked-by: Johan Hovold --- drivers/usb/serial/usb_debug.c | 28 +--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/drivers/usb/serial/usb_debug.c b/drivers/usb/serial/us

[PATCH v4 12/12] usb: doc: add document for xHCI DbC driver

2015-11-16 Thread Lu Baolu
Add Documentation/usb/xhci-dbc.txt. This document includes development status and user guide for USB3 debug port. Signed-off-by: Lu Baolu --- Documentation/usb/xhci-dbc.txt | 325 + MAINTAINERS| 1 + drivers/usb/early/xhci-dbc.c |

[PATCH] HID: usbhid: add Logitech G710+ keyboard quirk NOGET

2015-11-16 Thread Jimmy Berry
Without quirk keyboard repeats '6' until volume control is used since it indicates the key is pressed without ever releasing. Signed-off-by: Jimmy Berry --- drivers/hid/hid-ids.h | 1 + drivers/hid/usbhid/hid-quirks.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/hid/hi

Re: [PATCH] phy: phy-mt65xx-usb3: fix test fail of HS receiver sensitivity

2015-11-16 Thread Greg KH
On Tue, Nov 17, 2015 at 02:02:58PM +0800, Chunfeng Yun wrote: > when use the default value 8 of RG_USB20_SQTH, the HS receiver > sensitivity test of HQA will fail, set it as 2 to fix up the > issue. > > Change-Id: Ia5bdbbfc8ebb170d3ef26007e665b7350b6d28ab What is this field for? Hint, it should

Re: [RESEND] phy: core: Get a refcount to phy in devm_of_phy_get_by_index()

2015-11-16 Thread Jisheng Zhang
Hi, On Tue, 17 Nov 2015 13:56:48 +0800 Chunfeng Yun wrote: > On driver detach, devm_phy_release() will put a refcount to > the phy, so gets a refconut to it before return. > > Change-Id: I56fe428bf945f19c38d56245978c8ca17340eb2c This line need to be removed > Signed-off-by: Chunfeng Yun >

[PATCH] phy: phy-mt65xx-usb3: improve HS eye diagram

2015-11-16 Thread Chunfeng Yun
calibrate HS slew rate and switch 100uA current to SSUSB to improve HS eye diagram of HQA test. Change-Id: I6d392c7fffb32b3a710e3a8dda92710886806d90 Signed-off-by: Chunfeng Yun --- drivers/phy/phy-mt65xx-usb3.c | 99 +-- 1 file changed, 96 insertions(+), 3

[PATCH] phy: phy-mt65xx-usb3: fix test fail of HS receiver sensitivity

2015-11-16 Thread Chunfeng Yun
when use the default value 8 of RG_USB20_SQTH, the HS receiver sensitivity test of HQA will fail, set it as 2 to fix up the issue. Change-Id: Ia5bdbbfc8ebb170d3ef26007e665b7350b6d28ab Signed-off-by: Chunfeng Yun --- drivers/phy/phy-mt65xx-usb3.c | 7 +-- 1 file changed, 5 insertions(+), 2 de

[RESEND] phy: core: Get a refcount to phy in devm_of_phy_get_by_index()

2015-11-16 Thread Chunfeng Yun
On driver detach, devm_phy_release() will put a refcount to the phy, so gets a refconut to it before return. Change-Id: I56fe428bf945f19c38d56245978c8ca17340eb2c Signed-off-by: Chunfeng Yun --- drivers/phy/phy-core.c | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) d

Re: [RFC] usb: dwc2: hcd: fix split schedule issue

2015-11-16 Thread Doug Anderson
John, On Wed, Nov 11, 2015 at 8:29 PM, John Youn wrote: > On 11/11/2015 4:22 PM, Doug Anderson wrote: >> John, >> >> On Fri, Nov 6, 2015 at 2:04 AM, Yunzhi Li wrote: >>> hi John , >>> >>> As we talked yesterday, I tried to fix the split schedule sequence. This >>> patch will >>> avoid scheduli

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-16 Thread Doug Anderson
John, On Mon, Nov 16, 2015 at 5:53 PM, John Youn wrote: > Yup it's only available in host mode. The same with all the > host-mode registers. You will get a ModeMis interrupt if you > try to access them in device mode. > > I gave my test-by on the v2 patches earlier, no problems here. Yup, I appr

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-16 Thread John Youn
On 11/16/2015 3:14 PM, Doug Anderson wrote: > Alan, > > On Mon, Nov 16, 2015 at 12:31 PM, Alan Stern > wrote: >> On Mon, 16 Nov 2015, Doug Anderson wrote: >> >>> Alan, >>> >>> On Mon, Nov 16, 2015 at 11:31 AM, Alan Stern >>> wrote: On Mon, 16 Nov 2015, Doug Anderson wrote: > ---

Re: [PATCH 1/3] usb: gadget: f_sourcesink: add queue depth

2015-11-16 Thread Peter Chen
On Mon, Nov 16, 2015 at 05:56:25PM +0100, Krzysztof Opasiak wrote: > > > On 11/13/2015 09:00 AM, Peter Chen wrote: > >Add queue depth for both iso and bulk transfer, with more queues, we > >can do performance and stress test using sourcesink, and update g_zero > >accordingly. > > > >Signed-off-by

[PATCH v3 5/8] usb: dwc2: host: Keep track of and use our scheduled microframe

2015-11-16 Thread Douglas Anderson
The microframe scheduler did a lot of work to pick the proper microframe. Then dwc2_sched_periodic_split() went ahead and ignored which microframe we picked if it ever needed to re-assign things. Let's keep track of the uframe and then we'll always use it. Signed-off-by: Douglas Anderson --- Ch

[PATCH v3 3/8] usb: dwc2: host: Add scheduler tracing

2015-11-16 Thread Douglas Anderson
In preparation for future changes to the scheduler let's add some tracing that makes it easy for us to see what's happening. By default this tracing will be off. Note that I've chosen to point tracing at ftrace rather than the console since performance is pretty critical for these traces and ftra

[PATCH v3 6/8] usb: dwc2: host: Assume all devices are on one single_tt hub

2015-11-16 Thread Douglas Anderson
Until we have logic to determine which devices share the same TT let's add logic to assume that all devices on a given dwc2 controller are on one single_tt hub. This is better than the previous code that assumed that all devices were on one multi_tt hub, since single_tt hubs appear (in my experien

[PATCH v3 7/8] usb: dwc2: host: Add a delay before releasing periodic bandwidth

2015-11-16 Thread Douglas Anderson
We'd like to be able to use HCD_BH in order to speed up the dwc2 host interrupt handler quite a bit. However, according to the kernel doc for usb_submit_urb() (specifically the part about "Reserved Bandwidth Transfers"), we need to keep a reservation active as long as a device driver keeps submitt

[PATCH v3 8/8] usb: dwc2: host: Giveback URB in tasklet context

2015-11-16 Thread Douglas Anderson
In commit 94dfd7edfd5c ("USB: HCD: support giveback of URB in tasklet context") support was added to give back the URB in tasklet context. Let's take advantage of this in dwc2. This speeds up the dwc2 interrupt handler considerably. Note that this requires the change ("usb: dwc2: host: Add a dela

[PATCH v3 0/8] dwc2: Fix uframe scheduler + speed up the interrupt handler quite a bit

2015-11-16 Thread Douglas Anderson
This series now effectively has two purposes: 1. Speed up dwc2 interrupt latency. 2. Start fixing up the microframe scheduler. ...the two things were separate series in the past but they ended up running into each other, so now they're combined. To summarize what we have here: 1. usb: dwc2: rock

[PATCH v3 4/8] usb: dwc2: host: Rewrite the microframe scheduler

2015-11-16 Thread Douglas Anderson
The old microframe scheduler was hard to follow and had some bugs in it. Specifically, I made some code to visualize what was happening and found: Add W (280 us): WW|WW| | | | | | Add B (260 us): WW|WW|BB|BB

[PATCH v3 1/8] usb: dwc2: rockchip: Make the max_transfer_size automatic

2015-11-16 Thread Douglas Anderson
Previously we needed to set the max_transfer_size to explicitly be 65535 because the old driver would detect that our hardware could support much bigger transfers and then would try to do them. This wouldn't work since the DMA alignment code couldn't support it. Later in commit e8f8c14d9da7 ("usb

[PATCH v3 2/8] usb: dwc2: host: Get aligned DMA in a more supported way

2015-11-16 Thread Douglas Anderson
All other host controllers who want aligned buffers for DMA do it a certain way. Let's do that too instead of working behind the USB core's back. This makes our interrupt handler not take forever and also rips out a lot of code, simplifying things a bunch. This also has the side effect of removi

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-16 Thread Doug Anderson
Alan, On Mon, Nov 16, 2015 at 12:31 PM, Alan Stern wrote: > On Mon, 16 Nov 2015, Doug Anderson wrote: > >> Alan, >> >> On Mon, Nov 16, 2015 at 11:31 AM, Alan Stern >> wrote: >> > On Mon, 16 Nov 2015, Doug Anderson wrote: >> > >> >> --- >> >> >> >> usb: dwc2: host: Fix missing device insertions

[PATCHv3] Input: xpad - Fix double URB submission races

2015-11-16 Thread Laura Abbott
The xpad driver has several races with respect to URB submission which make it easy to end up with submission while active: [ cut here ] WARNING: CPU: 3 PID: 3563 at drivers/usb/core/urb.c:339 usb_submit_urb+0x2ad/0x5a0() URB 8804078ac240 submitted while active CPU: 3 P

Re: [PATCH] usb: dwc2: hcd: fix periodic transfer schedule sequence

2015-11-16 Thread Caesar Wang
Hi, 在 2015年11月16日 23:25, Yunzhi Li 写道: When checking dwc2 host channel interrupts, handle qh in periodic_sched_queued list at first, then we could make sure CSPLIT packets scheduled in the same order as SSPLIT packets. Signed-off-by: Yunzhi Li This patch can fix some usb issues on my hand ma

Re: [RFC] usb: dwc2: hcd: fix split schedule issue

2015-11-16 Thread Julius Werner
> To handle things smarter, I think I need to research how to deal with > hubs attached to hubs attached to hubs. For instance: > > dwc2 > -> multi_tt hub > -> single_tt hub > -> device 1 > -> device 2 Keep in mind that there's always at most one (active) TT between host and d

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-16 Thread Alan Stern
On Mon, 16 Nov 2015, Julius Werner wrote: > Another point to note, which I think is what prevents the flow Alan > suggested from working, is this little snippet in DWC2's hub_control > GetPortStatus callback: > > if (!hsotg->flags.b.port_connect_status) { >

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-16 Thread Alan Stern
On Mon, 16 Nov 2015, Doug Anderson wrote: > Alan, > > On Mon, Nov 16, 2015 at 11:31 AM, Alan Stern > wrote: > > On Mon, 16 Nov 2015, Doug Anderson wrote: > > > >> --- > >> > >> usb: dwc2: host: Fix missing device insertions > >> > >> If you've got your interrupt signals bouncing a bit as you in

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-16 Thread Julius Werner
Another point to note, which I think is what prevents the flow Alan suggested from working, is this little snippet in DWC2's hub_control GetPortStatus callback: if (!hsotg->flags.b.port_connect_status) { /* * The port is disconnected

Re: Infrastructure for zerocopy I/O

2015-11-16 Thread Alan Stern
On Mon, 16 Nov 2015, Christoph Hellwig wrote: > On Mon, Nov 16, 2015 at 08:03:12PM +0100, Steinar H. Gunderson wrote: > > The original use case: DVB capture on embedded devices. > > > > My use case: USB3 uncompressed HD video capture (from multiple cards). > > > > Both of these hit (beyond the s

Re: [PATCH 1/1] net: usb: cdc_ether: add Dell DW5580 as a mobile broadband adapter

2015-11-16 Thread David Miller
From: Daniele Palmas Date: Fri, 13 Nov 2015 18:01:21 +0100 > Since Dell DW5580 is a 3G modem, this patch adds the device as a > mobile broadband adapter > > Signed-off-by: Daniele Palmas Applied. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message t

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-16 Thread Doug Anderson
Alan, On Mon, Nov 16, 2015 at 11:31 AM, Alan Stern wrote: > On Mon, 16 Nov 2015, Doug Anderson wrote: > >> --- >> >> usb: dwc2: host: Fix missing device insertions >> >> If you've got your interrupt signals bouncing a bit as you insert your >> USB device, you might end up in a state when the devi

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-16 Thread Alan Stern
On Mon, 16 Nov 2015, Doug Anderson wrote: > --- > > usb: dwc2: host: Fix missing device insertions > > If you've got your interrupt signals bouncing a bit as you insert your > USB device, you might end up in a state when the device is connected but > the driver doesn't know it. > > Specifically

Re: [PATCH] usb: phy: msm: fix a possible NULL dereference

2015-11-16 Thread Felipe Balbi
Hi, (you need to break your lines at 80 characters) Corentin LABBE writes: > Le 16/11/2015 18:07, Felipe Balbi a écrit : >> >> Hi, >> >> LABBE Corentin writes: >>> of_match_device could return NULL, and so cause a NULL pointer >>> dereference later. Renaming id to of_id (like all others do)

Re: [PATCH] usb: phy: msm: fix a possible NULL dereference

2015-11-16 Thread Corentin LABBE
Le 16/11/2015 18:07, Felipe Balbi a écrit : > > Hi, > > LABBE Corentin writes: >> of_match_device could return NULL, and so cause a NULL pointer >> dereference later. Renaming id to of_id (like all others do) in the >> process. >> >> Reported-by: coverity (CID 1324133) >> Signed-off-by: LABBE Co

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-16 Thread Felipe Balbi
hi, Doug Anderson writes: > Felipe, > > On Mon, Nov 16, 2015 at 10:22 AM, Felipe Balbi wrote: >>> I added "force" in v2 of the patch in response to John's feedback to >>> v1. He pointed out that when you unload the module when you have a >>> device connected that my v1 patch would not properly

Re: Infrastructure for zerocopy I/O

2015-11-16 Thread Christoph Hellwig
On Mon, Nov 16, 2015 at 08:03:12PM +0100, Steinar H. Gunderson wrote: > The original use case: DVB capture on embedded devices. > > My use case: USB3 uncompressed HD video capture (from multiple cards). > > Both of these hit (beyond the speed boost from zerocopy) the problem that > as time goes b

Re: Infrastructure for zerocopy I/O

2015-11-16 Thread Steinar H. Gunderson
On Mon, Nov 16, 2015 at 07:55:45PM +0100, Christoph Hellwig wrote: >> A proposed patch has been posted >> (http://marc.info/?l=linux-usb&m=144763502829452&w=2), but I'm not >> convinced that it is the best approach. For instance, it always tries >> to get contiguous pages and so is vulnerable to

Re: Infrastructure for zerocopy I/O

2015-11-16 Thread Christoph Hellwig
On Mon, Nov 16, 2015 at 01:29:58PM -0500, Alan Stern wrote: > Allocating memory pages that match the device's DMA mask, for > use as I/O buffers, and locking them so their physical > addresses don't change (and they don't get paged out); > > Mapping those pages into a use

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-16 Thread Doug Anderson
Felipe, On Mon, Nov 16, 2015 at 10:22 AM, Felipe Balbi wrote: >> I added "force" in v2 of the patch in response to John's feedback to >> v1. He pointed out that when you unload the module when you have a >> device connected that my v1 patch would not properly disconnect the >> device (or, rather

Re: Infrastructure for zerocopy I/O

2015-11-16 Thread Steinar H. Gunderson
On Mon, Nov 16, 2015 at 01:29:58PM -0500, Alan Stern wrote: > A proposed patch has been posted > (http://marc.info/?l=linux-usb&m=144763502829452&w=2), but I'm not > convinced that it is the best approach. For instance, it always tries > to get contiguous pages and so is vulnerable to memory frag

Re: [PATCH] USB-EHCI: Delete unnecessary checks before the function call "dma_pool_destroy"

2015-11-16 Thread Alan Stern
On Mon, 16 Nov 2015, SF Markus Elfring wrote: > From: Markus Elfring > Date: Mon, 16 Nov 2015 19:01:44 +0100 > > The dma_pool_destroy() function tests whether its argument is NULL > and then returns immediately. Thus the test around the calls is not needed. > > This issue was detected by using

Infrastructure for zerocopy I/O

2015-11-16 Thread Alan Stern
Christoph: Can you help answer some questions about implementing zerocopy I/O? We would like to add zerocopy support for USB devices. Basically this means: Allocating memory pages that match the device's DMA mask, for use as I/O buffers, and locking them so their physical

Re: [PATCH] usb: dwc2: hcd: fix periodic transfer schedule sequence

2015-11-16 Thread Doug Anderson
Yunzhi On Mon, Nov 16, 2015 at 7:25 AM, Yunzhi Li wrote: > When checking dwc2 host channel interrupts, handle qh in > periodic_sched_queued list at first, then we could make sure CSPLIT > packets scheduled in the same order as SSPLIT packets. > > Signed-off-by: Yunzhi Li > --- > drivers/usb/dwc

Re: at91sam9x5: USB mass storage gadget problems

2015-11-16 Thread Felipe Balbi
Hi, Boris Brezillon writes: >> >> If I don't hear anything on this issue then I can produce >> >> a patch. Does it go through the ARM or USB (or both) trees? >> > >> > You can go ahead and send a patch to the ARM and USB MLs (+ >> > appropriate maintainers), unless you want me to do it. >> >

[PATCH] usb: gadget: atmel_usba_udc: Expose correct device speed

2015-11-16 Thread Boris Brezillon
From: Douglas Gilbert Following changes that appeared in lk 4.0.0, the gadget udc driver for some ARM based Atmel SoCs (e.g. at91sam9x5 and sama5d3 families) incorrectly deduced full-speed USB link speed even when the hardware had negotiated a high-speed link. The fix is to make sure that the UDP

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-16 Thread Felipe Balbi
Hi, Doug Anderson writes: > Felipe, > > On Mon, Nov 16, 2015 at 9:44 AM, Felipe Balbi wrote: >>> extern void dwc2_hcd_start(struct dwc2_hsotg *hsotg); >>> #else >>> static inline int dwc2_hcd_get_frame_number(struct dwc2_hsotg *hsotg) >>> { return 0; } >>> -static inline void dwc2_hcd_disco

Re: at91sam9x5: USB mass storage gadget problems

2015-11-16 Thread Boris Brezillon
Hi Felipe, On Mon, 16 Nov 2015 11:17:56 -0600 Felipe Balbi wrote: > > Hi, > > Boris Brezillon writes: > > Hi Douglas, > > > > On Sat, 14 Nov 2015 14:15:30 -0500 > > Douglas Gilbert wrote: > > > >> On 15-11-12 05:18 PM, Alan Stern wrote: > >> > On Thu, 12 Nov 2015, Douglas Gilbert wrote: > >>

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-16 Thread Doug Anderson
Felipe, On Mon, Nov 16, 2015 at 9:44 AM, Felipe Balbi wrote: >> extern void dwc2_hcd_start(struct dwc2_hsotg *hsotg); >> #else >> static inline int dwc2_hcd_get_frame_number(struct dwc2_hsotg *hsotg) >> { return 0; } >> -static inline void dwc2_hcd_disconnect(struct dwc2_hsotg *hsotg) {} >> +

[PATCH] USB-EHCI: Delete unnecessary checks before the function call "dma_pool_destroy"

2015-11-16 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 16 Nov 2015 19:01:44 +0100 The dma_pool_destroy() function tests whether its argument is NULL and then returns immediately. Thus the test around the calls is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

Re: [PATCH v2] USB: qcserial: Fix support for HP lt4112 LTE/HSPA+ Gobi 4G Modem

2015-11-16 Thread Johan Hovold
On Mon, Nov 16, 2015 at 01:15:46PM +0100, Bjørn Mork wrote: > The DEVICE_HWI type was added under the faulty assumption that Huawei > devices based on Qualcomm chipsets and firmware use the static USB > interface numbering known from Gobi devices. But this model does > not apply to Huawei devices

Re: [PATCH v2 1/2] usb: dwc2: host: Fix missing device insertions

2015-11-16 Thread Felipe Balbi
Hi, (replying here for the context of why I think this is NOT the smallest patch possible for the -rc) Douglas Anderson writes: > If you've got your interrupt signals bouncing a bit as you insert your > USB device, you might end up in a state when the device is connected but > the driver doesn'

Kernel v4.3 - RCU hang, USB implicated

2015-11-16 Thread Ilia Mirkin
Hello all, I'm not sure if USB hung because RCU died, or actually caused the RCU death itself. Hopefully the below is useful in determining the issue. I have a pretty standard system with a Haswell i7-4790 CPU, and these USB controllers: 00:14.0 USB controller [0c03]: Intel Corporation 8 Series/C

Re: [PATCH v2 2/2] usb: dwc2: host: Clear interrupts before handling them

2015-11-16 Thread Doug Anderson
Felipe, On Mon, Nov 16, 2015 at 8:28 AM, Felipe Balbi wrote: > > Hi, > > Douglas Anderson writes: >> In general it is wise to clear interrupts before processing them. If >> you don't do that, you can get: >> 1. Interrupt happens >> 2. You look at system state and process interrupt >> 3. A ne

Re: [PATCH 07/21] usb/gadget: Remove set-but-not-used variables

2015-11-16 Thread Felipe Balbi
Christoph Hellwig writes: > On Thu, Oct 22, 2015 at 03:55:45PM -0700, Bart Van Assche wrote: >> Avoid that building with W=1 triggers compiler warnings about >> set-but-not-used variables. > > Looks good, > > Reviewed-by: Christoph Hellwig should I take this patch or will it go through Target ?

Re: [PATCH 2/2] usb: phy: msm: fix connect/disconnect bug for dragonboard OTG port

2015-11-16 Thread Felipe Balbi
Hi, Peter Chen writes: > On Wed, Nov 11, 2015 at 09:48:00AM -0800, Tim Bird wrote: >> >> >> On 11/10/2015 07:14 PM, Peter Chen wrote: >> > On Tue, Nov 10, 2015 at 04:46:51PM -0800, Tim Bird wrote: >> >> This fixes a bug where if you disconnect and re-connect the USB cable, >> >> the gadget dri

Re: at91sam9x5: USB mass storage gadget problems

2015-11-16 Thread Felipe Balbi
Hi, Boris Brezillon writes: > Hi Douglas, > > On Sat, 14 Nov 2015 14:15:30 -0500 > Douglas Gilbert wrote: > >> On 15-11-12 05:18 PM, Alan Stern wrote: >> > On Thu, 12 Nov 2015, Douglas Gilbert wrote: >> > >> >> Yes, the X201 has USB 2.0 host ports. It is running a stock Ubuntu >> >> 15.10 kerne

Re: [PATCH] usb: musb: enable usb_dma parameter

2015-11-16 Thread Felipe Balbi
Hi, Bin Liu writes: > On 11/13/2015 06:57 PM, Greg KH wrote: >> On Fri, Nov 13, 2015 at 03:45:24PM -0600, Bin Liu wrote: >>> Change the permission of usb_dma parameter so it can be used for runtime >>> debug without reboot. >> >> Why would you want to do that? This is only used at init time, so

Re: [linux-sunxi] Re: [PATCH 2/2] ehci-platform: Add support for controllers with multiple reset lines

2015-11-16 Thread Hans de Goede
Hi, On 16-11-15 18:01, Philipp Zabel wrote: Am Montag, den 16.11.2015, 17:49 +0100 schrieb Hans de Goede: Hi, On 16-11-15 17:04, Chen-Yu Tsai wrote: On Mon, Nov 16, 2015 at 11:42 PM, Alan Stern wrote: On Sun, 15 Nov 2015, Hans de Goede wrote: From: Reinder de Haan At least the EHCI foun

Re: [PATCH 1/1] usb: gadget: f_loopback: fix the warning during the enumeration

2015-11-16 Thread Felipe Balbi
Hi Krzysztof Opasiak writes: > On 11/16/2015 05:34 PM, Felipe Balbi wrote: >> >> Hi, >> >> Peter Chen writes: >>> The current code tries to allocate memory with GFP_KERNEL at >>> interrupt context, it would show below warning during the enumeration >>> when I test it with chipidea hardware, cha

Re: [PATCH] usb: phy: msm: fix a possible NULL dereference

2015-11-16 Thread Felipe Balbi
Hi, LABBE Corentin writes: > of_match_device could return NULL, and so cause a NULL pointer > dereference later. Renaming id to of_id (like all others do) in the > process. > > Reported-by: coverity (CID 1324133) > Signed-off-by: LABBE Corentin > --- > drivers/usb/phy/phy-msm-usb.c | 9 ++-

[PATCH] usb: dwc3: gadget: let us set lower max_speed

2015-11-16 Thread Felipe Balbi
From: Ben McCauley In some SoCs, dwc3 is implemented as a USB2.0 only core, meaning that it can't ever achieve SuperSpeed. Currect driver always sets gadget.max_speed to USB_SPEED_SUPER unconditionally. This can causes issues to some Host stacks where the host will issue a GetBOS() request and w

Re: [linux-sunxi] Re: [PATCH 2/2] ehci-platform: Add support for controllers with multiple reset lines

2015-11-16 Thread Philipp Zabel
Am Montag, den 16.11.2015, 17:49 +0100 schrieb Hans de Goede: > Hi, > > On 16-11-15 17:04, Chen-Yu Tsai wrote: > > On Mon, Nov 16, 2015 at 11:42 PM, Alan Stern > > wrote: > >> On Sun, 15 Nov 2015, Hans de Goede wrote: > >> > >>> From: Reinder de Haan > >>> > >>> At least the EHCI found on the A

Re: [PATCH 1/2] reset: Add of_reset_control_get_by_index

2015-11-16 Thread Philipp Zabel
Hi Hans, Am Sonntag, den 15.11.2015, 20:44 +0100 schrieb Hans de Goede: > From: Reinder de Haan > > In some cases it is useful to be able to get a reset-controller by > index rather then by name. E.g. for a generic ip-block driver such > as the ehci-platform drivers which needs to support more t

Re: [PATCH 1/3] usb: gadget: f_sourcesink: add queue depth

2015-11-16 Thread Krzysztof Opasiak
On 11/13/2015 09:00 AM, Peter Chen wrote: Add queue depth for both iso and bulk transfer, with more queues, we can do performance and stress test using sourcesink, and update g_zero accordingly. Signed-off-by: Peter Chen --- drivers/usb/gadget/function/f_sourcesink.c | 144 +

Re: [PATCH 03/23] usb: gadget: f_sourcesink: free requests in sourcesink_disable()

2015-11-16 Thread Krzysztof Opasiak
Hi, On 11/10/2015 03:02 AM, Peter Chen wrote: On Fri, Nov 06, 2015 at 10:58:39AM +0100, Krzysztof Opasiak wrote: On 11/06/2015 10:48 AM, Peter Chen wrote: On Fri, Nov 06, 2015 at 09:50:11AM +0100, Robert Baldyga wrote: On 11/06/2015 09:15 AM, Peter Chen wrote: On Tue, Nov 03, 2015 at 01:53

Re: [linux-sunxi] Re: [PATCH 2/2] ehci-platform: Add support for controllers with multiple reset lines

2015-11-16 Thread Hans de Goede
Hi, On 16-11-15 17:04, Chen-Yu Tsai wrote: On Mon, Nov 16, 2015 at 11:42 PM, Alan Stern wrote: On Sun, 15 Nov 2015, Hans de Goede wrote: From: Reinder de Haan At least the EHCI found on the Allwinnner H3 SoC needs multiple reset lines, the controller will not initialize while the reset for

Re: [PATCH 1/1] usb: gadget: f_loopback: fix the warning during the enumeration

2015-11-16 Thread Krzysztof Opasiak
On 11/16/2015 05:34 PM, Felipe Balbi wrote: Hi, Peter Chen writes: The current code tries to allocate memory with GFP_KERNEL at interrupt context, it would show below warning during the enumeration when I test it with chipidea hardware, change GFP flag as GFP_ATOMIC can fix this issue. [

RE: [PATCH] USB: DCW3: GADGET: Set Correct Max Speed

2015-11-16 Thread Felipe Balbi
Hi, "McCauley, Ben" writes: >> Ben, can you respin your patch to also add the comment explaining the >> situation so we don't loose track of it ? Then I can apply once -rc1 is out. >> >> thanks >> >> -- >> Balbi > > The max speed was always being set to USB_SUPER_SPEED > even when the phy was

Re: [PATCH v2] usb: musb: fix tx fifo flush handling

2015-11-16 Thread Felipe Balbi
Hi, Sergei Shtylyov writes: > Hello. > > On 11/06/2015 12:44 AM, Felipe Balbi wrote: > >>> Here are a few changes in musb_h_tx_flush_fifo(). >>> >>> - Refering to 2ccc6d30a (usb: musb: fix bit mask for CSR in >>> musb_h_tx_flush_fifo()), the datasheet says th

Re: [PATCH 1/1] usb: gadget: f_loopback: fix the warning during the enumeration

2015-11-16 Thread Felipe Balbi
Hi, Peter Chen writes: > The current code tries to allocate memory with GFP_KERNEL at > interrupt context, it would show below warning during the enumeration > when I test it with chipidea hardware, change GFP flag as GFP_ATOMIC > can fix this issue. > > [ 40.438237] zero gadget: high-speed co

Re: [PATCH v2 2/2] usb: dwc2: host: Clear interrupts before handling them

2015-11-16 Thread Felipe Balbi
Hi, Douglas Anderson writes: > In general it is wise to clear interrupts before processing them. If > you don't do that, you can get: > 1. Interrupt happens > 2. You look at system state and process interrupt > 3. A new interrupt happens > 4. You clear interrupt without processing it. > > T

Re: [PATCH v6 4/4] power: wm831x_power: Support USB charger current limit management

2015-11-16 Thread kbuild test robot
Hi Baolin, [auto build test ERROR on balbi-usb/next] [also build test ERROR on v4.4-rc1 next-20151116] url: https://github.com/0day-ci/linux/commits/Baolin-Wang/Introduce-usb-charger-framework-to-deal-with-the-usb-gadget-power-negotation/20151116-143734 base: https://git.kernel.org/pub/scm

Re: [RFC PATCH] usb: gadget: Introduce Cadence USB2 UDC Driver

2015-11-16 Thread Felipe Balbi
Hi, Neil Armstrong writes: > Introduces UDC support for the Device-Mode only version of the > Cadence USB2 Controller IP Core. > > Host mode and OTG mode are not implemented by lack of hardware. > Support for Isochronous endpoints is not implemented by lack of time. > > Internal DMA is supported

Re: [linux-sunxi] Re: [PATCH 2/2] ehci-platform: Add support for controllers with multiple reset lines

2015-11-16 Thread Chen-Yu Tsai
On Mon, Nov 16, 2015 at 11:42 PM, Alan Stern wrote: > On Sun, 15 Nov 2015, Hans de Goede wrote: > >> From: Reinder de Haan >> >> At least the EHCI found on the Allwinnner H3 SoC needs multiple reset >> lines, the controller will not initialize while the reset for its >> companion OHCI is still as

Re: [PATCH] usb: musb: enable usb_dma parameter

2015-11-16 Thread Bin Liu
Hi, On 11/13/2015 06:57 PM, Greg KH wrote: On Fri, Nov 13, 2015 at 03:45:24PM -0600, Bin Liu wrote: Change the permission of usb_dma parameter so it can be used for runtime debug without reboot. Why would you want to do that? This is only used at init time, so if you change it while the driv

Re: [PATCH v2] usb: host: ohci-pxa27x: use of_property_read_bool()

2015-11-16 Thread Alan Stern
On Mon, 16 Nov 2015, Saurabh Sengar wrote: > for checking if a property is present or not, > of_property_read_bool is more appropriate than of_get_property() > > Signed-off-by: Saurabh Sengar > --- > v2 : replaced then to than in description Acked-by: Alan Stern -- To unsubscribe from this li

Re: [PATCH 2/2] ehci-platform: Add support for controllers with multiple reset lines

2015-11-16 Thread Alan Stern
On Sun, 15 Nov 2015, Hans de Goede wrote: > From: Reinder de Haan > > At least the EHCI found on the Allwinnner H3 SoC needs multiple reset > lines, the controller will not initialize while the reset for its > companion OHCI is still asserted, which means we need to de-assert > 2 reset-controlle

Re: [PATCH 1/5] clk: sunxi: Add support for the H3 usb phy clocks

2015-11-16 Thread Rob Herring
On Sun, Nov 15, 2015 at 08:46:13PM +0100, Hans de Goede wrote: > From: Reinder de Haan > > The H3 has a usb-phy clk register which is similar to that of earlier > SoCs, but with support for a larger number of phys. So we can simply add > a new set of clk-data and a new compatible and be done with

Re: [PATCH 2/5] phy-sun4i-usb: Add support for the host usb-phys found on the H3 SoC

2015-11-16 Thread Rob Herring
On Sun, Nov 15, 2015 at 08:46:14PM +0100, Hans de Goede wrote: > From: Reinder de Haan > > Note this commit only adds support for phys 1-3, phy 0, the otg phy, is > not yet (fully) supported after this commit. > > Signed-off-by: Reinder de Haan > Signed-off-by: Hans de Goede > --- > .../devic

[PATCH] usb: dwc2: hcd: fix periodic transfer schedule sequence

2015-11-16 Thread Yunzhi Li
When checking dwc2 host channel interrupts, handle qh in periodic_sched_queued list at first, then we could make sure CSPLIT packets scheduled in the same order as SSPLIT packets. Signed-off-by: Yunzhi Li --- drivers/usb/dwc2/hcd_intr.c | 22 ++ 1 file changed, 22 insertions(

Re: XHCI, "brain-dead scanner", and microframe rounding

2015-11-16 Thread Alan Stern
On Sun, 15 Nov 2015, Stéphane Lavergne wrote: > On Sat, Sep 12, 2015 at 4:08 AM, Hans-Peter Jansen wrote: > > With some changes in the 4.0 time frame, AND an update of the epson iscan > > stuff, I'm happily scanning with my Epson 4490 Photo scanner plugged to a > > USB > > 3.0 port using xsane.

Re: [4.3] kworker busy in pm_runtime_work

2015-11-16 Thread Alan Stern
On Mon, 16 Nov 2015, Daniel J Blueman wrote: > Tuning USB suspend [1] in 4.3 on a Dell XPS 15 9553 (Skylake), I see a > kworker thread spinning in rpm_suspend [2]. > > What is the most useful debug to get here beyond the immediate [3]? You can try doing: echo 'module usbcore =p' >/sys/k

Re: [Workaround] ASM1153E : ASM 174c:55aa problems re-loaded [quirk needed]

2015-11-16 Thread Hans de Goede
Hi, On 13-11-15 20:12, Manfred_Knick wrote: First of all: A big "Thank You!" especially to Sarah Sharp and Hans de Goede. Finding their contributions finally led my way. Second: Please, keep me CC'ed on this subject - I am not subscribed to the list above. #

Re: USB: ti_usb_3410_5052: Add Honeywell HGI80 ID

2015-11-16 Thread Johan Hovold
On Sat, Nov 14, 2015 at 04:49:30PM +, David Woodhouse wrote: > The Honeywell HGI80 is a wireless interface to the evohome connected > thermostat. It uses a TI 3410 USB-serial port. > > Signed-off-by: David Woodhouse > Cc: sta...@vger.kernel.org Applied, thanks. Johan -- To unsubscribe from

Re: [PATCH] USB: serial: option: add support for Novatel MiFi USB620L

2015-11-16 Thread Johan Hovold
On Wed, Nov 11, 2015 at 07:51:40PM +0100, Aleksander Morgado wrote: > Also known as Verizon U620L. > > The device is modeswitched from 1410:9020 to 1410:9022 by selecting the 4th > USB > configuration: > > $ sudo usb_modeswitch –v 0x1410 –p 0x9020 –u 4 > > This configuration provides a ECM int

Re: [PATCH] USB: qcserial: Add support for Quectel EC20 Mini PCIe module

2015-11-16 Thread Johan Hovold
On Tue, Nov 03, 2015 at 11:25:28AM +0100, Petr Štetiar wrote: > It seems like this device has same vendor and product IDs as G2K > devices, but it has different number of interfaces(4 vs 5) and also > different interface layout which makes it currently unusable: > > usbcore: registered new i

[PATCH v2] usb: host: ohci-pxa27x: use of_property_read_bool()

2015-11-16 Thread Saurabh Sengar
for checking if a property is present or not, of_property_read_bool is more appropriate than of_get_property() Signed-off-by: Saurabh Sengar --- v2 : replaced then to than in description drivers/usb/host/ohci-pxa27x.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --

Re: Page allocation failure

2015-11-16 Thread Steinar H. Gunderson
On Mon, Nov 16, 2015 at 01:49:50AM +0100, Steinar H. Gunderson wrote: > Just so we're on the same page, I cleaned up the patch I'm now using, and I'm > attaching it here. You said the next step would be changing the memory > allocation interface; I guess I could give it a shot, but I doubt I would

  1   2   >