Skip to content

Commit

Permalink
usb: dwc3: ep0: ignore direction on 2-stage transfer
Browse files Browse the repository at this point in the history
We don't need to care about direction on a two stage
transfer.

Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Felipe Balbi authored and gregkh committed Oct 4, 2011
1 parent 2646021 commit d95b09b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/usb/dwc3/ep0.c
Original file line number Diff line number Diff line change
Expand Up @@ -525,15 +525,15 @@ static void dwc3_ep0_inspect_setup(struct dwc3 *dwc,

len = le16_to_cpu(ctrl->wLength);
if (!len) {
dwc->three_stage_setup = 0;
dwc->three_stage_setup = false;
dwc->ep0_expect_in = false;
dwc->ep0_next_event = DWC3_EP0_NRDY_STATUS;
} else {
dwc->three_stage_setup = 1;
dwc->three_stage_setup = true;
dwc->ep0_expect_in = !!(ctrl->bRequestType & USB_DIR_IN);
dwc->ep0_next_event = DWC3_EP0_NRDY_DATA;
}

dwc->ep0_expect_in = !!(ctrl->bRequestType & USB_DIR_IN);

if ((ctrl->bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD)
ret = dwc3_ep0_std_request(dwc, ctrl);
else
Expand Down

0 comments on commit d95b09b

Please sign in to comment.