Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: dwc3: ep0: ignore direction on 2-stage transfer

We don't need to care about direction on a two stage
transfer.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Felipe Balbi and committed by
Greg Kroah-Hartman
d95b09b9 2646021e

+4 -4
+4 -4
drivers/usb/dwc3/ep0.c
··· 525 525 526 526 len = le16_to_cpu(ctrl->wLength); 527 527 if (!len) { 528 - dwc->three_stage_setup = 0; 528 + dwc->three_stage_setup = false; 529 + dwc->ep0_expect_in = false; 529 530 dwc->ep0_next_event = DWC3_EP0_NRDY_STATUS; 530 531 } else { 531 - dwc->three_stage_setup = 1; 532 + dwc->three_stage_setup = true; 533 + dwc->ep0_expect_in = !!(ctrl->bRequestType & USB_DIR_IN); 532 534 dwc->ep0_next_event = DWC3_EP0_NRDY_DATA; 533 535 } 534 - 535 - dwc->ep0_expect_in = !!(ctrl->bRequestType & USB_DIR_IN); 536 536 537 537 if ((ctrl->bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD) 538 538 ret = dwc3_ep0_std_request(dwc, ctrl);