usb: dwc3: core: move dwc3_cache_hwparams before dwc3_alloc_event_buffers
Subsystems (2)
PATCH 1/1 usb: dwc3: core: move dwc3_cache_hwparams before dwc3_alloc_event_buffers
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.
--- drivers/usb/dwc3/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/dwc3/core.c +2 -2
@@ -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" );
Signature · 1 line
1.7.9.5
Hi,
Quoted 7 lines · Kishon Vijay Abraham I
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 indwc3_core_init. So moveddwc3_cache_hwparamsfunction beforedwc3_alloc_event_buffersso thatdwc3_alloc_event_bufferssees the correct number of event buffers.Signed-off-by Kishon Vijay Abraham I <[email protected]>
My bad, what a regression I caused :-)
Greg, can you take this one ?
Quoted 29 lines
--- drivers/usb/dwc3/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/usb/dwc3/core.c +2
-2@@ -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" );Signature · 1 line
1.7.9.5
Signature · 1 line
balbi
Greg KH
maintainerQuoted 9 lines · Felipe Balbi
Hi,
Quoted 6 lines · Kishon Vijay Abraham I
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 indwc3_core_init. So moveddwc3_cache_hwparamsfunction beforedwc3_alloc_event_buffersso thatdwc3_alloc_event_bufferssees the correct number of event buffers.
Quoted 5 lines
Quoted 1 line
Signed-off-by Kishon Vijay Abraham I <[email protected]>My bad, what a regression I caused :-)
Greg, can you take this one ?
Yes, will do.
Quoted 10 lines · Greg KH
Quoted 9 lines · Felipe Balbi
Hi,
Quoted 6 lines · Kishon Vijay Abraham I
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 indwc3_core_init. So moveddwc3_cache_hwparamsfunction beforedwc3_alloc_event_buffersso thatdwc3_alloc_event_bufferssees the correct number of event buffers.
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Kishon Vijay Abraham I <[email protected]>My bad, what a regression I caused :-)
Greg, can you take this one ?
Yes, will do.
thanks a lot ;-)
Signature · 1 line
balbi
Hello.
Quoted 1 line · Kishon Vijay Abraham I
commit 392142
Please specify thta commit summary in parens.
Quoted 7 lines
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 indwc3_core_init. So moveddwc3_cache_hwparamsfunction beforedwc3_alloc_event_buffersso thatdwc3_alloc_event_bufferssees the correct number of event buffers.Signed-off-by Kishon Vijay Abraham I <[email protected]>
WBR, Sergei