lkml.org 
[lkml]   [2023]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: dwc3: unusual handling of setup requests with wLength == 0
    Date
    On Fri, Aug 18, 2023, Thinh Nguyen wrote:
    > >
    > > Right. The difficulty doesn't involve the communication between the HCD
    > > and the UDC hardware; it involves the communication between the UDC
    > > driver and the gadget driver. Somehow they need to synchronize so that
    > > when the gadget driver queues a usb_request, the UDC driver can tell
    > > whether the request was meant for the earlier aborted control transfer
    > > or the new active one. This can matter if the gadget driver has a
    > > separate control thread (a work routine or a kthread, for example) that
    > > could be queuing requests while the ->setup() callback is running.
    > >
    >
    > Perhaps this can be improved and enforced from the core. At the moment,
    > it should not be a problem for gadget driver with dwc3 driver (with a
    > minor fix due to missing check).
    >

    Perhaps I'm too quick to respond to overlook what you've said. I've only
    thinking about the UDC driver sequence and not the gadget driver
    handling the givebacks. Yes if the gadget driver has a separate control
    thread, that may be problematic.

    BR,
    Thinh
    \
     
     \ /
      Last update: 2023-08-18 22:48    [W:3.941 / U:0.092 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site