mbox series

[0/7] usb: bdc: Updates and fixes to the USB BDC driver

Message ID 20200717152307.36705-1-alcooperx@gmail.com
Headers show
Series usb: bdc: Updates and fixes to the USB BDC driver | expand

Message

Alan Cooper July 17, 2020, 3:23 p.m. UTC
Updates and fixes to the Broadcom USB BDC driver.

Al Cooper (4):
  dt-bindings: usb: bdc: Update compatible strings
  usb: bdc: Add compatible string for new style USB DT nodes
  usb: bdc: Adb shows offline after resuming from S2
  usb: bdc: driver runs out of buffer descriptors on large ADB transfers

Danesh Petigara (1):
  usb: bdc: Halt controller on suspend

Florian Fainelli (1):
  usb: bdc: Use devm_clk_get_optional()

Sasi Kumar (1):
  bdc: Fix bug causing crash after multiple disconnects

 .../devicetree/bindings/usb/brcm,bdc.txt      |  4 +--
 drivers/usb/gadget/udc/bdc/bdc.h              |  2 +-
 drivers/usb/gadget/udc/bdc/bdc_core.c         | 26 ++++++++++++++-----
 drivers/usb/gadget/udc/bdc/bdc_ep.c           | 16 +++++++-----
 4 files changed, 32 insertions(+), 16 deletions(-)

Comments

Florian Fainelli July 17, 2020, 4:55 p.m. UTC | #1
On 7/17/2020 8:23 AM, Al Cooper wrote:
> Add compatible string for some newer boards that only have this
> as there match sting.
> 
> Signed-off-by: Al Cooper <alcooperx@gmail.com>

This looks good to me, however you should also include it in the binding
document.
Florian Fainelli July 17, 2020, 4:56 p.m. UTC | #2
On 7/17/2020 8:23 AM, Al Cooper wrote:
> From: Sasi Kumar <sasi.kumar@broadcom.com>
> 
> Multiple connects/disconnects can cause a crash on the second
> disconnect. The driver had a problem where it would try to send
> endpoint commands after it was disconnected which is not allowed
> by the hardware. The fix is to only allow the endpoint commands
> when the endpoint is connected. This will also fix issues that
> showed up when using configfs to create gadgets.
> 
> refs #SWLINUX-5477

This internal reference should be removed and maybe we should be
providing a Fixes tag as well since this is a bug fix?
Florian Fainelli July 17, 2020, 4:57 p.m. UTC | #3
On 7/17/2020 8:23 AM, Al Cooper wrote:
> From: Florian Fainelli <florian.fainelli@broadcom.com>
> 
> The BDC clock is optional and we may get an -EPROBE_DEFER error code
> which would not be propagated correctly, fix this by using
> devm_clk_get_optional().
> 
> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>

Since you are carrying this patch on my behalf your Signed-off-by should
also be present, if you don't mind, I would like my gmail.com address to
be used here for consistency with all submissions done throughout my
tenure at broadcom, thanks!
Florian Fainelli July 17, 2020, 4:58 p.m. UTC | #4
On 7/17/2020 8:23 AM, Al Cooper wrote:
> Version v1.0.40 of the Android host ADB software increased maximum
> transfer sizes from 256K to 1M. Since the STB ADB gadget driver
> requests only 16K at a time, the BDC driver ran out of buffer
> descriptors (BDs) if the queuing happens faster than the incoming
> 16K transfers. This issue is fixed by doubling the number of BDs
> that can be queued so that the entire 1M request can be queued
> without running out of buffers.
> 
> Signed-off-by: Al Cooper <alcooperx@gmail.com>
> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>

You can certainly remove my SoB here, since you are carrying your own
patch, thanks!
Felipe Balbi July 21, 2020, 9:33 a.m. UTC | #5
Hi,

Al Cooper <alcooperx@gmail.com> writes:
> Updates and fixes to the Broadcom USB BDC driver.
>
> Al Cooper (4):
>   dt-bindings: usb: bdc: Update compatible strings
>   usb: bdc: Add compatible string for new style USB DT nodes
>   usb: bdc: Adb shows offline after resuming from S2
>   usb: bdc: driver runs out of buffer descriptors on large ADB transfers
>
> Danesh Petigara (1):
>   usb: bdc: Halt controller on suspend
>
> Florian Fainelli (1):
>   usb: bdc: Use devm_clk_get_optional()
>
> Sasi Kumar (1):
>   bdc: Fix bug causing crash after multiple disconnects

What should we do here? There are few comments which seem
unresolved. Are we getting a new version?
Alan Cooper July 21, 2020, 1:45 p.m. UTC | #6
On Tue, Jul 21, 2020 at 5:33 AM Felipe Balbi <balbi@kernel.org> wrote:
>
>
> Hi,
>
> Al Cooper <alcooperx@gmail.com> writes:
> > Updates and fixes to the Broadcom USB BDC driver.
> >
> > Al Cooper (4):
> >   dt-bindings: usb: bdc: Update compatible strings
> >   usb: bdc: Add compatible string for new style USB DT nodes
> >   usb: bdc: Adb shows offline after resuming from S2
> >   usb: bdc: driver runs out of buffer descriptors on large ADB transfers
> >
> > Danesh Petigara (1):
> >   usb: bdc: Halt controller on suspend
> >
> > Florian Fainelli (1):
> >   usb: bdc: Use devm_clk_get_optional()
> >
> > Sasi Kumar (1):
> >   bdc: Fix bug causing crash after multiple disconnects
>
> What should we do here? There are few comments which seem
> unresolved. Are we getting a new version?

I'm resolving the comments and submitting v2 today.

Thanks
Al

>
> --
> balbi