hujun260 commented on code in PR #15506:
URL: https://github.com/apache/nuttx/pull/15506#discussion_r1916118689
##########
arch/arm/src/samv7/sam_usbdevhs.c:
##########
@@ -4091,9 +4099,11 @@ static int sam_ep_cancel(struct usbdev_ep_s *ep, struct
usbdev_req_s *req)
DEBUGASSERT(ep != NULL && req != NULL);
usbtrace(TRACE_EPCANCEL, USB_EPNO(ep->eplog));
- flags = enter_critical_section();
+ flags = spin_lock_irqsave(&privep->dev->lock);
+ sched_lock();
sam_req_cancel(privep, -EAGAIN);
Review Comment:
sam_ep_cancel
sam_req_cancel
sam_req_complete
deadlock
##########
arch/arm/src/lpc214x/lpc214x_usbdev.c:
##########
@@ -3416,10 +3480,11 @@ void arm_usbuninitialize(void)
/* Disconnect device */
- flags = enter_critical_section();
+ flags = spin_lock_irqsave(&priv->lock);
+ sched_lock();
lpc214x_pullup(&priv->usbdev, false);
Review Comment:
deadlock
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]