mark errorcode with USB_ERR_SHUTDOWN when kill urb

This commit is contained in:
sakumisu
2024-03-28 20:59:46 +08:00
parent 2335e08ef2
commit 078e21066c
3 changed files with 4 additions and 4 deletions

View File

@@ -808,10 +808,10 @@ int usbh_kill_urb(struct usbh_urb *urb)
chan->urb = NULL;
urb->hcpriv = NULL;
urb->errorcode = -USB_ERR_SHUTDOWN;
if (urb->timeout) {
urb->timeout = 0;
urb->errorcode = -USB_ERR_SHUTDOWN;
usb_osal_sem_give(chan->waitsem);
} else {
dwc2_chan_free(chan);

View File

@@ -1177,11 +1177,11 @@ int usbh_kill_urb(struct usbh_urb *urb)
qh = (struct ehci_qh_hw *)urb->hcpriv;
urb->hcpriv = NULL;
urb->errorcode = -USB_ERR_SHUTDOWN;
qh->urb = NULL;
if (urb->timeout) {
urb->timeout = 0;
urb->errorcode = -USB_ERR_SHUTDOWN;
usb_osal_sem_give(qh->waitsem);
} else {
ehci_qh_free(bus, qh);

View File

@@ -701,11 +701,11 @@ int usbh_kill_urb(struct usbh_urb *urb)
pipe = (struct musb_pipe *)urb->hcpriv;
urb->hcpriv = NULL;
urb->errorcode = -USB_ERR_SHUTDOWN;
pipe->urb = NULL;
if (urb->timeout) {
urb->timeout = 0;
urb->errorcode = -USB_ERR_SHUTDOWN;
usb_osal_sem_give(pipe->waitsem);
} else {
musb_pipe_free(pipe);