Re: [PATCH 1/4] usb: dwc3: of-simple: add compatible for rockchip

2016-05-09 Thread Doug Anderson
William, On Mon, May 9, 2016 at 4:46 AM, William Wu wrote: > Signed-off-by: William Wu > --- > drivers/usb/dwc3/dwc3-of-simple.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/usb/dwc3/dwc3-of-simple.c > b/drivers/usb/dwc3/dwc3-of-simple.c > index 9743353..1f3665b 100644 > --

Re: [PATCH v5 1/4] ARM: EXYNOS: Update & move usb-phy types to generic include layer

2012-12-19 Thread Doug Anderson
Vivek, On Tue, Dec 18, 2012 at 6:43 AM, Vivek Gautam wrote: > Updating the names of usb-phy types to more generic names: > USB_PHY_TYPE_DEIVCE & USB_PHY_TYPE_HOST; and further update > its dependencies. Since you're changing the name, I would have expected to see a removal of the old enum type i

Re: [PATCH v5 2/4] usb: phy: samsung: Add host phy support to samsung-phy driver

2012-12-19 Thread Doug Anderson
Vivek, I don't really have a good 1 foot view about how all of the USB bits fit together, but a few detail-oriented comments below. On Tue, Dec 18, 2012 at 6:43 AM, Vivek Gautam wrote: > This patch adds host phy support to samsung-usbphy.c and > further adds support for samsung's exynos5250

Re: [PATCH v5 3/4] USB: ehci-s5p: Add phy driver support

2012-12-19 Thread Doug Anderson
Vivek, Again, not a high-level review, but... On Tue, Dec 18, 2012 at 6:43 AM, Vivek Gautam wrote: > Adding the phy driver to ehci-s5p. Keeping the platform data > for continuing the smooth operation for boards which still uses it > > Signed-off-by: Vivek Gautam > Acked-by: Jingoo Han > --- >

Re: [PATCH v5 1/4] ARM: EXYNOS: Update & move usb-phy types to generic include layer

2012-12-20 Thread Doug Anderson
Vivek, On Wed, Dec 19, 2012 at 9:51 PM, Vivek Gautam wrote: > Hi Doug, > > > On Thu, Dec 20, 2012 at 3:18 AM, Doug Anderson wrote: >> Vivek, >> >> Since you're changing the name, I would have expected to see a removal >> of the old enum type in thi

Re: [PATCH v5 3/4] USB: ehci-s5p: Add phy driver support

2012-12-20 Thread Doug Anderson
On Wed, Dec 19, 2012 at 10:37 PM, Vivek Gautam wrote: > > On Thu, Dec 20, 2012 at 5:00 AM, Doug Anderson wrote: >> >> On Tue, Dec 18, 2012 at 6:43 AM, Vivek Gautam >> wrote: >>> +static void s5p_ehci_phy_enable(struct s5p_ehci_hcd *s5p_ehci) >>> +

Re: [PATCH v3] usb: phy: samsung: Add support to set pmu isolation

2012-12-21 Thread Doug Anderson
Vivek, Nothing really serious below and things look good to me, but figured I'd put a few nits in (sorry!). On Fri, Dec 21, 2012 at 12:16 AM, Vivek Gautam wrote: > diff --git a/Documentation/devicetree/bindings/usb/samsung-usbphy.txt > b/Documentation/devicetree/bindings/usb/samsung-usbphy.txt

Re: [PATCH 0/2] usb: exynos: Fix compatible strings used for device

2012-12-21 Thread Doug Anderson
mpatible strings for the device >>>> usb: dwc3-exynos: Fix compatible strings for the device >>> >>> for both patches: >>> Acked-by: Grant Likely >>> > > Any more thought about this patch-set? > Or does this change seems fin

Re: [PATCH v3 1/2] ARM: Exynos5250: Enabling ehci-s5p driver

2012-12-21 Thread Doug Anderson
Vivek, On Fri, Dec 21, 2012 at 12:16 AM, Vivek Gautam wrote: > Hi all, > > > On Wed, Dec 19, 2012 at 7:20 PM, Vivek Gautam > wrote: >> CC: Doug Anderson >> >> >> On Sat, Dec 15, 2012 at 12:53 PM, Grant Likely >> wrote: >>> On Thu

Re: [PATCH v5 2/4] usb: phy: samsung: Add host phy support to samsung-phy driver

2013-01-11 Thread Doug Anderson
Vivek, On Fri, Jan 11, 2013 at 4:40 AM, Vivek Gautam wrote: >>> +#define HOST_CTRL0_REFCLKSEL_MASK (0x3) >>> +#define HOST_CTRL0_REFCLKSEL_XTAL (0x0 << 19) >>> +#define HOST_CTRL0_REFCLKSEL_EXTL (0x1 << 19) >>> +#define HOST_CTRL0_REFCLKSEL_CLKCORE

Re: [PATCH] usb: phy: samsung: Add support to set pmu isolation

2013-01-14 Thread Doug Anderson
Vivek, Sorry for being so absent from these reviews. I'll try to look over a few patches today, but please don't hold up anything on account of my reviews. I'm definitely a bit of an interested bystander in USB land. ;) In general things look pretty good here. :) One last comment below... O

Re: [PATCH v5 2/4] usb: phy: samsung: Add host phy support to samsung-phy driver

2013-01-14 Thread Doug Anderson
Vivek, On Mon, Jan 14, 2013 at 12:06 AM, Vivek Gautam wrote: >> Is it fine if we don't use macro for SHIFT, earlier code also doesn't use it. >> Can we just do like this .. >> #define HOST_CTRL0_FSEL_MASK (0x7 << 16) >> #define HOST_CTRL0_FSEL_CLKSEL_50M(0x7 <<

Re: [PATCH 00/18] usb: dwc2: Reduce probe delays

2015-12-09 Thread Doug Anderson
John, On Wed, Dec 2, 2015 at 11:11 AM, John Youn wrote: > This series includes patches that were submitted earlier by Douglas > Anderson and Yunzhi Li to reduce delays during probe and get the > correct reset values of the hardware configuration registers. These > are patches 1-6 in this series.

Re: [PATCH 13/18] usb: dwc2: Move reset into dwc2_get_hwparams()

2015-12-09 Thread Doug Anderson
John, On Wed, Dec 2, 2015 at 11:14 AM, John Youn wrote: > The reset is required to get reset values of the hardware parameters but > the force mode is not. Move the base reset into dwc2_get_hwparams() and > do the reset and force mode afterwards. > > Signed-off-by: John Youn > --- > drivers/usb

Re: [PATCH 08/18] usb: dwc2: Rename dwc2_core_reset()

2015-12-09 Thread Doug Anderson
John, On Wed, Dec 2, 2015 at 11:13 AM, John Youn wrote: > Renamed dwc2_core_reset() to dwc2_core_reset_and_force_mode(). This > describes what it is doing more accurately. This is in preparation of > introducing a plain dwc2_core_reset() function that only performs the > reset and doesn't force t

Re: [PATCH 10/18] usb: dwc2: Add functions to check the HW OTG config

2015-12-09 Thread Doug Anderson
John, On Wed, Dec 2, 2015 at 11:13 AM, John Youn wrote: > Added functions to query the GHWCFG2.OTG_MODE. This tells us whether the > controller hardware is configured for OTG, device-only, or host-only. > > Signed-off-by: John Youn > --- > drivers/usb/dwc2/core.c | 37 ++

Re: [PATCH 07/18] usb: dwc2: Reorder AHBIDLE and CSFTRST in dwc2_core_reset()

2015-12-09 Thread Doug Anderson
John, On Wed, Dec 2, 2015 at 11:13 AM, John Youn wrote: > According to the databook, the core soft reset should be done before > checking for AHBIDLE. The gadget version of core reset had it correct > but the hcd version did not. This fixes the hcd version. > > Signed-off-by: John Youn > --- >

Re: [PATCH 09/18] usb: dwc2: Add dwc2_core_reset()

2015-12-09 Thread Doug Anderson
John, On Wed, Dec 2, 2015 at 11:13 AM, John Youn wrote: > dwc2_core_reset() was previously renamed to > dwc2_core_reset_and_force_mode(). Now add back dwc2_core_reset() which > performs only a basic core reset without forcing the mode. > > Signed-off-by: John Youn > --- > drivers/usb/dwc2/core.

Re: [PATCH 12/18] usb: dwc2: Move mode querying functions into core.h

2015-12-09 Thread Doug Anderson
John, On Wed, Dec 2, 2015 at 11:14 AM, John Youn wrote: > These functions should go in core.h where they can be called from core, > device, or host. > > Signed-off-by: John Youn > --- > drivers/usb/dwc2/core.h | 12 > drivers/usb/dwc2/hcd.h | 12 > 2 files changed, 12

Re: [PATCH 14/18] usb: dwc2: Add functions to set and clear force mode

2015-12-09 Thread Doug Anderson
John, On Wed, Dec 2, 2015 at 11:14 AM, John Youn wrote: > Added functions to set force mode for host and device. These functions > will check the current mode and only force if needed. > > Signed-off-by: John Youn > --- > drivers/usb/dwc2/core.c | 54 > +

Re: [PATCH 18/18] usb: dwc2: Reduce delay when forcing mode in reset

2015-12-09 Thread Doug Anderson
John, On Wed, Dec 2, 2015 at 11:15 AM, John Youn wrote: > The delay for force mode is only 25ms according to the databook. > > Signed-off-by: John Youn > --- > drivers/usb/dwc2/core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/

Re: [PATCH 15/18] usb: dwc2: Improve handling of host and device hwparams

2015-12-09 Thread Doug Anderson
John, On Wed, Dec 2, 2015 at 11:15 AM, John Youn wrote: > This commit adds separate functions for getting the host and device > specific hardware params. These functions check whether the parameters > need to be read at all, depending on dr_mode, and they force the mode > only if necessary. This

Re: poweroff-issue with dwc2 on Felipe's testing/next branch

2015-12-16 Thread Doug Anderson
Hi, On Wed, Dec 16, 2015 at 7:35 AM, Felipe Balbi wrote: > > Hi, > > John Youn writes: >> On 12/15/2015 3:49 PM, Heiko Stübner wrote: >>> Hi, >>> >>> it seems the recent dwc2 additions to the testing/next branch [0] caused >>> some interesting issue for me. >>> >>> Setting is a regular 4.4-rc3/4

Re: poweroff-issue with dwc2 on Felipe's testing/next branch

2015-12-16 Thread Doug Anderson
Hi, On Wed, Dec 16, 2015 at 9:36 AM, Doug Anderson wrote: > Hi, > > On Wed, Dec 16, 2015 at 7:35 AM, Felipe Balbi wrote: >> >> Hi, >> >> John Youn writes: >>> On 12/15/2015 3:49 PM, Heiko Stübner wrote: >>>> Hi, >>>> >>>

Re: [PATCH] usb: dwc2: add shutdown callback to platform variant

2015-12-18 Thread Doug Anderson
Heiko, On Fri, Dec 18, 2015 at 10:30 AM, Heiko Stübner wrote: > In specific conditions (involving usb hubs) dwc2 devices can create a > lot of interrupts, even to the point of overwhelming devices running > at low frequencies. Some devices need to do special clock handling > at shutdown-time whic

Re: [PATCH] usb: dwc2: add shutdown callback to platform variant

2015-12-18 Thread Doug Anderson
Heiko, On Fri, Dec 18, 2015 at 3:17 PM, Heiko Stübner wrote: > Hi Doug, > > Am Freitag, 18. Dezember 2015, 14:50:14 schrieb Doug Anderson: >> On Fri, Dec 18, 2015 at 10:30 AM, Heiko Stübner >> wrote: >> > In specific conditions (involving usb hubs) dwc2 de

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 order as SSPLIT packets. >>

Re: Bug in split transactions on Raspberry Pi

2016-01-21 Thread Doug Anderson
Hi, On Thu, Jan 21, 2016 at 1:28 PM, Alan Stern wrote: > John, Doug, or anyone else: > > I've got a Raspberry Pi 2B and I'm trying to use it with a compound > device. The device has a High-Speed hub with a Full-Speed function > permanently attached to port 4. > > The RPi detects the function but

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

2016-01-21 Thread Doug Anderson
Hi, On Wed, Jan 20, 2016 at 9:24 PM, kbuild test robot wrote: > 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: > htt

Re: Bug in split transactions on Raspberry Pi

2016-01-22 Thread Doug Anderson
Alan, On Fri, Jan 22, 2016 at 11:48 AM, Alan Stern wrote: > On Thu, 21 Jan 2016, Doug Anderson wrote: > >> This doesn't sound familiar to me, but as far as I know all the >> official Raspberry Pi kernels use a pretty different dwc2 driver. See >> the (non-mainl

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

2016-01-23 Thread Doug Anderson
Heiko, On Sat, Jan 23, 2016 at 9:52 AM, Heiko Stuebner wrote: > Hi, > > Am Freitag, 22. Januar 2016, 10:18:35 schrieb 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

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

2016-01-23 Thread Doug Anderson
Hi, On Sat, Jan 23, 2016 at 3:09 PM, Doug Anderson wrote: > Heiko, > > On Sat, Jan 23, 2016 at 9:52 AM, Heiko Stuebner wrote: >> Hi, >> >> Am Freitag, 22. Januar 2016, 10:18:35 schrieb Douglas Anderson: >>> This is a bit of catchall series for all the bug

Re: usb: dwc2: Disconnecting hub from rpi leads to errors

2016-01-23 Thread Doug Anderson
Hi, On Sat, Jan 23, 2016 at 9:08 AM, Stefan Wahren wrote: > Hi, > >> Stefan Wahren hat am 17. Januar 2016 um 04:36 >> geschrieben: >> >> >> Hi, >> >> i have a Cherry G83 USB Keyboard connected to external 4 Port USB hub and >> this >> is connected to a Raspberry Pi B (Linux 4.4-rc7). >> >> If i

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

2016-01-23 Thread Doug Anderson
Hi, On Fri, Jan 22, 2016 at 10:18 AM, Douglas Anderson wrote: > 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 thi

Re: Bug in split transactions on Raspberry Pi

2016-01-25 Thread Doug Anderson
Hi, On Mon, Jan 25, 2016 at 12:05 PM, Alan Stern wrote: > On Fri, 22 Jan 2016, Doug Anderson wrote: > >> > The corresponding line in the dwc2_host_hub_info() routine simply does: >> > >> > *hub_port = urb->dev->ttport; >> > >> > Un

Re: Bug in split transactions on Raspberry Pi

2016-01-25 Thread Doug Anderson
Alan, On Mon, Jan 25, 2016 at 1:04 PM, Alan Stern wrote: > On Mon, 25 Jan 2016, Doug Anderson wrote: > >> > Okay, I checked it. Oddly enough, even though the SPLIT packet's >> > contents are now correct, the device still doesn't respond. >> > >

Re: Bug in split transactions on Raspberry Pi

2016-01-25 Thread Doug Anderson
Hi, On Mon, Jan 25, 2016 at 1:51 PM, Alan Stern wrote: > On Mon, 25 Jan 2016, Peter Stuge wrote: > >> Alan Stern wrote: >> > the device's embedded hub ACKs the packets from the PC and not the >> > packets from the RPi. >> > >> > What other differences could there be? Timing? Power levels? >> >>

Re: [PATCH v2 0/2] usb: dwc2: Fix regressions on bcm2835

2016-01-26 Thread Doug Anderson
Hi, On Thu, Jan 21, 2016 at 3:28 PM, Heiko Stuebner wrote: > Am Montag, 11. Januar 2016, 16:32:00 schrieb John Youn: >> This series fixes a couple regressions reported on Raspberry Pi. > > same regressions (Isaw strange usb resets) seem to affect Rockchip as well > and these two patches seem to f

Re: Bug in split transactions on Raspberry Pi

2016-01-26 Thread Doug Anderson
Hi, On Tue, Jan 26, 2016 at 7:08 AM, Alan Stern wrote: > On Mon, 25 Jan 2016, Doug Anderson wrote: > >> Hi, >> >> On Mon, Jan 25, 2016 at 1:51 PM, Alan Stern >> wrote: >> > On Mon, 25 Jan 2016, Peter Stuge wrote: >> > >> >> Alan Ste

Re: Bug in split transactions on Raspberry Pi

2016-01-26 Thread Doug Anderson
Hi, On Tue, Jan 26, 2016 at 10:22 AM, Alan Stern wrote: > On Tue, 26 Jan 2016, Noralf Trønnes wrote: > >> > I installed the rpi-4.4.y branch from the >> > https://github.com/raspberrypi/linux repository. As is, it generated a >> > working kernel. Then I tried editing the config; I removed >> >

Re: Bug in split transactions on Raspberry Pi

2016-01-26 Thread Doug Anderson
Hi, On Tue, Jan 26, 2016 at 10:26 AM, Doug Anderson wrote: > Hi, > > On Tue, Jan 26, 2016 at 10:22 AM, Alan Stern > wrote: >> On Tue, 26 Jan 2016, Noralf Trønnes wrote: >> >>> > I installed the rpi-4.4.y branch from the >>> > https://git

Re: Bug in split transactions on Raspberry Pi

2016-01-26 Thread Doug Anderson
Alan, On Tue, Jan 26, 2016 at 12:29 PM, Alan Stern wrote: > On Tue, 26 Jan 2016, Doug Anderson wrote: > >> >> Doug, do you have a list of patches you'd like me to try on top of the >> >> rpi-4.4.y branch? >> > >> > Nice! You can give this se

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

2016-01-27 Thread Doug Anderson
Stefan, On Wed, Jan 27, 2016 at 9:33 AM, Stefan Wahren wrote: > Hi Doug, > >> 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_size to 528 for rk3066 >> usb:

Re: Bug in split transactions on Raspberry Pi

2016-01-27 Thread Doug Anderson
Alan, On Wed, Jan 27, 2016 at 11:03 AM, Alan Stern wrote: > On Tue, 26 Jan 2016, Doug Anderson wrote: > >> > This probably indicates that the list of patches was incomplete (i.e., >> > some other patches were applied before these). Also, the patches >> > aren&#

Re: usb: dwc2: Disconnecting hub from rpi leads to errors

2016-01-27 Thread Doug Anderson
Stefan, On Sat, Jan 23, 2016 at 9:08 AM, Stefan Wahren wrote: > Hi, > >> Stefan Wahren hat am 17. Januar 2016 um 04:36 >> geschrieben: >> >> >> Hi, >> >> i have a Cherry G83 USB Keyboard connected to external 4 Port USB hub and >> this >> is connected to a Raspberry Pi B (Linux 4.4-rc7). >> >>

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

2016-01-27 Thread Doug Anderson
Kever, On Wed, Jan 27, 2016 at 2:13 AM, Kever Yang wrote: > Hi Doug, > > On 01/23/2016 02:18 AM, Douglas Anderson wrote: >> >> 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 chann

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

2016-01-27 Thread Doug Anderson
Stefan, On Wed, Jan 27, 2016 at 12:36 PM, Stefan Wahren wrote: > i can only give you feedback from a user perspective. My keyboard and C-Media > USB Audio still works as expected. OK, thanks! So you had no problems before my patches and you still have no problems after my patches. ...but your

Re: Bug in split transactions on Raspberry Pi

2016-01-27 Thread Doug Anderson
Alan, On Wed, Jan 27, 2016 at 11:21 AM, Doug Anderson wrote: > Alan, > > On Wed, Jan 27, 2016 at 11:03 AM, Alan Stern > wrote: >> On Tue, 26 Jan 2016, Doug Anderson wrote: >> >>> > This probably indicates that the list of patches was incomplete (i.e., &

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

2016-01-27 Thread Doug Anderson
Hi, On Fri, Jan 22, 2016 at 10:18 AM, Douglas Anderson wrote: > 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 microf

Re: Bug in split transactions on Raspberry Pi

2016-01-27 Thread Doug Anderson
Hi, On Wed, Jan 27, 2016 at 12:59 PM, Alan Stern wrote: > On Wed, 27 Jan 2016, Doug Anderson wrote: > >> > In the end I just used the contents of the dwc2 directory from Linus's >> > current tree -- I don't think it has changed since 4.5-rc1. Your >>

Re: Bug in split transactions on Raspberry Pi

2016-01-27 Thread Doug Anderson
Alan, On Wed, Jan 27, 2016 at 1:34 PM, Alan Stern wrote: > On Wed, 27 Jan 2016, Doug Anderson wrote: > >> This patch should fix ya. >> >> FIXUP: FROMLIST: usb: dwc2: host: Manage frame nums better in scheduler >> https://chromium-review.googlesource.com/324185 >

Re: Bug in split transactions on Raspberry Pi

2016-01-27 Thread Doug Anderson
Hi, On Wed, Jan 27, 2016 at 2:03 PM, Alan Stern wrote: > On Wed, 27 Jan 2016, Doug Anderson wrote: > >> Alan, >> >> On Wed, Jan 27, 2016 at 1:34 PM, Alan Stern >> wrote: >> > On Wed, 27 Jan 2016, Doug Anderson wrote: >> > >> >> This

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

2016-01-27 Thread Doug Anderson
Kever, On Wed, Jan 27, 2016 at 7:10 PM, Kever Yang wrote: > Hi Doug, > > We are using the minimum FIFO size mode for TX now, which only > equal to one max packet size. > > The addition FIFO size may help shorten the inter-packet data > prepare latency when the bus/DRAM is busy. > > For the actual

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

2016-01-28 Thread Doug Anderson
Kever, On Wed, Jan 27, 2016 at 10:41 PM, Kever Yang wrote: > Hi Doug, > > We are in HOST mode, we only need to receive data from USB camera > with RX FIFO, and no need to use TX FIFO for USB webcam, right? :) > > Any way, I think we need to NAK this patch after look into the design > of dwc2 con

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

2016-01-28 Thread Doug Anderson
Hi, On Thu, Jan 28, 2016 at 10:16 AM, Doug Anderson wrote: > Kever, > > > On Wed, Jan 27, 2016 at 10:41 PM, Kever Yang > wrote: >> Hi Doug, >> >> We are in HOST mode, we only need to receive data from USB camera >> with RX FIFO, and no need to use TX F

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

2016-01-28 Thread Doug Anderson
Hi, On Wed, Jan 27, 2016 at 7:25 PM, Kever Yang wrote: > Hi Doug, > > The NULL pointer bug is one of the most frequent issue we met > during hot plug stress test, thanks for this bug fix. > > Reviewed-by: Kever Yang > > Thanks, > - Kever Thanks for your review. I think I actually found one mor

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

2016-01-29 Thread Doug Anderson
Stefan, On Fri, Jan 29, 2016 at 7:28 AM, Stefan Wahren wrote: > Hi Doug, > > Am 27.01.2016 um 21:43 schrieb Doug Anderson: >> Stefan, >> >> On Wed, Jan 27, 2016 at 12:36 PM, Stefan Wahren >> wrote: >>> i can only give you feedback from a user perspec

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

2016-01-31 Thread Doug Anderson
Kever, On Sun, Jan 31, 2016 at 1:36 AM, Kever Yang wrote: > Doug, > > > On 01/29/2016 10:20 AM, Douglas Anderson wrote: >> >> 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

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

2016-01-31 Thread Doug Anderson
Kever, On Sun, Jan 31, 2016 at 1:23 AM, Kever Yang wrote: > Doug, > > On 01/29/2016 10:20 AM, Douglas Anderson wrote: >> >> According to the most up to date version of the dwc2 databook, the FRINT >> field of the HFIR register should be programmed to: >> * 125 us * (PHY clock freq for HS) - 1 >>

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

2016-01-31 Thread Doug Anderson
Kever, On Sun, Jan 31, 2016 at 7:32 PM, Kever Yang wrote: > Doug, > > > On 02/01/2016 06:09 AM, Doug Anderson wrote: >> >> Kever, >> >> On Sun, Jan 31, 2016 at 1:36 AM, Kever Yang >> wrote: >>> >>> Doug, >>>

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

2016-02-01 Thread Doug Anderson
Kever, On Sun, Jan 31, 2016 at 8:36 PM, Doug Anderson wrote: > Kever, > > On Sun, Jan 31, 2016 at 7:32 PM, Kever Yang wrote: >> Doug, >> >> >> On 02/01/2016 06:09 AM, Doug Anderson wrote: >>> >>> Kever, >>> >>> O

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

2016-02-02 Thread Doug Anderson
Kever, On Mon, Feb 1, 2016 at 11:46 PM, Kever Yang wrote: > Doug, > > > On 01/29/2016 10:20 AM, Douglas Anderson wrote: >> >> 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 s

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

2016-02-02 Thread Doug Anderson
Kever, On Mon, Feb 1, 2016 at 11:04 PM, Kever Yang wrote: >>> Oh, now I get what you're saying! >>> >>> A) You've got dwc2_release_channel() -> dwc2_deactivate_qh() -> >>> dwc2_hcd_qh_deactivate() >>> ...and always in that case we'll do a select / queue, so we don't need it >>> there. >>> >>> B)

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

2016-02-03 Thread Doug Anderson
John, On Tue, Feb 2, 2016 at 3:57 PM, John Youn wrote: > On 1/28/2016 6:20 PM, Douglas Anderson wrote: >> 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 s

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

2016-02-03 Thread Doug Anderson
Hi, On Thu, Jan 28, 2016 at 6:20 PM, Douglas Anderson wrote: > static void dwc2_qh_init(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh, > struct dwc2_hcd_urb *urb) > { > @@ -569,11 +655,6 @@ static void dwc2_qh_init(struct dwc2_hsotg *hsotg, > struct dwc2_qh *qh, >

Re: [PATCH] usb: move usb_calc_bus_time into common code

2016-02-19 Thread Doug Anderson
Hi, On Fri, Feb 19, 2016 at 1:52 PM, Alan Stern wrote: > On Fri, 19 Feb 2016, Arnd Bergmann wrote: > >> The dwc2 dual-role USB controller driver has started calling >> usb_calc_bus_time, and does so regardless of whether it is >> being built as a host controller or gadget. In case all > > Out of

Re: [PATCH] usb: move usb_calc_bus_time into common code

2016-02-22 Thread Doug Anderson
John, On Fri, Feb 19, 2016 at 6:55 PM, John Youn wrote: > On 2/19/2016 2:48 PM, Doug Anderson wrote: >> Hi, >> >> On Fri, Feb 19, 2016 at 1:52 PM, Alan Stern >> wrote: >>> On Fri, 19 Feb 2016, Arnd Bergmann wrote: >>> >>>> The

Re: [PATCH v8 3/3] arm64: dts: rockchip: add usb2-phy support for rk3399

2016-07-20 Thread Doug Anderson
Hi, On Tue, Jul 19, 2016 at 12:28 AM, Frank Wang wrote: You need a patch description here, even for simple patches. All you have now is a subject. > Signed-off-by: Frank Wang > --- > arch/arm64/boot/dts/rockchip/rk3399-evb.dts | 19 +++ > arch/arm64/boot/dts/rockchip/rk3399.dtsi

Re: [RFT PATCH 1/2] usb: dwc2: Add a 10 ms delay to dwc2_core_reset()

2016-03-04 Thread Doug Anderson
Michael, On Fri, Mar 4, 2016 at 4:09 PM, Michael Niewoehner wrote: >>> From testing and trying to make sense of the documentation, it appears >>> that a 10 ms delay is needed after resetting the core to make sure that >>> everything is stable and consistent. Let's add it. >>> >>> In my testing (

Re: [RFT PATCH 1/2] usb: dwc2: Add a 10 ms delay to dwc2_core_reset()

2016-03-04 Thread Doug Anderson
Hi, On Fri, Mar 4, 2016 at 3:46 PM, Karl Palsson wrote: >> + /* >> + * Sleep for 10-15 ms after the reset to let it finish. >> + * >> + * It's been confirmed on at least one version of the controller >> + * that this is a requirement that this is a requirement in order for

Odd merge 3b30be3b6487 ("Merge tag 'v4.5-rc6' into next")

2016-03-04 Thread Doug Anderson
Felipe, Michael pointed out that there's an odd merge that happened. Specifically it looks like commit bd84f4ae9986 ("usb: dwc2: Add extra delay when forcing dr_mode") got lost somehow in the merge commit 3b30be3b6487 ("Merge tag 'v4.5-rc6' into next") Specifically: $ git blame 3b30be3b6487 -- d

Re: [RFT PATCH 1/2] usb: dwc2: Add a 10 ms delay to dwc2_core_reset()

2016-03-04 Thread Doug Anderson
Hi, On Fri, Mar 4, 2016 at 4:33 PM, Doug Anderson wrote: > Michael, > > On Fri, Mar 4, 2016 at 4:09 PM, Michael Niewoehner > wrote: >>>> From testing and trying to make sense of the documentation, it appears >>>> that a 10 ms delay is needed after

Re: Odd merge 3b30be3b6487 ("Merge tag 'v4.5-rc6' into next")

2016-03-04 Thread Doug Anderson
Hi, On Fri, Mar 4, 2016 at 5:56 PM, John Youn wrote: > On 3/4/2016 5:04 PM, Doug Anderson wrote: >> Felipe, >> >> Michael pointed out that there's an odd merge that happened. >> Specifically it looks like commit bd84f4ae9986 ("usb: dwc2: Add extra >> de

Re: [RFT PATCH 1/2] usb: dwc2: Add a 10 ms delay to dwc2_core_reset()

2016-03-05 Thread Doug Anderson
Hi, On Sat, Mar 5, 2016 at 12:41 PM, Michael Niewoehner wrote: > Hi Douglas, > Hi John, > > Am 05.03.2016 um 01:33 schrieb Doug Anderson : > >> Michael, >> >> On Fri, Mar 4, 2016 at 4:09 PM, Michael Niewoehner >> wrote: >>>>> From tes

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

2016-03-07 Thread Doug Anderson
Stefan, On Mon, Mar 7, 2016 at 10:40 AM, Stefan Wahren wrote: > Hi Doug, > >> Douglas Anderson hat am 4. März 2016 um 19:23 >> geschrieben: >> >> >> This reverts commit 192cb07f7928 ("usb: dwc2: Fix probe problem on >> bcm2835") now that we've found the root cause. See the change >> titled ("usb

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

2016-03-09 Thread Doug Anderson
Stefan, On Wed, Mar 9, 2016 at 11:01 AM, Stefan Wahren wrote: > >> Doug Anderson hat am 7. März 2016 um 22:30 >> geschrieben: >> >> >> Stefan, >> >> On Mon, Mar 7, 2016 at 10:40 AM, Stefan Wahren >> wrote: >> > Hi Dou

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

2016-03-18 Thread Doug Anderson
Hi, On Wed, Mar 16, 2016 at 11:28 AM, John Youn wrote: > On 3/10/2016 11:14 AM, John Youn wrote: >> On 3/9/2016 11:06 AM, Doug Anderson wrote: >>> Stefan, >>> >>> On Wed, Mar 9, 2016 at 11:01 AM, Stefan Wahren >>> wrote: >>>> >>&g

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

2016-03-22 Thread Doug Anderson
John, On Tue, Mar 22, 2016 at 12:26 PM, John Youn wrote: > Thanks for the debug logs and everyones help. > > After reviewing with our hardware engineers, it seems this is likely > to do with the IDDIG debounce filtering when switching between > modes. You can see if this is enabled in your core b

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

2017-03-20 Thread Doug Anderson
Hi, On Thu, Mar 16, 2017 at 12:24 PM, Guenter Roeck wrote: > @@ -1198,7 +1201,7 @@ static void hub_activate(struct usb_hub *hub, enum > hub_activation_type type) > > /* Scan all ports that need attention */ > kick_hub_wq(hub); > - > +abort: One tiny nit that could be done when a

Re: [PATCH] USB: ehci-s5p: Fix phy reset

2013-03-13 Thread Doug Anderson
Alexander, On Tue, Mar 12, 2013 at 6:09 PM, Alexander Graf wrote: > - err = gpio_request_one(gpio, GPIOF_OUT_INIT_HIGH, "ehci_vbus_gpio"); > - if (err) > + /* reset pulls the line down, then up again */ > + err = gpio_request_one(gpio, GPIOF_OUT_INIT_LOW, "ehci_vbus_gpio")

Re: [PATCH] USB: ehci-s5p: Fix phy reset

2013-03-13 Thread Doug Anderson
Alexander, On Wed, Mar 13, 2013 at 10:45 AM, Alexander Graf wrote: > >>> + gpio_free(gpio); >> >> Freeing the gpio is a little on the iffy side since you actually care >> about keeping the value. Perhaps you can change this to >> devm_gpio_request_one() and avoid the free? I was about to

Re: [PATCH v2] USB: ehci-s5p: Fix phy reset

2013-03-13 Thread Doug Anderson
t; This patch implements the above logic, making EHCI and OHCI work on > Arndale systems for me. > > Signed-off-by: Alexander Graf > CC: Vivek Gautam > CC: Jingoo Han > CC: Alan Stern > CC: Kukjin Kim > CC: Felipe Balbi > CC: Greg Kroah-Hartman > CC: Doug Anders

Re: [PATCH v2] USB: ehci-s5p: Fix phy reset

2013-03-14 Thread Doug Anderson
Hi, On Thu, Mar 14, 2013 at 7:58 AM, Thomas Abraham wrote: >> I can see your point, but as I mentioned earlier there seems to be some >> timing issue here. By simply doing the reset a few ms earlier (in the first >> probe, before the driver detects that it needs to defer probing), I already >>

[PATCH] usb: ehci-s5p: Use devm for requesting ehci_vbus_gpio

2013-03-14 Thread Doug Anderson
The ehci_vbus_gpio is requested but never freed. This can cause problems with deferred probes and would cause problems if s5p_ehci_remove was ever called. Use devm to fix this. Signed-off-by: Doug Anderson --- drivers/usb/host/ehci-s5p.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion

Re: [PATCH] usb: ehci-s5p: Use devm for requesting ehci_vbus_gpio

2013-03-14 Thread Doug Anderson
Jingoo, On Thu, Mar 14, 2013 at 5:30 PM, Jingoo Han wrote: > Would you replace other '&pdev->dev' with 'dev' in s5p_setup_vbus_gpio() > as below? It seems to be better for readability. Yes, of course. That was silly of me not to add the "dev" local and not update the other places... Thanks for

[PATCH v2] usb: ehci-s5p: Use devm for requesting ehci_vbus_gpio

2013-03-14 Thread Doug Anderson
The ehci_vbus_gpio is requested but never freed. This can cause problems with deferred probes and would cause problems if s5p_ehci_remove was ever called. Use devm to fix this. Signed-off-by: Doug Anderson --- Changes in v2: - &pdev->dev => dev elsewhere in s5p_setup_vbus_gpio() d

Re: [PATCH v3] usb: dwc2: add bus suspend/resume for dwc2

2014-11-12 Thread Doug Anderson
Kever, On Mon, Nov 10, 2014 at 5:09 AM, Kever Yang wrote: > Hcd controller needs bus_suspend/resume, dwc2 controller make > root hub generate suspend/resume signal with hprt0 register > when work in host mode. > After the root hub enter suspend, we can make controller enter > low power state with

Re: [PATCH v2] usb: dwc2: resume root hub when device detect with suspend state

2014-11-17 Thread Doug Anderson
t in my tests this fixes the problems introduced by your v3 patch at <https://patchwork.kernel.org/patch/5266281/>. On rk3288-pinky: Tested-by: Doug Anderson -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v7 2/5] phy: add a driver for the Rockchip SoC internal USB2.0 PHY

2014-12-12 Thread Doug Anderson
Yunzhi, On Fri, Dec 12, 2014 at 7:07 AM, Yunzhi Li wrote: > This patch to add a generic PHY driver for ROCKCHIP usb PHYs, > currently this driver can support RK3288. The RK3288 SoC have > three independent USB PHY IPs which are all configured through a > set of registers located in the GRF (gener

Re: [PATCH v7 2/5] phy: add a driver for the Rockchip SoC internal USB2.0 PHY

2014-12-13 Thread Doug Anderson
Hi, On Fri, Dec 12, 2014 at 11:24 PM, Kishon Vijay Abraham I wrote: > hi, > > On Saturday 13 December 2014 05:49 AM, Doug Anderson wrote: >> Yunzhi, >> >> On Fri, Dec 12, 2014 at 7:07 AM, Yunzhi Li wrote: >>> This patch to add a generic PHY driver for R

Re: [PATCH v7 2/5] phy: add a driver for the Rockchip SoC internal USB2.0 PHY

2014-12-15 Thread Doug Anderson
sb.c On rk3288-pinky (on a 3.14 tree with backports), I can confirm that this properly gets us into low power at suspend time. Tested-by: Doug Anderson -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v7 3/5] usb: dwc2: add generic PHY framework support for dwc2 usb controler platform driver.

2014-12-15 Thread Doug Anderson
ic phy > APIs. > > drivers/usb/dwc2/gadget.c | 33 - > drivers/usb/dwc2/platform.c | 36 ++-- > 2 files changed, 46 insertions(+), 23 deletions(-) On rk3288-pinky (on a 3.14 tree with backports), I can confirm that this properly get

Re: [PATCH 2/2] USB: ehci-platform: Support ehci reset after resume quirk

2014-12-22 Thread Doug Anderson
7/1/drivers/usb/host/ehci-platform.c Since I don't know the USB subsystem particularly well, my review isn't terribly meaningful, but just in case: Reviewed-by: Doug Anderson On rk3288-pinky I have tested that without this patch the EHCI controller flips out when a USB webcam i

Re: [PATCH 1/2] dt-bindings: usb-ehci: Add an optional property "needs-reset-on-resume"

2014-12-22 Thread Doug Anderson
but I'll give it anyway: Reviewed-by: Doug Anderson -Doug -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 2/2] USB: ehci-platform: Support ehci reset after resume quirk

2014-12-22 Thread Doug Anderson
Hi, On Mon, Dec 22, 2014 at 1:04 PM, Alan Stern wrote: > On Mon, 22 Dec 2014, Doug Anderson wrote: > >> Alan, >> >> On Mon, Dec 22, 2014 at 8:06 AM, Alan Stern >> wrote: >> > On Mon, 22 Dec 2014, Wu Liang feng wrote: >> > >> >&g

Re: [PATCH v2] usb: dwc2: reset dwc2 core before dwc2_get_hwparams()

2015-08-18 Thread Doug Anderson
lyz, On Tue, Aug 18, 2015 at 2:40 AM, Yunzhi Li wrote: > We initiate dwc2 usb controller in BIOS, dwc2_core_reset() should > be called before dwc2_get_hwparams() to reset core registers to > default value. Without this the FIFO setting might be incorrect > because calculating FIFO size need power

Re: [PATCH v1 02/32] usb: dwc2: host: create a function to handle port_resume

2015-09-17 Thread Doug Anderson
Hi, On Wed, Sep 9, 2015 at 3:20 AM, Mian Yousaf Kaukab wrote: > From: Gregory Herrero > > port resume sequence may be used in different places. Create a > function to handle it. Moreover, make hprt0 read-modify-write atomic. > > Signed-off-by: Gregory Herrero > Signed-off-by: Mian Yousaf Kaukab

Re: [PATCH v1 02/32] usb: dwc2: host: create a function to handle port_resume

2015-09-17 Thread Doug Anderson
Hi, On Thu, Sep 17, 2015 at 12:41 PM, Doug Anderson wrote: >> + spin_unlock_irqrestore(&hsotg->lock, flags); >> + >> + msleep(USB_RESUME_TIMEOUT); >> + >> + spin_lock_irqsave(&hsotg->lock, flags); >> + hprt0 &= ~H

Re: [PATCH v1 03/32] usb: dwc2: host: add flag to reflect bus state

2015-09-17 Thread Doug Anderson
Hi, On Wed, Sep 9, 2015 at 3:20 AM, Mian Yousaf Kaukab wrote: > /* Update lx_state */ > - hsotg->lx_state = DWC2_L2; > + hsotg->bus_suspended = 1; /* Update comment */ -Doug -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to m

Re: [PATCH] usb: dwc2: Read GNPTXFSIZ when in forced HOST mode.

2014-09-08 Thread Doug Anderson
Greg, On Thu, Aug 7, 2014 at 1:18 PM, Paul Zimmerman wrote: >> From: Doug Anderson [mailto:diand...@chromium.org] >> Sent: Thursday, August 07, 2014 12:48 PM >> >> The documentation for GNPTXFSIZ says that "For host mode, this field >> is always valid."

  1   2   3   >