Message ID | 20201126065409.7533-1-peter.chen@kernel.org |
---|---|
State | New |
Headers | show |
Series | [1/2] usb: cdns3: gadget: clear trb->length as zero after preparing every trb | expand |
Hello! On 26.11.2020 9:54, Peter Chen wrote: > From: Peter Chen <peter.chen@nxp.com> > > The usb_role_switch_register has already called, so if the devm_request_irq ^ been > has failed, it needs to call usb_role_switch_unregister. > > Fixes: b1234e3b3b26 ("usb: cdns3: add runtime PM support") > Signed-off-by: Peter Chen <peter.chen@nxp.com> [...] MBR, Sergei
On 20-11-26 13:13:16, Sergei Shtylyov wrote: > Hello! > > On 26.11.2020 9:54, Peter Chen wrote: > > > From: Peter Chen <peter.chen@nxp.com> > > > > The usb_role_switch_register has already called, so if the devm_request_irq > ^ been > Thanks, will fix it. > > has failed, it needs to call usb_role_switch_unregister. > > > > Fixes: b1234e3b3b26 ("usb: cdns3: add runtime PM support") > > Signed-off-by: Peter Chen <peter.chen@nxp.com> > [...] > > MBR, Sergei -- Thanks, Peter Chen
diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c index 365f30fb1159..0aa85cc07ff1 100644 --- a/drivers/usb/cdns3/gadget.c +++ b/drivers/usb/cdns3/gadget.c @@ -1260,6 +1260,7 @@ static int cdns3_ep_run_transfer(struct cdns3_endpoint *priv_ep, priv_req->end_trb = priv_ep->enqueue; cdns3_ep_inc_enq(priv_ep); trb = priv_ep->trb_pool + priv_ep->enqueue; + trb->length = 0; } while (sg_iter < num_trb); trb = priv_req->trb;