lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 08 Jan 2018 13:50:26 +0200
From:   Felipe Balbi <balbi@...nel.org>
To:     Lipengcheng <lpc.li@...ilicon.com>
Cc:     "linux-usb\@vger.kernel.org" <linux-usb@...r.kernel.org>,
        "linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] usb: dwc3: gadget:Core consumes a trb software to fill a trb, in ISO


Hi,

Lipengcheng <lpc.li@...ilicon.com> writes:
>> Lipengcheng <lpc.li@...ilicon.com> writes:
>> 
>> > Iso transmission, the current process is that all trb(HWO=1) is handled.
>> > Then core generate DWC3_DEPEVT_XFERNOTREADY event, Software begin
>> > refill trb, this will produce 0 length package, the patch is to
>> > achieve the core consumes a trb, and then the software fill a trb.
>> > Normally, there will never be DWC3_DEPEVT_XFERNOTREADY event and 0-length packet.
>> >
>> > Signed-off-by: l00229106 <lpc.li@...ilicon.com>
>> 
>> who is 100229106??
> Sorry. It is my job number. I will use Pengcheng li to replace it.

thanks

>> > ---
>> >  drivers/usb/dwc3/gadget.c | 2 +-
>> >  1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
>> > index 981fd98..1e6c42e 100644
>> > --- a/drivers/usb/dwc3/gadget.c
>> > +++ b/drivers/usb/dwc3/gadget.c
>> > @@ -2420,7 +2420,7 @@ static void dwc3_endpoint_transfer_complete(struct dwc3 *dwc,
>> >     if (!dep->endpoint.desc)
>> >         return;
>> >
>> > -   if (!usb_endpoint_xfer_isoc(dep->endpoint.desc))
>> > +   if (!usb_endpoint_xfer_isoc(dep->endpoint.desc) || (dep->flags &
>> > + DWC3_EP_TRANSFER_STARTED))
>> 
>> this is wrong. isoc endpoints should NEVER be prestarted.
> The main purpose is to core handle a trb and sofware re-fill the next trb in the DWC3_DEPEVT_XFERINPROGRESS interrupt. Mayebe it can be modified:
>         if (!usb_endpoint_xfer_isoc(dep->endpoint.desc))
>                 __dwc3_gadget_kick_transfer(dep);
> +       else
> +               dwc3_prepare_trbs(dep);
> +

no, this would be wrong too. Care to show me tracepoint data of what you
mean? I really can't understand what problem you're facing here.

Also, try a more recent kernel. I can't accept patches against a v4.4
kernel.

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (833 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ