Re: [PATCH v4 07/21] usb: dwc2: hcd: fix split transfer schedule sequence

2016-01-20 Thread kbuild test robot
Hi Douglas, [auto build test ERROR on next-20160120] [cannot apply to v4.4-rc8 v4.4-rc7 v4.4-rc6 v4.4] [if your patch is applied to the wrong git tree, please drop us a note to help improving the system] url: https://github.com/0day-ci/linux/commits/Douglas-Anderson/usb-dwc2-host-Fix

Re: [PATCH v3 1/1] USB: core: let USB device know device node

2016-01-20 Thread Peter Chen
On Wed, Jan 20, 2016 at 03:19:36PM +0100, Arnd Bergmann wrote: > On Wednesday 20 January 2016 20:50:26 Peter Chen wrote: > > On Wed, Jan 20, 2016 at 10:07:13AM +0100, Arnd Bergmann wrote: > > > On Wednesday 20 January 2016 11:48:39 Peter Chen wrote: > > > > > > > > > > > Alternatively, you could

[PATCH v4 13/21] usb: dwc2: host: Reorder things in hcd_queue.c

2016-01-20 Thread Douglas Anderson
This no-op change just reorders a few functions in hcd_queue.c in order to prepare for future changes. Motivations here: The functions dwc2_hcd_qh_free() and dwc2_hcd_qh_create() are exported functions. They are not called within the file. That means that they should be near the bottom so that

[PATCH v4 19/21] usb: dwc2: host: Properly set even/odd frame

2016-01-20 Thread Douglas Anderson
When setting up ISO and INT transfers dwc2 needs to specify whether the transfer is for an even or an odd frame (or microframe if the controller is running in high speed mode). The controller appears to use this as a simple way to figure out if a transfer should happen right away (in the current

[PATCH v4 14/21] usb: dwc2: host: Split code out to make dwc2_do_reserve()

2016-01-20 Thread Douglas Anderson
This no-op change splits code out of dwc2_schedule_periodic() into a dwc2_do_reserve() function. This makes it a little easier to follow the logic. Signed-off-by: Douglas Anderson --- Changes in v4: - Split code out to make dwc2_do_reserve() new for v4. Changes in v3:

[PATCH v4 21/21] usb: dwc2: host: If using uframe scheduler, end splits better

2016-01-20 Thread Douglas Anderson
The microframe scheduler figured out exactly how many transfers we need for a split transaction. Let's use this knowledge to know when to end things. Without this I found that certain devices would just keep responding with tons of NYET resonses on their INT_IN endpoint. These would just keep

[PATCH v4 15/21] usb: dwc2: host: Add scheduler logging for missed SOFs

2016-01-20 Thread Douglas Anderson
We'll use the new "scheduler verbose debugging" macro to log missed SOFs. This is fast enough (assuming you configure it to use the ftrace buffer) that we can do it without worrying about the speed hit. The overhead hit if the scheduler tracing is set to "no_printk" should be near zero.

[PATCH v4 02/21] usb: dwc2: host: Get aligned DMA in a more supported way

2016-01-20 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

[PATCH v4 12/21] usb: dwc2: host: Rename some fields in struct dwc2_qh

2016-01-20 Thread Douglas Anderson
This no-op change just does some renames to simplify a future patch. 1. The "interval" field is renamed to "host_interval" to make it more obvious that this interval may be 8 times the interval that the device sees (if we're doing split transactions). A future patch will also add the

[PATCH v4 11/21] usb: dwc2: host: Use periodic interrupt even with DMA

2016-01-20 Thread Douglas Anderson
The old code in dwc2_process_periodic_channels() would only enable the "periodic empty" interrupt if we weren't using DMA. That wasn't right since we can still get into cases where we have small FIFOs even on systems that have DMA (the rk3288 is a prime example). Let's always enable/disable the

[PATCH v4 10/21] usb: dwc2: host: Giveback URB in tasklet context

2016-01-20 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

Re: [PATCH v2] hid: usbhid: hid-core: fix recursive deadlock

2016-01-20 Thread Jason Gerecke
Jason --- Now instead of four in the eights place / you’ve got three, ‘Cause you added one / (That is to say, eight) to the two, / But you can’t take seven from three,/ So you look at the sixty-fours On Sun, Nov 29, 2015 at 2:29 AM, Ioan-Adrian Ratiu wrote: > On

[PATCH v4 03/21] usb: dwc2: host: Set host_rx_fifo_size to 528 for rk3066

2016-01-20 Thread Douglas Anderson
As documented in dwc2_calculate_dynamic_fifo(), host_rx_fifo_size should really be: 2 * ((Largest Packet size / 4) + 1 + 1) + n with n = number of host channel. We have 9 host channels, so 2 * ((1024/4) + 2) + 9 = 516 + 9 = 525 We've got 960 / 972 total_fifo_size on rk3288 (and presumably on

[PATCH v4 04/21] usb: dwc2: host: Set host_perio_tx_fifo_size to 304 for rk3066

2016-01-20 Thread Douglas Anderson
Looking at rk3288, there are two dwc2 ports. One has 960 total_fifo_size and the other 972. We're currently assigning 528 + 128 + 256 = 912. That means we're wasting 48 words on one port and 60 words on the other. Since we have one settings block for both ports, let's just eat the 48 words

[PATCH v4 0/21] usb: dwc2: host: Fix and speed up all the stuff, especially with splits

2016-01-20 Thread Douglas Anderson
This is a bit of catchall series for all the bug fix and performance patches I've been working on over the last few months. Note that for dwc2 we need to do LOTS in software and need super low interrupt latency, so most performance improvements actually fix real bugs. Patches are structured to

[PATCH v4 05/21] usb: dwc2: host: Avoid use of chan->qh after qh freed

2016-01-20 Thread Douglas Anderson
When poking around with USB devices with slub_debug enabled, I found another obvious use after free. Turns out that in dwc2_hc_n_intr() I was in a state when the contents of chan->qh was filled with 0x6b, indicating that chan->qh was freed but chan still had a reference to it. Let's make sure

[PATCH v4 08/21] usb: dwc2: host: Add scheduler tracing

2016-01-20 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. By changing "core.h" you can easily trace to ftrace, the console, or nowhere. Signed-off-by: Douglas Anderson

[PATCH v4 07/21] usb: dwc2: hcd: fix split transfer schedule sequence

2016-01-20 Thread Douglas Anderson
We're supposed to keep outstanding splits in order. Keep track of a list of the order of splits and process channel interrupts in that order. Without this change and the following setup: * Rockchip rk3288 Chromebook, using port ff54 -> Pluggable 7-port Hub with Charging (powered) ->

[PATCH v4 09/21] usb: dwc2: host: Add a delay before releasing periodic bandwidth

2016-01-20 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

[PATCH v4 01/21] usb: dwc2: rockchip: Make the max_transfer_size automatic

2016-01-20 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

[PATCH v4 17/21] usb: dwc2: host: Schedule periodic right away if it's time

2016-01-20 Thread Douglas Anderson
In dwc2_hcd_qh_deactivate() we will put some things on the periodic_sched_ready list. These things won't be taken off the ready list until the next SOF, which might be a little late. Let's put them on right away. Signed-off-by: Douglas Anderson --- Changes in v4: -

Re: [PATCH v4 20/21] usb: dwc2: host: Totally redo the microframe scheduler

2016-01-20 Thread kbuild test robot
Hi Douglas, [auto build test ERROR on next-20160120] [cannot apply to v4.4-rc8 v4.4-rc7 v4.4-rc6 v4.4] [if your patch is applied to the wrong git tree, please drop us a note to help improving the system] url: https://github.com/0day-ci/linux/commits/Douglas-Anderson/usb-dwc2-host-Fix

[PATCH v4 16/21] usb: dwc2: host: Manage frame nums better in scheduler

2016-01-20 Thread Douglas Anderson
The dwc2 scheduler (contained in hcd_queue.c) was a bit confusing in the way it initted / kept track of which frames a QH was going to be active in. Let's clean things up a little bit in preparation for a rewrite of the microframe scheduler. Specifically: * Old code would pick a frame number in

[PATCH v4 20/21] usb: dwc2: host: Totally redo the microframe scheduler

2016-01-20 Thread Douglas Anderson
This totally reimplements the microframe scheduler in dwc2 to attempt to handle periodic splits properly. The old code didn't even try, so this was a significant effort since periodic splits are one of the most complicated things in USB. I've attempted to keep the old "don't use the microframe"

[PATCH v4 18/21] usb: dwc2: host: Add dwc2_hcd_get_future_frame_number() call

2016-01-20 Thread Douglas Anderson
As we start getting more exact about our scheduling it's becoming more and more important to know exactly how far through the current frame we are. This lets us make decisions about whether there's still time left to start a new transaction in the current frame. We'll add

[PATCH v4 06/21] usb: dwc2: host: Always add to the tail of queues

2016-01-20 Thread Douglas Anderson
The queues the the dwc2 host controller used are truly queues. That means FIFO or first in first out. Unfortunately though the code was iterating through these queues starting from the head, some places in the code was adding things to the queue by adding at the head instead of the tail. That

[PATCH 1/2] usb: phy: mxs: declare variable with initialized value

2016-01-20 Thread Li Jun
Initialize vbus_value to be 0 since it's possible not to assign any value before judgement. Signed-off-by: Li Jun --- drivers/usb/phy/phy-mxs-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c

[PATCH 2/2] usb: chipidea: udc: remove unused value assignment

2016-01-20 Thread Li Jun
retval is assigned to be -EOVERFLOW but is overwritten later before it's used, remove this unused value assignment. Signed-off-by: Li Jun --- drivers/usb/chipidea/udc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c

Re: usbserial - TP-Link MA260

2016-01-20 Thread Jan Werner
i’m sorry, seems it was a leftover from times where the 3g dongle was not yet supported, just removed it and it also works. sorry for the spam best, jan > Am 20.01.2016 um 16:32 schrieb Lars Melin : > > On 2016-01-20 21:05, Jan Werner wrote: >> Hi, >> >> just wanted to let

Re: usbserial - TP-Link MA260

2016-01-20 Thread Lars Melin
On 2016-01-20 21:05, Jan Werner wrote: Hi, just wanted to let you know that we are using this command: echo "2357 9000" > /sys/bus/usb-serial/drivers/generic/new_id to add support for the TP-Link MA260 3G dongle on openwrt. Why do you do that? It is supported in the option serial driver.

Re: [PATCH] usb: phy-am335x: clarify USB_COMMON dependency

2016-01-20 Thread Bin Liu
Hi, On Wed, Jan 20, 2016 at 11:56:34AM +0100, Arnd Bergmann wrote: > The phy-am335x driver accidentally selects 'USB_COMMON', which is > not correct as that symbol should indicate whether USB host or > target mode is enabled, but it might not: > > warning: (AM335X_PHY_USB) selects USB_COMMON

Urgent please,

2016-01-20 Thread ABDUL KAMAH
Dear, Did you get my last mail? please let me know. -- 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: UAS errors with ASM1053 - 4.3.3

2016-01-20 Thread Calum Mackay
Apologies, all, if this is a bit OT? On 19/01/2016 2:47 pm, Alan Stern wrote: Documentation/usb/usbmon.txt). Start with debugging usb-storage and work your way up to uas. I suppose I should first check and see that my PC card is "acceptable" since it's quite old. It appears as:

Re: UAS errors with ASM1053 - 4.3.3

2016-01-20 Thread Calum Mackay
Apologies, all, if this is a bit OT? On 19/01/2016 2:47 pm, Alan Stern wrote: Documentation/usb/usbmon.txt). Start with debugging usb-storage and work your way up to uas. I suppose I should first check and see that my PC card is "acceptable" since it's quite old. It appears as:

[PATCH] USB: EHCI: fix problems involving ehci->iaa_in_progress flag

2016-01-20 Thread Alan Stern
This patch fixes the way ehci-hcd handles the iaa_in_progress flag. The current code is very careless about it. The flag is meaningless when the root hub isn't running, most particularly after the root hub has been suspended. But in start_iaa_cycle(), the driver checks the flag before checking

Re: [PATCH v1 1/1] cp210x: convert open coded pieces to DIV_ROUND_UP

2016-01-20 Thread Martyn Welch
On 19/01/16 11:31, Andy Shevchenko wrote: There are places where DIV_ROUND_UP() functionaly is open coded. Replace it by macro call. Signed-off-by: Andy Shevchenko Much nicer! Acked-by: Martyn Welch ---

NET2280: Adding PLX usb2380 support (issues encountered)

2016-01-20 Thread Justin DeFields
System: Custom Xilinx Zynq based system Kernel: Xilinx linux v2015.1 (linux 3.18) I was attempting to add support for the PLX usb2380 chip to the net2280.c driver. As far as I can tell, this chip is the same as the 3380, but does not support USB3.0 (2.0 only). I have changed all checks for the

Re: UAS errors with ASM1053 - 4.3.3

2016-01-20 Thread Calum Mackay
On 18/01/2016 6:46 pm, Calum Mackay wrote: I'm getting UAS errors using a USB 3.0 SATA enclosure (StarTech S3510BMU33ET; 174c:55aa) For what it's worth, I tried two more enclosures with this 174c:55aa identifier chipset (presumably ASM1053E): another StarTech S3510BMU33ET, and also a

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

2016-01-20 Thread Doug Anderson
John, On Mon, Nov 16, 2015 at 2:41 PM, Caesar Wang wrote: > 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