mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 20:32:04 +09:00
usb: fix bug: no response to zero length out control request
This commit is contained in:
@@ -662,7 +662,13 @@ static int dwc_otg_pcd_ep_queue(struct usb_ep *_ep,
|
||||
pcd->ep0state = EP0_STATUS;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case EP0_STATUS:
|
||||
DWC_DEBUGPL(DBG_PCD,
|
||||
"%s ep0: EP0_IN_STATUS_PHASE\n",
|
||||
__func__);
|
||||
break;
|
||||
|
||||
default:
|
||||
DWC_DEBUGPL(DBG_ANY, "ep0: odd state %d\n",
|
||||
pcd->ep0state);
|
||||
|
||||
@@ -1486,7 +1486,11 @@ static inline void pcd_setup( dwc_otg_pcd_t *_pcd )
|
||||
ep0->dwc_ep.is_in = 0;
|
||||
_pcd->ep0state = EP0_OUT_DATA_PHASE;
|
||||
}
|
||||
|
||||
if (ctrl.wLength == 0)
|
||||
{
|
||||
ep0->dwc_ep.is_in = 1;
|
||||
_pcd->ep0state = EP0_STATUS;
|
||||
}
|
||||
if ((ctrl.bRequestType & USB_TYPE_MASK) != USB_TYPE_STANDARD)
|
||||
{
|
||||
/* handle non-standard (class/vendor) requests in the gadget driver */
|
||||
|
||||
Reference in New Issue
Block a user