Commit beb7e592bc "staging: dwc2: add check on dwc2_core_reset
return" broke the B -> A role switching on OTG-enabled platforms.
This commit fixes it.
Reported-by: Dinh Nguyen
Tested-by: Dinh Nguyen
Signed-off-by: Paul Zimmerman
---
drivers/usb/dwc2/core.c | 2 +-
1 file changed
Warren
Signed-off-by: Paul Zimmerman
---
drivers/usb/dwc2/hcd.c | 11 ---
1 file changed, 11 deletions(-)
diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
index f59484d..4d918ed 100644
--- a/drivers/usb/dwc2/hcd.c
+++ b/drivers/usb/dwc2/hcd.c
@@ -2565,25 +2565,14 @@ stati
> From: Paul Zimmerman
> Sent: Monday, February 03, 2014 9:36 AM
>
>> From: Stephen Warren [mailto:swar...@wwwdotorg.org]
>> Sent: Saturday, February 01, 2014 7:44 PM
>>
>> On 02/01/2014 03:00 AM, Andre Heider wrote:
>>> On Fri, Jan 31, 2014 at 11:48:37
>>> On Mon, Jan 13, 2014 at 01:50:09PM -0800, Paul Zimmerman wrote:
> >>>> The DWC2 driver should now be in good enough shape to move out of
> >>>> staging. I have stress tested it overnight on RPI running mass
> >>>> storage and Ethernet tran
;
> > > On Mon, Jan 13, 2014 at 01:50:09PM -0800, Paul Zimmerman wrote:
> > > > The DWC2 driver should now be in good enough shape to move out of
> > > > staging. I have stress tested it overnight on RPI running mass
> > > > storage and Ether
Now that the DWC2 driver has been moved to drivers/usb, move its
bindings doc to the correct place
Cc: Rob Herring
Signed-off-by: Paul Zimmerman
---
Greg,
I missed this file when moving the rest of the dwc2 files.
Documentation/devicetree/bindings/{staging => usb}/dwc2.txt | 0
1 file chan
> From: Greg KH [mailto:gre...@linuxfoundation.org]
> Sent: Monday, January 13, 2014 2:04 PM
>
> On Mon, Jan 13, 2014 at 01:50:09PM -0800, Paul Zimmerman wrote:
>> The DWC2 driver should now be in good enough shape to move out of
>> staging. I have stress tested it overn
The DWC2 driver should now be in good enough shape to move out of
staging. I have stress tested it overnight on RPI running mass
storage and Ethernet transfers in parallel, and for several days
on our proprietary PCI-based platform.
Signed-off-by: Paul Zimmerman
---
v4: Also change directory
The DWC2 driver should now be in good enough shape to move out of
staging. I have stress tested it overnight on RPI running mass
storage and Ethernet transfers in parallel, and for several days
on our proprietary PCI-based platform.
Signed-off-by: Paul Zimmerman
---
Greg,
I believe I have
th my dwc2 testing in NetBSD, so I adapted the change to dwc2.
Signed-off-by: Nick Hudson
[paulz: fixed up the patch to compile under Linux, and tested it]
Signed-off-by: Paul Zimmerman
---
drivers/staging/dwc2/hcd.c | 14 ++
1 file changed, 14 insertions(+)
diff --git a/drivers/st
= 0,
> .ahbcfg = 0x10,
> - .uframe_sched = 1,
> + .uframe_sched = 0,
> };
>
> /**
> --
> 1.7.10.4
Acked-by: Paul Zimmerman
___
devel mailing list
de...@linux
> From: gordon.hollingwo...@gmail.com [mailto:gordon.hollingwo...@gmail.com] On
> Behalf Of Gordon Hollingworth
> Sent: Tuesday, November 26, 2013 10:48 PM
> To: Stephen Warren
> Cc: Paul Zimmerman; Greg Kroah-Hartman; de...@driverdev.osuosl.org; linux-rpi-
> ker...@lists.infra
Adding Jonathan.
> From: Paul Zimmerman
> Sent: Wednesday, November 27, 2013 11:34 AM
>
> > From: gordon.hollingwo...@gmail.com [mailto:gordon.hollingwo...@gmail.com]
> > On Behalf Of Gordon
> Hollingworth
> > Sent: Tuesday, November 26, 2013 10:48 PM
>
> From: Stephen Warren [mailto:swar...@wwwdotorg.org]
> Sent: Tuesday, November 26, 2013 11:43 AM
>
> On 11/26/2013 12:27 PM, Paul Zimmerman wrote:
> >> From: Stephen Warren [mailto:swar...@wwwdotorg.org]
> >> Sent: Monday, November 25, 2013 9:03 PM
> >&
> From: Stephen Warren [mailto:swar...@wwwdotorg.org]
> Sent: Monday, November 25, 2013 9:03 PM
>
> The DWC2 USB controller in the BCM2835 (Raspberry Pi) needs some non-
> default parameters. Select these based on the compatible value from the
> DT node. For all other HW, fall back to the default
The check against MAX_DMA_DESC_SIZE didn't make sense, fix it
Reported-by: Dan Carpenter
Signed-off-by: Paul Zimmerman
---
drivers/staging/dwc2/hcd_ddma.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/dwc2/hcd_ddma.c b/drivers/staging/dwc2/hcd_d
In dwc2_xfercomp_isoc_split_in(), the function has already exited
if len == 0, so no need to test it again
Reported-by: Dan Carpenter
Signed-off-by: Paul Zimmerman
---
drivers/staging/dwc2/hcd_intr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/dwc2
The function dwc2_get_hwparams() was in an awkward place, mixed
in with the dwc2_set_param* functions. Move it down after those
functions.
Signed-off-by: Paul Zimmerman
---
drivers/staging/dwc2/core.c | 124 ++--
1 file changed, 62 insertions(+), 62
Fix screwup in checking return value from dwc2_is_controller_alive()
Signed-off-by: Paul Zimmerman
---
drivers/staging/dwc2/hcd_intr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/dwc2/hcd_intr.c b/drivers/staging/dwc2/hcd_intr.c
index e672e6d..50e6de5
My previous patch series "staging: dwc2: cleanups for DWC2 driver" had
a couple of minor problems. This series fixes them up, and also adds a
couple more fixes/cleanups suggested by Dan Carpenter.
Paul Zimmerman (5):
staging: dwc2: remove stale comment after changing function to void
Remove stale comment after changing dwc2_set_parameters() to void
function
Signed-off-by: Paul Zimmerman
---
drivers/staging/dwc2/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/dwc2/core.c b/drivers/staging/dwc2/core.c
index c0b122a..f2708f9 100644
>
> write it like:
>
> if (dwc2_qh_is_non_per(qh)) {
> ...
> return;
> }
> ...
>
> Signed-off-by: Dan Carpenter
Acked-by: Paul Zimmerman
___
devel mailing list
de...@linuxdr
> From: Dan Carpenter [mailto:dan.carpen...@oracle.com]
> Sent: Monday, November 25, 2013 6:14 AM
>
> Combine two conditions and make the success path explicit.
>
> Signed-off-by: Dan Carpenter
> ---
> The code is more complicated than it needs to be because of the debug
> code. If we just test
writel(intr_mask, hsotg->regs + GINTMSK);
> }
> + hsotg->periodic_qh_count++;
> }
>
> - return status;
> + return 0;
> }
>
> /**
Acked-by: Paul Zimmerman
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
> From: Dan Carpenter [mailto:dan.carpen...@oracle.com]
> Sent: Monday, November 25, 2013 6:18 AM
>
> I have reviewed the second half of the driver now.
>
> drivers/staging/dwc2/hcd_ddma.c
>616 static void dwc2_fill_host_dma_desc(struct dwc2_hsotg *hsotg,
>617
NO_FS_PHY_HW_CHECKS is never defined, so remove the conditional
code that checks for it being set
Signed-off-by: Paul Zimmerman
---
drivers/staging/dwc2/core.c | 18 --
1 file changed, 18 deletions(-)
diff --git a/drivers/staging/dwc2/core.c b/drivers/staging/dwc2/core.c
index
Fix some functions called by dwc2_hcd_qtd_add() to return either
a proper error code or 0, instead of somewhat random values.
Then change the caller of dwc2_hcd_qtd_add() to just check the
return value for 0.
Signed-off-by: Paul Zimmerman
---
drivers/staging/dwc2/hcd.c | 6 +++---
drivers
Rename dwc2_check_core_status() to dwc2_is_controller_alive(), and
make it a boolean function. Also change the message when the
controller is dead to say "dead" instead of "disconnected".
Signed-off-by: Paul Zimmerman
---
drivers/staging/dwc2/core.c | 6 +++---
drivers
Remove useless cast in dwc2_get_otg_version()
Signed-off-by: Paul Zimmerman
---
drivers/staging/dwc2/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/dwc2/core.c b/drivers/staging/dwc2/core.c
index 6149fbc..5b490a4 100644
--- a/drivers/staging/dwc2
Remove #ifdef DEBUG from a couple of places where it is not needed
Signed-off-by: Paul Zimmerman
---
drivers/staging/dwc2/core_intr.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/drivers/staging/dwc2/core_intr.c b/drivers/staging/dwc2/core_intr.c
index c78bb5d..8205799 100644
--- a
We were not checking the return value from any of these functions,
so make them void functions
Signed-off-by: Paul Zimmerman
---
drivers/staging/dwc2/core.c | 193
drivers/staging/dwc2/core.h | 60 +++---
drivers/staging/dwc2/hcd.h | 4
DWC2_PARAM_TEST is not a very good name for this macro, so rename
it to DWC2_OUT_OF_BOUNDS
Signed-off-by: Paul Zimmerman
---
drivers/staging/dwc2/core.c | 32
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/drivers/staging/dwc2/core.c b/drivers
dwc2_process_non_isoc_desc() can potentially free the qtd, so null
out the qtd pointer if the call fails so we don't try to access it
later
Signed-off-by: Paul Zimmerman
---
drivers/staging/dwc2/hcd_ddma.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/st
ault value for each of the parameters, so the
checks cannot simply be removed.
Paul Zimmerman (8):
staging: dwc2: fix some functions to return a proper error code
staging: dwc2: fix potential use after free
staging: dwc2: rename DWC2_PARAM_TEST to DWC2_OUT_OF_BOUNDS
staging: dwc2: ma
nitialization in such case.
>
> Signed-off-by: Julien Delacou
> ---
> drivers/staging/dwc2/core.c | 58
> +--
> 1 file changed, 45 insertions(+), 13 deletions(-)
Acked-by: Paul Zimmerman
_
t_interrupts(struct dwc2_hsotg *hsotg)
> writel(0, hsotg->regs + GINTMSK);
> writel(0, hsotg->regs + HAINTMSK);
>
> - /* Clear any pending interrupts */
> - writel(0x, hsotg->regs + GINTSTS);
> -
> /* Enable the common interrupts
> From: Matthijs Kooijman [mailto:matth...@stdin.nl]
> Sent: Thursday, October 03, 2013 12:35 AM
>
> > By the way, it looks like 'num_dev_ep' would have the same problem,
>
> I don't think so, since the hardware doesn't do the off-by-one trick
> there (presumably because having 0 endpoints make s
sfer_size:26;
> unsigned max_packet_count:11;
> - unsigned host_channels:4;
> + unsigned host_channels:5;
> unsigned hs_phy_type:2;
> unsigned fs_phy_type:2;
> unsigned i2c_enable:1;
> --
Acked-by: Paul Zimmerman
By the way, it looks like 'num_dev
> From: Dan Carpenter [mailto:dan.carpen...@oracle.com]
> Sent: Monday, September 30, 2013 6:09 PM
>
> Yeah. I guess it's fine... I was going to suggest adding the + 1 in a
> different place but actually it doesn't matter.
>
> The key to understanding dwc2_set_param_host_channels() is that the
> From: Aaro Koskinen [mailto:aaro.koski...@iki.fi]
> Sent: Sunday, August 18, 2013 4:41 AM
>
> On Sat, Aug 17, 2013 at 08:44:18PM +, Paul Zimmerman wrote:
> > > It doesn't get very far:
> > >
> > > External DMA Mode not supported
> > &g
> From: Aaro Koskinen [mailto:aaro.koski...@iki.fi]
> Sent: Saturday, August 17, 2013 8:39 AM
>
> On Fri, Aug 16, 2013 at 08:02:27PM -0700, Greg KH wrote:
> > dcw2 already supports different boards/systems, so perhaps there's a way
> > to tie your board into that?
>
> It doesn't get very far:
>
> From: Aaro Koskinen [mailto:aaro.koski...@iki.fi]
> Sent: Friday, August 16, 2013 1:45 PM
>
> On Fri, Aug 16, 2013 at 06:35:10PM +, Paul Zimmerman wrote:
> > Aaro, I would ask you the same question. Is the Octeon driver fully
> > functional? Are there any shortcomin
> From: Aaro Koskinen [mailto:aaro.koski...@iki.fi]
> Sent: Friday, August 16, 2013 10:33 AM
>
> On Fri, Aug 16, 2013 at 06:01:50AM -0700, Greg KH wrote:
> > It was just pointed out to me by Sebastian that it looks like both the
> > octeon-usb and dwc2 drivers in drivers/staging/ are for the same
> From: Matthijs Kooijman [mailto:matth...@stdin.nl]
> Sent: Monday, August 12, 2013 12:36 AM
> To: Paul Zimmerman
> Cc: gre...@linuxfoundation.org; linux-...@vger.kernel.org;
> de...@linuxdriverproject.org;
> swar...@wwwdotorg.org; gordon.hollingwo...@gmail.com; sk...@netbsd.
> From: popcornmix [mailto:popcorn...@gmail.com]
> Sent: Monday, August 12, 2013 6:39 AM
>
> On Mon, Aug 12, 2013 at 8:40 AM, Matthijs Kooijman wrote:
>
> > Paul, did you try the patch without this hunk?
> > Dom, can you tell use why this hunk is needed?
>
> The microframe patch originally came
From: Dom Cobley
Add the NAK holdoff patch from the downstream Raspberry Pi kernel.
This allows the transfer scheduler to better handle "cheeky devices
that just hold off using NAKs".
[original patch from Dom Cobley]
Signed-off-by: Dom Cobley
[adapted to dwc2 driver by Paul Zimmerm
adapted to dwc2 driver by Paul Zimmerman]
Signed-off-by: Paul Zimmerman
---
drivers/staging/dwc2/core.c | 21 +
drivers/staging/dwc2/core.h | 7 ++
drivers/staging/dwc2/hcd.c | 53 ---
drivers/staging/dwc2/hcd.h | 3 +
drivers/staging/dwc2/hcd_ddma.c |
Reorder the kernel doc comments for 'struct dwc2_core_params' to
match the ordering in the struct itself. Reorder the members of
'struct dwc2_qh' (and its kerneldoc comments) to minimize the
amount of structure padding.
Signed-off-by: Paul Zimmerman
---
drivers/stag
m Matthijs' review that
are not addressed yet, but I would like to get this code into the
staging tree first, so that the raspberrypi.org guys can help work
on it and respond to any questions/concerns.
Paul Zimmerman (3):
staging: dwc2: reorder some kernel doc comments and struct members
sta
> From: Greg KH [mailto:gre...@linuxfoundation.org]
> Sent: Tuesday, July 23, 2013 2:59 PM
>
> On Wed, Jul 17, 2013 at 12:35:46PM -0700, Paul Zimmerman wrote:
> > The transfer scheduler in the dwc2 driver is pretty basic, not to
> > mention buggy. It works fairly we
> From: Matthijs Kooijman [mailto:matth...@stdin.nl]
> Sent: Thursday, July 18, 2013 10:19 AM
>
> This seems related to a patch I made last year for the dwc_otg driver.
> On RT3052, we only have 4 host channels, so it was easy to run out of
> them using a 3G stick and a hub. The 3G sticks hog up 2
> From: linux-usb-ow...@vger.kernel.org
> [mailto:linux-usb-ow...@vger.kernel.org] On Behalf Of Gordon Hollingworth
> Sent: Wednesday, July 17, 2013 11:00 PM
>
> I'd suggest just adding a Raspberry Pi Foundation copyright.
>
> Is that OK or do you need names for SOB?
Ah yes, thanks for remindin
eter for this, enabled by default, in
case anyone has problems with it and needs to disable it. I don't
think we should add a DT binding for that, though, since I plan to
remove the option once any bugs are fixed.
Signed-off-by: Paul Zimmerman
---
Gordon, I would like to add a copyright notic
> From: Matthijs Kooijman [mailto:matth...@stdin.nl]
> Sent: Wednesday, July 17, 2013 4:15 AM
>
> On Tue, Jul 16, 2013 at 12:22:12PM -0700, Paul Zimmerman wrote:
> > The dwc2 driver sets the value of the DWC2 GAHBCFG register to 0x6,
> > which is GAHBCFG_HBSTLEN_INCR4. But
be set using 'ahbcfg'.
This patch does not add DT support to platform.c, I will leave that
to whoever owns the first platform that needs a non-default value.
(Stephen?)
Signed-off-by: Paul Zimmerman
---
drivers/staging/dwc2/core.c | 51 -
dr
Remove the use of bus_to_virt() and just fail the transfer if an
unaligned buffer with no virtual address is found. AFAIK that
can't happen anyway.
Also change setting of coherent DMA mask to the normal 32 bits.
31 bits was only needed when calling bus_to_virt() AFAICR.
Signed-off-by:
Make dwc2_hc_handle_tt_clear() return early if the device is
hi-speed.
Signed-off-by: Paul Zimmerman
---
drivers/staging/dwc2/hcd_intr.c | 13 +
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/dwc2/hcd_intr.c b/drivers/staging/dwc2/hcd_intr.c
index
Change the non-aligned buffer debug messages to dev_vdbg(). Also
remove some duplicated debug output when the driver is loaded.
Signed-off-by: Paul Zimmerman
---
drivers/staging/dwc2/hcd.c | 2 --
drivers/staging/dwc2/hcd_intr.c | 14 +++---
2 files changed, 7 insertions(+), 9
The logic in dwc2_hcd_qtd_add() was a bit messy, and one of the
error exit paths was broken. Fix it up.
Signed-off-by: Paul Zimmerman
---
drivers/staging/dwc2/hcd_queue.c | 20
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/dwc2/hcd_queue.c b
The driver was lacking calls to usb_hcd_link_urb_to_ep(),
usb_hcd_unlink_urb_from_ep(), and usb_hcd_check_unlink_urb(). Add
those now.
Signed-off-by: Paul Zimmerman
---
drivers/staging/dwc2/hcd.c | 52 +-
1 file changed, 37 insertions(+), 15 deletions
otherwise that
routine would do nothing because dwc2_qtd->urb has already been
freed.
Signed-off-by: Paul Zimmerman
---
drivers/staging/dwc2/hcd.c | 42 -
drivers/staging/dwc2/hcd.h | 4 +--
drivers/staging/dwc2/hcd_ddma.c | 23 +++-
dr
close to mainlineable
too.
Paul Zimmerman (6):
staging: dwc2: refactor dwc2_host_complete()
staging: dwc2: add calls to usb_hcd_link_urb_to_ep() and friends
staging: dwc2: optimize dwc2_hc_handle_tt_clear() a bit
staging: dwc2: fix dwc2_hcd_qtd_add()
staging: dwc2: reduce noisy debug messages
62 matches
Mail list logo