* [PATCH] usb: dwc3: core: move dwc3_cache_hwparams before dwc3_alloc_event_buffers
@ 2012-11-16 6:37 Kishon Vijay Abraham I
2012-11-16 8:17 ` Felipe Balbi
2012-11-16 12:08 ` Sergei Shtylyov
0 siblings, 2 replies; 5+ messages in thread
From: Kishon Vijay Abraham I @ 2012-11-16 6:37 UTC (permalink / raw)
To: kishon, balbi, gregkh, linux-usb, linux-omap, linux-kernel
commit 392142 moved event buffer allocation out of dwc3_core_init() but
event buffer allocation uses the cached copy of hwparams to determine
the number of event buffers and the caching is done in dwc3_core_init.
So moved dwc3_cache_hwparams function before dwc3_alloc_event_buffers so
that dwc3_alloc_event_buffers sees the correct number of event buffers.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
drivers/usb/dwc3/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index b923183..88e8d31 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -356,8 +356,6 @@ static int __devinit dwc3_core_init(struct dwc3 *dwc)
dwc3_core_soft_reset(dwc);
- dwc3_cache_hwparams(dwc);
-
reg = dwc3_readl(dwc->regs, DWC3_GCTL);
reg &= ~DWC3_GCTL_SCALEDOWN_MASK;
reg &= ~DWC3_GCTL_DISSCRAMBLE;
@@ -498,6 +496,8 @@ static int __devinit dwc3_probe(struct platform_device *pdev)
pm_runtime_get_sync(dev);
pm_runtime_forbid(dev);
+ dwc3_cache_hwparams(dwc);
+
ret = dwc3_alloc_event_buffers(dwc, DWC3_EVENT_BUFFERS_SIZE);
if (ret) {
dev_err(dwc->dev, "failed to allocate event buffers\n");
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] usb: dwc3: core: move dwc3_cache_hwparams before dwc3_alloc_event_buffers
2012-11-16 6:37 [PATCH] usb: dwc3: core: move dwc3_cache_hwparams before dwc3_alloc_event_buffers Kishon Vijay Abraham I
@ 2012-11-16 8:17 ` Felipe Balbi
[not found] ` <20121116081719.GA16568-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2012-11-16 12:08 ` Sergei Shtylyov
1 sibling, 1 reply; 5+ messages in thread
From: Felipe Balbi @ 2012-11-16 8:17 UTC (permalink / raw)
To: Kishon Vijay Abraham I; +Cc: balbi, gregkh, linux-usb, linux-omap, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1548 bytes --]
Hi,
On Fri, Nov 16, 2012 at 12:07:54PM +0530, Kishon Vijay Abraham I wrote:
> commit 392142 moved event buffer allocation out of dwc3_core_init() but
> event buffer allocation uses the cached copy of hwparams to determine
> the number of event buffers and the caching is done in dwc3_core_init.
> So moved dwc3_cache_hwparams function before dwc3_alloc_event_buffers so
> that dwc3_alloc_event_buffers sees the correct number of event buffers.
>
> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
My bad, what a regression I caused :-)
Greg, can you take this one ?
Signed-off-by: Felipe Balbi <balbi@ti.com>
> ---
> drivers/usb/dwc3/core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index b923183..88e8d31 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
> @@ -356,8 +356,6 @@ static int __devinit dwc3_core_init(struct dwc3 *dwc)
>
> dwc3_core_soft_reset(dwc);
>
> - dwc3_cache_hwparams(dwc);
> -
> reg = dwc3_readl(dwc->regs, DWC3_GCTL);
> reg &= ~DWC3_GCTL_SCALEDOWN_MASK;
> reg &= ~DWC3_GCTL_DISSCRAMBLE;
> @@ -498,6 +496,8 @@ static int __devinit dwc3_probe(struct platform_device *pdev)
> pm_runtime_get_sync(dev);
> pm_runtime_forbid(dev);
>
> + dwc3_cache_hwparams(dwc);
> +
> ret = dwc3_alloc_event_buffers(dwc, DWC3_EVENT_BUFFERS_SIZE);
> if (ret) {
> dev_err(dwc->dev, "failed to allocate event buffers\n");
> --
> 1.7.9.5
>
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] usb: dwc3: core: move dwc3_cache_hwparams before dwc3_alloc_event_buffers
2012-11-16 6:37 [PATCH] usb: dwc3: core: move dwc3_cache_hwparams before dwc3_alloc_event_buffers Kishon Vijay Abraham I
2012-11-16 8:17 ` Felipe Balbi
@ 2012-11-16 12:08 ` Sergei Shtylyov
1 sibling, 0 replies; 5+ messages in thread
From: Sergei Shtylyov @ 2012-11-16 12:08 UTC (permalink / raw)
To: Kishon Vijay Abraham I; +Cc: balbi, gregkh, linux-usb, linux-omap, linux-kernel
Hello.
On 16-11-2012 10:37, Kishon Vijay Abraham I wrote:
> commit 392142
Please specify thta commit summary in parens.
> moved event buffer allocation out of dwc3_core_init() but
> event buffer allocation uses the cached copy of hwparams to determine
> the number of event buffers and the caching is done in dwc3_core_init.
> So moved dwc3_cache_hwparams function before dwc3_alloc_event_buffers so
> that dwc3_alloc_event_buffers sees the correct number of event buffers.
> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
WBR, Sergei
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] usb: dwc3: core: move dwc3_cache_hwparams before dwc3_alloc_event_buffers
[not found] ` <20121116081719.GA16568-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
@ 2012-11-16 12:47 ` Greg KH
2012-11-16 13:42 ` Felipe Balbi
0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2012-11-16 12:47 UTC (permalink / raw)
To: Felipe Balbi
Cc: Kishon Vijay Abraham I, linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-omap-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
On Fri, Nov 16, 2012 at 10:17:19AM +0200, Felipe Balbi wrote:
> Hi,
>
> On Fri, Nov 16, 2012 at 12:07:54PM +0530, Kishon Vijay Abraham I wrote:
> > commit 392142 moved event buffer allocation out of dwc3_core_init() but
> > event buffer allocation uses the cached copy of hwparams to determine
> > the number of event buffers and the caching is done in dwc3_core_init.
> > So moved dwc3_cache_hwparams function before dwc3_alloc_event_buffers so
> > that dwc3_alloc_event_buffers sees the correct number of event buffers.
> >
> > Signed-off-by: Kishon Vijay Abraham I <kishon-l0cyMroinI0@public.gmane.org>
>
> My bad, what a regression I caused :-)
>
> Greg, can you take this one ?
Yes, will do.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] usb: dwc3: core: move dwc3_cache_hwparams before dwc3_alloc_event_buffers
2012-11-16 12:47 ` Greg KH
@ 2012-11-16 13:42 ` Felipe Balbi
0 siblings, 0 replies; 5+ messages in thread
From: Felipe Balbi @ 2012-11-16 13:42 UTC (permalink / raw)
To: Greg KH
Cc: Felipe Balbi, Kishon Vijay Abraham I, linux-usb, linux-omap,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 823 bytes --]
On Fri, Nov 16, 2012 at 04:47:11AM -0800, Greg KH wrote:
> On Fri, Nov 16, 2012 at 10:17:19AM +0200, Felipe Balbi wrote:
> > Hi,
> >
> > On Fri, Nov 16, 2012 at 12:07:54PM +0530, Kishon Vijay Abraham I wrote:
> > > commit 392142 moved event buffer allocation out of dwc3_core_init() but
> > > event buffer allocation uses the cached copy of hwparams to determine
> > > the number of event buffers and the caching is done in dwc3_core_init.
> > > So moved dwc3_cache_hwparams function before dwc3_alloc_event_buffers so
> > > that dwc3_alloc_event_buffers sees the correct number of event buffers.
> > >
> > > Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> >
> > My bad, what a regression I caused :-)
> >
> > Greg, can you take this one ?
>
> Yes, will do.
thanks a lot ;-)
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-11-16 13:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-16 6:37 [PATCH] usb: dwc3: core: move dwc3_cache_hwparams before dwc3_alloc_event_buffers Kishon Vijay Abraham I
2012-11-16 8:17 ` Felipe Balbi
[not found] ` <20121116081719.GA16568-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2012-11-16 12:47 ` Greg KH
2012-11-16 13:42 ` Felipe Balbi
2012-11-16 12:08 ` Sergei Shtylyov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).