USB: fixes for v5.5-rc2
Only four patches here this time around. Three of them are on dwc3 fixing some small bugs related to our 'started' flag. None are major fixes but they're important nevertheless. -----BEGIN PGP SIGNATURE----- iQJFBAABCAAvFiEElLzh7wn96CXwjh2IzL64meEamQYFAl3w+rMRHGJhbGJpQGtl cm5lbC5vcmcACgkQzL64meEamQZCvRAArY9ON9FpyoXVihv+mEsB423z5R7RLVNK 2KPKZmIt4jETFB+r+ZILjnNWaPO33CH6GzbX8WgqcUne79/t8LOvsF/E7amYQbP5 A1lWI+RPuy1f7pCL1bkiYlfYWCU1XqdNAawcCUmgJaH//eDdI4Jn78q54FRFwkSI AwQ7M9uPHgzcxwrowpiR4UmZe4VlyqC3mfd0eGTiugDMx+IK73X7TmpP5ARZ/P09 dDUjYIhsMzU1sBFDBBUoY05ZVAdHDh1mpvZwUCznH8S1rbIWDVcPTfzvT6qu3EK0 z5fcHbgx2ic5kbtYEf9YcQJdCI9tF+/Mu9q1/asyDKbTeemw/j2FskcxjxPqVpoB F2TwTxUKpXUzI+ZRKm8PgAHmpCC/L5ByZVin8Gbjr9lPffeAe3WqYK3rvKAJZ4Cy ZgF3n0DTbt8iZ0xoE+/wHdFTbH1rx+JinkjFSclhN6Ytsd6ct91k4SjCzBovp+Ry WDqqKi+QToDX7SmS3zth8U5ABzkjQM/HtA+aZmc1BobPnfgjxAVXa4bTYFPqDouc 5cLi1IFVcEq+Lh82pcc+Dqd613YryuicxPgVTqWTu1seyFC1xZ1wdrEwDce/v3ns fQxGeHFvfHxYGK5F5LTe8984ZfFUtFv5cfr2YXfI6d5xTYtM7MWZSXfPXhQxtRGG wy1S7CB9Exs= =Dck/ -----END PGP SIGNATURE----- Merge tag 'fixes-for-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: USB: fixes for v5.5-rc2 Only four patches here this time around. Three of them are on dwc3 fixing some small bugs related to our 'started' flag. None are major fixes but they're important nevertheless. * tag 'fixes-for-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb: usb: gadget: fix wrong endpoint desc usb: dwc3: ep0: Clear started flag on completion usb: dwc3: gadget: Clear started flag for non-IOC usb: dwc3: gadget: Fix logical condition
This commit is contained in:
commit
85862213e7
|
@ -1117,6 +1117,9 @@ static void dwc3_ep0_xfernotready(struct dwc3 *dwc,
|
|||
void dwc3_ep0_interrupt(struct dwc3 *dwc,
|
||||
const struct dwc3_event_depevt *event)
|
||||
{
|
||||
struct dwc3_ep *dep = dwc->eps[event->endpoint_number];
|
||||
u8 cmd;
|
||||
|
||||
switch (event->endpoint_event) {
|
||||
case DWC3_DEPEVT_XFERCOMPLETE:
|
||||
dwc3_ep0_xfer_complete(dwc, event);
|
||||
|
@ -1129,7 +1132,12 @@ void dwc3_ep0_interrupt(struct dwc3 *dwc,
|
|||
case DWC3_DEPEVT_XFERINPROGRESS:
|
||||
case DWC3_DEPEVT_RXTXFIFOEVT:
|
||||
case DWC3_DEPEVT_STREAMEVT:
|
||||
break;
|
||||
case DWC3_DEPEVT_EPCMDCMPLT:
|
||||
cmd = DEPEVT_PARAMETER_CMD(event->parameters);
|
||||
|
||||
if (cmd == DWC3_DEPCMD_ENDTRANSFER)
|
||||
dep->flags &= ~DWC3_EP_TRANSFER_STARTED;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2491,7 +2491,7 @@ static int dwc3_gadget_ep_cleanup_completed_request(struct dwc3_ep *dep,
|
|||
|
||||
req->request.actual = req->request.length - req->remaining;
|
||||
|
||||
if (!dwc3_gadget_ep_request_completed(req) &&
|
||||
if (!dwc3_gadget_ep_request_completed(req) ||
|
||||
req->num_pending_sgs) {
|
||||
__dwc3_gadget_kick_transfer(dep);
|
||||
goto out;
|
||||
|
@ -2719,6 +2719,9 @@ static void dwc3_stop_active_transfer(struct dwc3_ep *dep, bool force,
|
|||
WARN_ON_ONCE(ret);
|
||||
dep->resource_index = 0;
|
||||
|
||||
if (!interrupt)
|
||||
dep->flags &= ~DWC3_EP_TRANSFER_STARTED;
|
||||
|
||||
if (dwc3_is_usb31(dwc) || dwc->revision < DWC3_REVISION_310A)
|
||||
udelay(100);
|
||||
}
|
||||
|
|
|
@ -621,8 +621,12 @@ static void ecm_disable(struct usb_function *f)
|
|||
|
||||
DBG(cdev, "ecm deactivated\n");
|
||||
|
||||
if (ecm->port.in_ep->enabled)
|
||||
if (ecm->port.in_ep->enabled) {
|
||||
gether_disconnect(&ecm->port);
|
||||
} else {
|
||||
ecm->port.in_ep->desc = NULL;
|
||||
ecm->port.out_ep->desc = NULL;
|
||||
}
|
||||
|
||||
usb_ep_disable(ecm->notify);
|
||||
ecm->notify->desc = NULL;
|
||||
|
|
|
@ -618,6 +618,7 @@ static void rndis_disable(struct usb_function *f)
|
|||
gether_disconnect(&rndis->port);
|
||||
|
||||
usb_ep_disable(rndis->notify);
|
||||
rndis->notify->desc = NULL;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
|
Loading…
Reference in New Issue