[PATCH] usb: dwc3: Remove DEBUG define from Qualcomm DWC3 glue driver

2018-05-25 Thread Douglas Anderson
It appears that a "#define DEBUG" was left in on the recent patch landed for the Qualcomm DWC3 glue driver. Let's remove it. Fixes: a4333c3a6ba9 ("usb: dwc3: Add Qualcomm DWC3 glue driver") Signed-off-by: Douglas Anderson <diand...@chromium.org> --- drivers/usb/dwc3

[PATCH v4] usb: dwc2: host: Don't retry NAKed transactions right away

2017-12-12 Thread Douglas Anderson
-off-by: Douglas Anderson <diand...@chromium.org> Reviewed-by: Julius Werner <jwer...@chromium.org> Tested-by: Stefan Wahren <stefan.wah...@i2se.com> Acked-by: John Youn <johny...@synopsys.com> --- Changes in v4: - Removed Cc for stable as per Felipe's request in v3 - Reba

[PATCH] phy: rockchip-typec: Try to turn the PHY on several times

2017-12-11 Thread Douglas Anderson
For some more details on this bug, you can refer to: https://bugs.chromium.org/p/chromium/issues/detail?id=783464 Signed-off-by: Douglas Anderson <diand...@chromium.org> --- drivers/phy/rockchip/phy-rockchip-typec.c | 24 ++-- 1 file changed, 22 insertions(+), 2 delet

[PATCH v3 2/2] usb: dwc2: host: Convert hcd_queue to timer_setup

2017-10-30 Thread Douglas Anderson
Convert the timers in hcd_queue to use the new timer_setup() call introduced in commit 686fef928bba ("timer: Prepare to change timer callback argument type"). Suggested-by: Stefan Wahren <stefan.wah...@i2se.com> Signed-off-by: Douglas Anderson <diand...@chromium.org>

[PATCH v3 1/2] usb: dwc2: host: Don't retry NAKed transactions right away

2017-10-30 Thread Douglas Anderson
-off-by: Douglas Anderson <diand...@chromium.org> Cc: sta...@vger.kernel.org Reviewed-by: Julius Werner <jwer...@chromium.org> Tested-by: Stefan Wahren <stefan.wah...@i2se.com> --- Changes in v3: - Add tested-by for Stefan Wahren - Sent to Felipe Balbi as candiate to land this. -

[PATCH v2] usb: dwc2: host: Don't retry NAKed transactions right away

2017-10-26 Thread Douglas Anderson
-off-by: Douglas Anderson <diand...@chromium.org> Reviewed-by: Julius Werner <jwer...@chromium.org> --- Changes in v2: - Address http://crosreview.com/737520 feedback drivers/usb/dwc2/core.h | 1 + drivers/usb/dwc2/hcd.c | 7 drivers/usb/dwc2/hcd.h | 9 +

[PATCH] usb: dwc2: host: Don't retry NAKed transactions right away

2017-10-25 Thread Douglas Anderson
-off-by: Douglas Anderson <diand...@chromium.org> --- drivers/usb/dwc2/core.h | 1 + drivers/usb/dwc2/hcd.c | 7 drivers/usb/dwc2/hcd.h | 9 + drivers/usb/dwc2/hcd_intr.c | 12 +++ drivers/usb/dwc2/hcd_queue.c | 81 +

[RFC PATCH 3/3] usbnet: Fix memory leak when rx_submit() fails

2017-09-19 Thread Douglas Anderson
If rx_submit() returns an error code then nobody calls usb_free_urb(). That means it's leaked. NOTE: This problem was found solely by code inspection and not due to any failing test cases. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- drivers/net/usb/usbnet.c | 9 ++

[RFC PATCH 1/3] usbnet: Get rid of spammy usbnet "kevent X may have been dropped"

2017-09-19 Thread Douglas Anderson
the types of work need to be repeated if usbnet_defer_kevent() is called multiple times then that should be quite easy to accomplish without dropping any work on the floor. We can just keep an atomic count for that type of work and add a loop into usbnet_deferred_kevent(). Signed-off-by: Douglas Ander

[RFC PATCH 2/3] usbnet: Avoid potential races in usbnet_deferred_kevent()

2017-09-19 Thread Douglas Anderson
worth of data and probably never fails. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- drivers/net/usb/usbnet.c | 50 +--- 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb

[PATCH] USB: core: Avoid race of async_completed() w/ usbdev_release()

2017-08-10 Thread Douglas Anderson
ffc0cc042080 mtpd-20553 13759487us : async_getcompleted before spin_lock_irqsave mtpd-20553 13759497us!: usbdev_release after kfree(ps): ps=ffc0cc042080 <...>-2104 0d.h2 13760294us : async_completed before wake_up(): as=ffc0cc638200 To fix this problem we can just mov

[RFT PATCH 2/2] Revert "usb: dwc2: Fix probe problem on bcm2835"

2016-03-04 Thread Douglas Anderson
This reverts commit 192cb07f7928 ("usb: dwc2: Fix probe problem on bcm2835") now that we've found the root cause. See the change titled ("usb: dwc2: Add a 10 ms delay to dwc2_core_reset()"). Signed-off-by: Douglas Anderson <diand...@chromium.org> --- drivers/usb/dwc2

[PATCH v6 20/22] usb: dwc2: host: Properly set even/odd frame

2016-01-28 Thread Douglas Anderson
USB webcam + USB audio + keyboards) has less audio crackling than before. Signed-off-by: Douglas Anderson <diand...@chromium.org> Tested-by: Heiko Stuebner <he...@sntech.de> Tested-by: Stefan Wahren <stefan.wah...@i2se.com> --- Changes in v6: - Add Heiko's Tested-by. - Add Stefan's Te

[PATCH v6 21/22] usb: dwc2: host: Totally redo the microframe scheduler

2016-01-28 Thread Douglas Anderson
USB audio + some keyboards) crackles less. Signed-off-by: Douglas Anderson <diand...@chromium.org> Tested-by: Heiko Stuebner <he...@sntech.de> Tested-by: Stefan Wahren <stefan.wah...@i2se.com> --- Changes in v6: - Removed incorrect limit on number of channels (Heiko Stuebner). - F

[PATCH v6 19/22] usb: dwc2: host: Add dwc2_hcd_get_future_frame_number() call

2016-01-28 Thread Douglas Anderson
("usb: dwc2: host: Properly set even/odd frame"). Signed-off-by: Douglas Anderson <diand...@chromium.org> Tested-by: Heiko Stuebner <he...@sntech.de> Tested-by: Stefan Wahren <stefan.wah...@i2se.com> --- Changes in v6: - Add Heiko's Tested-by. - Add Stefan's Tested-by.

[PATCH v6 01/22] usb: dwc2: rockchip: Make the max_transfer_size automatic

2016-01-28 Thread Douglas Anderson
params. - If we can remove the 65535 limit, we can transfer more! Signed-off-by: Douglas Anderson <diand...@chromium.org> Acked-by: John Youn <johny...@synopsys.com> Tested-by: Heiko Stuebner <he...@sntech.de> --- Changes in v6: None Changes in v5: None Changes in v4: - Add John's A

[PATCH v6 06/22] usb: dwc2: host: fix split transfer schedule sequence

2016-01-28 Thread Douglas Anderson
and often see keys dropped or repeated. After this change the above setup works properly. This patch is based on a previous patch proposed by Yunzhi Li ("usb: dwc2: hcd: fix periodic transfer schedule sequence") Signed-off-by: Douglas Anderson <diand...@chromium.org> Signed-off

[PATCH v6 05/22] usb: dwc2: host: Always add to the tail of queues

2016-01-28 Thread Douglas Anderson
. That means last in first out. Doh. Go through and just always add to the tail. Doing this makes things much happier when I've got: * 7-port USB 2.0 Single-TT hub * - Microsoft 2.4 GHz Transceiver v7.0 dongle * - Jabra speakerphone playing music Signed-off-by: Douglas Anderson <diand...@chromium.

[PATCH v6 03/22] usb: dwc2: host: Set host_rx_fifo_size to 525 for rk3066

2016-01-28 Thread Douglas Anderson
o allocate the extra 48 / 60 bytes of FIFO that we're currently wasting. NOTE: no known bugs are fixed by this patch, but it seems like a simple fix and ought to fix someone. Signed-off-by: Douglas Anderson <diand...@chromium.org> Reviewed-by: Kever Yang <kever.y...@rock-chips.com> Tes

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

2016-01-28 Thread Douglas Anderson
needs delay change. - Totally rewrote uframe scheduler again after writing test code. - uframe scheduler atop delayed bandwidth release patches. Douglas Anderson (22): usb: dwc2: rockchip: Make the max_transfer_size automatic usb: dwc2: host: Get aligned DMA in a more supported way usb: d

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

2016-01-28 Thread Douglas Anderson
of removing the 65535 max transfer size limit. NOTE: The actual code to allocate the aligned buffers is ripped almost completely from the tegra EHCI driver. At some point in the future we may want to add this functionality to the USB core to share more code everywhere. Signed-off-by: Douglas Anderson

[PATCH v6 04/22] usb: dwc2: host: Avoid use of chan->qh after qh freed

2016-01-28 Thread Douglas Anderson
e sure that whenever we free qh we also make sure we remove a reference from its channel. The bug fixed here doesn't appear to be new--I believe I just got lucky and happened to see it while stress testing. Signed-off-by: Douglas Anderson <diand...@chromium.org> Reviewed-by: Kever Yang <

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

2016-01-28 Thread Douglas Anderson
her things that were scheduled to happen. No known test cases are improved by this patch except that the scheduler code doesn't yell about MISSES constantly anymore. Signed-off-by: Douglas Anderson <diand...@chromium.org> Tested-by: Heiko Stuebner <he...@sntech.de> Tested-by: Stefan Wahren &

[PATCH v6 11/22] usb: dwc2: host: There's not really a TT for the root hub

2016-01-28 Thread Douglas Anderson
ask me where I got a full speed USB hub or whether the massive amount of dust that accumulated on it while it was in my junk box affected its funtionality. Just smile and nod. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v6: - There's not really a TT for the root hub

[PATCH v6 07/22] usb: dwc2: host: Add scheduler tracing

2016-01-28 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 <diand...

[PATCH v6 08/22] usb: dwc2: host: Add a delay before releasing periodic bandwidth

2016-01-28 Thread Douglas Anderson
ehavior and just add the proper delay. Signed-off-by: Douglas Anderson <diand...@chromium.org> Tested-by: Heiko Stuebner <he...@sntech.de> Tested-by: Stefan Wahren <stefan.wah...@i2se.com> --- Changes in v6: - Add Heiko's Tested-by. - Add Stefan's Tested-by. Changes in v5: None Cha

[PATCH v6 13/22] usb: dwc2: host: Rename some fields in struct dwc2_qh

2016-01-28 Thread Douglas Anderson
next_active_frame" makes it more obvious that this field is constantly changing. Signed-off-by: Douglas Anderson <diand...@chromium.org> Tested-by: Heiko Stuebner <he...@sntech.de> Tested-by: Stefan Wahren <stefan.wah...@i2se.com> --- Changes in v6: - Add Heiko's Tested-by. - A

[PATCH v6 12/22] usb: dwc2: host: Use periodic interrupt even with DMA

2016-01-28 Thread Douglas Anderson
gt; Microsoft Wireless Keyboard 2000 in port 1. -> Das Keyboard in port 2. -> Jabra Speaker in port 3 -> Logitech, Inc. Webcam C600 in port 4 -> Microsoft Sidewinder X6 Keyboard in port 5 ...and I'm playing music on the USB speaker and capturing video from the webcam. Sign

[PATCH v6 16/22] usb: dwc2: host: Add scheduler logging for missed SOFs

2016-01-28 Thread Douglas Anderson
e near zero. Signed-off-by: Douglas Anderson <diand...@chromium.org> Tested-by: Heiko Stuebner <he...@sntech.de> Tested-by: Stefan Wahren <stefan.wah...@i2se.com> --- Changes in v6: - Add Heiko's Tested-by. - Add Stefan's Tested-by. Changes in v5: None Changes in v4: - Add schedu

[PATCH v6 14/22] usb: dwc2: host: Reorder things in hcd_queue.c

2016-01-28 Thread Douglas Anderson
() since it calls that. Signed-off-by: Douglas Anderson <diand...@chromium.org> Tested-by: Heiko Stuebner <he...@sntech.de> Tested-by: Stefan Wahren <stefan.wah...@i2se.com> --- Changes in v6: - Add Heiko's Tested-by. - Add Stefan's Tested-by. Changes in v5: None Changes in v4

[PATCH v6 18/22] usb: dwc2: host: Schedule periodic right away if it's time

2016-01-28 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 <diand...@chromium.org> Tested-by: Heiko St

[PATCH v6 17/22] usb: dwc2: host: Manage frame nums better in scheduler

2016-01-28 Thread Douglas Anderson
ing it works), so maybe a future patch (or a future version of this patch?) could remove that parameter. Signed-off-by: Douglas Anderson <diand...@chromium.org> Tested-by: Heiko Stuebner <he...@sntech.de> Tested-by: Stefan Wahren <stefan.wah...@i2se.com> --- Changes in v6: - Fix

[PATCH v6 09/22] usb: dwc2: host: Giveback URB in tasklet context

2016-01-28 Thread Douglas Anderson
ve got an overall win here. Note that when playing USB audio and using a USB webcam and having several USB keyboards plugged in, the crackling on the USB audio device is noticably reduced with this patch. Signed-off-by: Douglas Anderson <diand...@chromium.org> Tested-by: Heiko Stuebner <

[PATCH v6 10/22] usb: dwc2: host: Properly set the HFIR

2016-01-28 Thread Douglas Anderson
6.604.041 6.604.166 ... 6.607.541 6.607.667 6.607.792 6.607.917 ... 6.611.417 6.611.543 6.611.668 6.611.793 After: 6.215.159 6.215.284 6.215.408 6.215.533 6.215.658 ... 6.470.658 6.470.783 6.470.907 ... 6.726.032 6.726.157 6.725.281 6.725.406

[PATCH v6 15/22] usb: dwc2: host: Split code out to make dwc2_do_reserve()

2016-01-28 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 <diand...@chromium.org> Tested-by: Heiko Stuebner <he...@sntech.de> Tested-by: Stefan Wahren <stefan.

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

2016-01-22 Thread Douglas Anderson
gt; Microsoft Wireless Keyboard 2000 in port 1. -> Das Keyboard in port 2. -> Jabra Speaker in port 3 -> Logitech, Inc. Webcam C600 in port 4 -> Microsoft Sidewinder X6 Keyboard in port 5 ...and I'm playing music on the USB speaker and capturing video from the webca

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

2016-01-22 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 <diand...

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

2016-01-22 Thread Douglas Anderson
e sure that whenever we free qh we also make sure we remove a reference from its channel. The bug fixed here doesn't appear to be new--I believe I just got lucky and happened to see it while stress testing. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v5: None C

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

2016-01-22 Thread Douglas Anderson
USB webcam + USB audio + keyboards) has less audio crackling than before. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v5: None Changes in v4: - Properly set even/odd frame new for v4. Changes in v3: None Changes in v2: None drivers/usb/dwc2/core.c | 92 ++

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

2016-01-22 Thread Douglas Anderson
("usb: dwc2: host: Properly set even/odd frame"). Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v5: None Changes in v4: - Add dwc2_hcd_get_future_frame_number() call new for v4. Changes in v3: None Changes in v2: None drivers/usb/dwc2/core.h | 4 driver

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

2016-01-22 Thread Douglas Anderson
her things that were scheduled to happen. No known test cases are improved by this patch except that the scheduler code doesn't yell about MISSES constantly anymore. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v5: None Changes in v4: - If using uframe scheduler, end s

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

2016-01-22 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 <diand...@chromium.org> --- Changes in v5: None Changes in v4: - Split code out to make dwc2_do_reserve() new

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

2016-01-22 Thread Douglas Anderson
e near zero. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v5: None Changes in v4: - Add scheduler logging for missed SOFs new for v4. Changes in v3: None Changes in v2: None drivers/usb/dwc2/core.h | 3 ++- drivers/usb/dwc2/hcd.c | 2 +- driver

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

2016-01-22 Thread Douglas Anderson
ve got an overall win here. Note that when playing USB audio and using a USB webcam and having several USB keyboards plugged in, the crackling on the USB audio device is noticably reduced with this patch. Signed-off-by: Douglas Anderson <diand...@chromium.org> Tested-by: Heiko Stuebner <

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

2016-01-22 Thread Douglas Anderson
have been filled before where it no longer is. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v5: None Changes in v4: - Set host_perio_tx_fifo_size to 304 for rk3066 new for v4. Changes in v3: None Changes in v2: None drivers/usb/dwc2/platform.c | 2 +- 1 file chan

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

2016-01-22 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 <diand...@chromium.org> --- Changes in v5

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

2016-01-22 Thread Douglas Anderson
USB audio + some keyboards) crackles less. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v5: - Moved defines outside of ifdef to avoid gadget-only compile error. Changes in v4: - Figured out what the microframe scheduler was supposed to do. - Microframe rewrite is totall

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

2016-01-22 Thread Douglas Anderson
ing it works), so maybe a future patch (or a future version of this patch?) could remove that parameter. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v5: None Changes in v4: - Manage frame nums better in scheduler new for v4. Changes in v3: None Changes in v2: None

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

2016-01-22 Thread Douglas Anderson
ehavior and just add the proper delay. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v5: None Changes in v4: - Moved periodic bandwidth release delay patch earlier again. Changes in v3: - Moved periodic bandwidth release delay patch later in the series. Changes in v2: -

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

2016-01-22 Thread Douglas Anderson
ma is not aligned (Julius Werner). - Periodic bandwidth release delay new for V2 - Commit message now says that URB giveback change needs delay change. - Totally rewrote uframe scheduler again after writing test code. - uframe scheduler atop delayed bandwidth release patches. Douglas Anderson (21): u

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

2016-01-22 Thread Douglas Anderson
() since it calls that. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v5: None Changes in v4: - Reorder things in hcd_queue.c new for v4. Changes in v3: None Changes in v2: None drivers/usb/dwc2/hcd_queue.c | 600 +-- 1 file c

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

2016-01-22 Thread Douglas Anderson
next_active_frame" makes it more obvious that this field is constantly changing. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v5: None Changes in v4: - Rename some fields in struct dwc2_qh new for v4. Changes in v3: None Changes in v2: None drivers/usb/dwc2/hcd.h

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

2016-01-22 Thread Douglas Anderson
. That means last in first out. Doh. Go through and just always add to the tail. Doing this makes things much happier when I've got: * 7-port USB 2.0 Single-TT hub * - Microsoft 2.4 GHz Transceiver v7.0 dongle * - Jabra speakerphone playing music Signed-off-by: Douglas Anderson <diand...@chromium.

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

2016-01-22 Thread Douglas Anderson
of removing the 65535 max transfer size limit. NOTE: The actual code to allocate the aligned buffers is ripped almost completely from the tegra EHCI driver. At some point in the future we may want to add this functionality to the USB core to share more code everywhere. Signed-off-by: Douglas Anderson

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

2016-01-22 Thread Douglas Anderson
and often see keys dropped or repeated. After this change the above setup works properly. This patch is based on a previous patch proposed by Yunzhi Li ("usb: dwc2: hcd: fix periodic transfer schedule sequence") Signed-off-by: Douglas Anderson <diand...@chromium.org> Signed-off

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

2016-01-22 Thread Douglas Anderson
params. - If we can remove the 65535 limit, we can transfer more! Signed-off-by: Douglas Anderson <diand...@chromium.org> Acked-by: John Youn <johny...@synopsys.com> Tested-by: Heiko Stuebner <he...@sntech.de> --- Changes in v5: None Changes in v4: - Add John's Acks from <h

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

2016-01-22 Thread Douglas Anderson
seems like a simple fix and ought to fix someone. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v5: None Changes in v4: - Set host_rx_fifo_size to 528 for rk3066 new for v4. Changes in v3: None Changes in v2: None drivers/usb/dwc2/platform.c | 2 +- 1 file changed, 1

[PATCH] usb: dwc2: host: Properly set the HFIR

2016-01-22 Thread Douglas Anderson
6.604.041 6.604.166 ... 6.607.541 6.607.667 6.607.792 6.607.917 ... 6.611.417 6.611.543 6.611.668 6.611.793 After: 6.215.159 6.215.284 6.215.408 6.215.533 6.215.658 ... 6.470.658 6.470.783 6.470.907 ... 6.726.032 6.726.157 6.725.281 6.725.406

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

2016-01-20 Thread Douglas Anderson
() since it calls that. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v4: - Reorder things in hcd_queue.c new for v4. Changes in v3: None Changes in v2: None drivers/usb/dwc2/hcd_queue.c | 600 +-- 1 file changed, 300 inse

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

2016-01-20 Thread Douglas Anderson
USB webcam + USB audio + keyboards) has less audio crackling than before. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v4: - Properly set even/odd frame new for v4. Changes in v3: None Changes in v2: None drivers/usb/dwc2/core.c | 92 +++

[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 <diand...@chromium.org> --- Changes in v4: - Split code out to make dwc2_do_reserve() new for v4. Changes

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

2016-01-20 Thread Douglas Anderson
her things that were scheduled to happen. No known test cases are improved by this patch except that the scheduler code doesn't yell about MISSES constantly anymore. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v4: - If using uframe scheduler, end splits better new for v4

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

2016-01-20 Thread Douglas Anderson
e near zero. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v4: - Add scheduler logging for missed SOFs new for v4. Changes in v3: None Changes in v2: None drivers/usb/dwc2/core.h | 3 ++- drivers/usb/dwc2/hcd.c | 2 +- drivers/usb/dwc2/hcd_intr.c | 12 +++

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

2016-01-20 Thread Douglas Anderson
of removing the 65535 max transfer size limit. NOTE: The actual code to allocate the aligned buffers is ripped almost completely from the tegra EHCI driver. At some point in the future we may want to add this functionality to the USB core to share more code everywhere. Signed-off-by: Douglas Anderson

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

2016-01-20 Thread Douglas Anderson
next_active_frame" makes it more obvious that this field is constantly changing. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v4: - Rename some fields in struct dwc2_qh new for v4. Changes in v3: None Changes in v2: None drivers/usb/dwc2/hcd.h | 20

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

2016-01-20 Thread Douglas Anderson
gt; Microsoft Wireless Keyboard 2000 in port 1. -> Das Keyboard in port 2. -> Jabra Speaker in port 3 -> Logitech, Inc. Webcam C600 in port 4 -> Microsoft Sidewinder X6 Keyboard in port 5 ...and I'm playing music on the USB speaker and capturing video from the webca

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

2016-01-20 Thread Douglas Anderson
ve got an overall win here. Note that when playing USB audio and using a USB webcam and having several USB keyboards plugged in, the crackling on the USB audio device is noticably reduced with this patch. Signed-off-by: Douglas Anderson <diand...@chromium.org> Tested-by: Heiko Stuebner <

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

2016-01-20 Thread Douglas Anderson
seems like a simple fix and ought to fix someone. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v4: - Set host_rx_fifo_size to 528 for rk3066 new for v4. Changes in v3: None Changes in v2: None drivers/usb/dwc2/platform.c | 2 +- 1 file changed, 1 insertion(+), 1 d

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

2016-01-20 Thread Douglas Anderson
have been filled before where it no longer is. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v4: - Set host_perio_tx_fifo_size to 304 for rk3066 new for v4. Changes in v3: None Changes in v2: None drivers/usb/dwc2/platform.c | 2 +- 1 file changed, 1 insertion

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

2016-01-20 Thread Douglas Anderson
y rewrote uframe scheduler again after writing test code. - uframe scheduler atop delayed bandwidth release patches. Douglas Anderson (21): usb: dwc2: rockchip: Make the max_transfer_size automatic usb: dwc2: host: Get aligned DMA in a more supported way usb: dwc2: host: Set host_rx_fifo_s

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

2016-01-20 Thread Douglas Anderson
e sure that whenever we free qh we also make sure we remove a reference from its channel. The bug fixed here doesn't appear to be new--I believe I just got lucky and happened to see it while stress testing. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v4: - Avoid use

[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 <diand...

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

2016-01-20 Thread Douglas Anderson
and often see keys dropped or repeated. After this change the above setup works properly. This patch is based on a previous patch proposed by Yunzhi Li ("usb: dwc2: hcd: fix periodic transfer schedule sequence") Signed-off-by: Douglas Anderson <diand...@chromium.org> Signed-off

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

2016-01-20 Thread Douglas Anderson
ehavior and just add the proper delay. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v4: - Moved periodic bandwidth release delay patch earlier again. Changes in v3: - Moved periodic bandwidth release delay patch later in the series. Changes in v2: - Periodic bandwidt

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

2016-01-20 Thread Douglas Anderson
params. - If we can remove the 65535 limit, we can transfer more! Signed-off-by: Douglas Anderson <diand...@chromium.org> Acked-by: John Youn <johny...@synopsys.com> Tested-by: Heiko Stuebner <he...@sntech.de> --- Changes in v4: - Add John's Acks from <https://patchwork.kerne

[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 <diand...@chromium.org> --- Changes

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

2016-01-20 Thread Douglas Anderson
ing it works), so maybe a future patch (or a future version of this patch?) could remove that parameter. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v4: - Manage frame nums better in scheduler new for v4. Changes in v3: None Changes in v2: None drivers/usb/dwc2

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

2016-01-20 Thread Douglas Anderson
USB audio + some keyboards) crackles less. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v4: - Figured out what the microframe scheduler was supposed to do. - Microframe rewrite is totally different from v3, hopefully more right. - Microframe rewrite is later in the seri

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

2016-01-20 Thread Douglas Anderson
("usb: dwc2: host: Properly set even/odd frame"). Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v4: - Add dwc2_hcd_get_future_frame_number() call new for v4. Changes in v3: None Changes in v2: None drivers/usb/dwc2/core.h | 4 drivers/usb/

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

2016-01-20 Thread Douglas Anderson
. That means last in first out. Doh. Go through and just always add to the tail. Doing this makes things much happier when I've got: * 7-port USB 2.0 Single-TT hub * - Microsoft 2.4 GHz Transceiver v7.0 dongle * - Jabra speakerphone playing music Signed-off-by: Douglas Anderson <diand...@chromium.

[PATCH v5 1/2] usb: dwc2: host: Add missing spinlock in dwc2_hcd_reset_func()

2015-11-20 Thread Douglas Anderson
it's still probably wise to fix the function. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v5: - New for v5 of the series drivers/usb/dwc2/hcd.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index 42b6c51276

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

2015-11-20 Thread Douglas Anderson
that for dwc2_handle_usb_port_intr(), instead of moving the clear of PRTINT to the beginning of the function we remove it completely. The only way to clear PRTINT is to clear the sources that set it in the first place. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v5: - Rebase

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

2015-11-19 Thread Douglas Anderson
-by: Douglas Anderson <diand...@chromium.org> Acked-by: John Youn <johny...@synopsys.com> Tested-by: John Youn <johny...@synopsys.com> --- Changes in v3: - Don't (uselessly) clear the PRTINT anymore (Felipe Balbi). Changes in v2: None drivers/usb/dwc

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

2015-11-19 Thread Douglas Anderson
). Signed-off-by: Douglas Anderson <diand...@chromium.org> Acked-by: John Youn <johny...@synopsys.com> Tested-by: John Youn <johny...@synopsys.com> --- Changes in v3: - Add notes to device insertions commit message (Felipe Balbi) Changes in v2: - Don't reconnect when called from

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

2015-11-19 Thread Douglas Anderson
). Signed-off-by: Douglas Anderson <diand...@chromium.org> Acked-by: John Youn <johny...@synopsys.com> Tested-by: John Youn <johny...@synopsys.com> --- Changes in v4: None Changes in v3: - Add notes to device insertions commit message (Felipe Balbi) Changes in v2: - Don'

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

2015-11-19 Thread Douglas Anderson
that for dwc2_handle_usb_port_intr(), instead of moving the clear of PRTINT to the beginning of the function we remove it completely. The only way to clear PRTINT is to clear the sources that set it in the first place. Signed-off-by: Douglas Anderson <diand...@chromium.org> Acked-by: John Youn

[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 <di

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

2015-11-16 Thread Douglas Anderson
rrupt qh unlink") and add a 5ms delay. Since we don't have a whole timer infrastructure in dwc2, we'll just add a timer per QH. The overhead for this is very small. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v3: - Moved periodic bandwidth release delay

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

2015-11-16 Thread Douglas Anderson
experience) to be much more common and any schedule that would work on a single_tt hub will also work on a multi_tt hub. This will prevent more than 8 total low/full speed devices to be on the bus at one time, but that's a reasonable restriction until we've made things smarter. Signed-off-by: Douglas

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

2015-11-16 Thread Douglas Anderson
and ftrace is more appropriate for performance-critical traces. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v3: - scheduler tracing new for v3. Changes in v2: None drivers/usb/dwc2/core.h | 9 + drivers/usb/dwc2/hcd.h | 5 + drivers/us

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

2015-11-16 Thread Douglas Anderson
dwc2: host: Add a delay before releasing periodic bandwidth") to come first. Signed-off-by: Douglas Anderson <diand...@chromium.org> Tested-by: Heiko Stuebner <he...@sntech.de> --- Changes in v3: None Changes in v2: - Commit message now says that URB giveback change needs delay chan

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

2015-11-16 Thread Douglas Anderson
scheduler again after writing test code. - uframe scheduler atop delayed bandwidth release patches. - Periodic bandwidth release delay new for V2 - Commit message now says that URB giveback change needs delay change. Douglas Anderson (8): usb: dwc2: rockchip: Make the max_transfer_size automati

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

2015-11-16 Thread Douglas Anderson
or this up on pastebin: http://pastebin.com/PjxktNYA Note that the frames picked by the microframe scheduler functions aren't properly used yet elsewhere, so this patch won't really have much of an effect. See future patches in the series. Signed-off-by: Douglas Anderson <diand...@chromium.org> -

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

2015-11-16 Thread Douglas Anderson
params. - If we can remove the 65535 limit, we can transfer more! Signed-off-by: Douglas Anderson <diand...@chromium.org> Tested-by: Heiko Stuebner <he...@sntech.de> --- Changes in v3: None Changes in v2: None drivers/usb/dwc2/platform.c | 2 +- 1 file changed, 1 insertion(+), 1 delet

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

2015-11-16 Thread Douglas Anderson
of removing the 65535 max transfer size limit. NOTE: The actual code to allocate the aligned buffers is ripped almost completely from the tegra EHCI driver. At some point in the future we may want to add this functionality to the USB core to share more code everywhere. Signed-off-by: Douglas Anderson

[REPOST PATCH] usb: dwc2: host: Support immediate retries for split transactions

2015-11-11 Thread Douglas Anderson
nge, we no longer get dropped characters from the above mentioned keyboard. Other devices on the same bus as the keyboard also behave more properly. Thanks for Julius Werner for the expert analysis and suggestions. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Repost without t

[PATCH] WIP: usb: dwc2: host: Support immediate retries for split transactions

2015-11-11 Thread Douglas Anderson
nge, we no longer get dropped characters from the above mentioned keyboard. Other devices on the same bus as the keyboard also behave more properly. Thanks for Julius Werner for the expert analysis and suggestions. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- drivers/usb/dwc2/

[PATCH v2] usb: dwc2: host: Rewrite the microframe scheduler

2015-11-09 Thread Douglas Anderson
tle impact of the microframe scheduler overall. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Since no known bugs are fixed by this code and my current setup hardly stress the microframe scheduler at all, please give extra eyes and extra testing to this patch. Thanks! Changes in v2: -

[PATCH v2 1/4] usb: dwc2: rockchip: Make the max_transfer_size automatic

2015-11-06 Thread Douglas Anderson
params. - If we can remove the 65535 limit, we can transfer more! Signed-off-by: Douglas Anderson <diand...@chromium.org> Tested-by: Heiko Stuebner <he...@sntech.de> --- Changes in v2: None drivers/usb/dwc2/platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[RFC PATCH] usb: dwc2: host: Rewrite the microframe scheduler

2015-11-06 Thread Douglas Anderson
of the microframe scheduler overall. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- drivers/usb/dwc2/hcd_queue.c | 72 1 file changed, 32 insertions(+), 40 deletions(-) diff --git a/drivers/usb/dwc2/hcd_queue.c b/drivers/usb/dwc2/hcd_queue.c

  1   2   >