Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 729e6574 authored by Razmik Karapetyan's avatar Razmik Karapetyan Committed by Felipe Balbi
Browse files

usb: dwc2: Don't program DMA address for 0 length request



Check the request length in dwc2_hsotg_start_req() function. If
length == 0, do not write DMA address to control register.

Signed-off-by: default avatarRazmik Karapetyan <razmik@synopsys.com>
Signed-off-by: default avatarJohn Youn <johnyoun@synopsys.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 9d8da857
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1018,7 +1018,7 @@ static void dwc2_hsotg_start_req(struct dwc2_hsotg *hsotg,
		/* write size / packets */
		dwc2_writel(epsize, hsotg->regs + epsize_reg);

		if (using_dma(hsotg) && !continuing) {
		if (using_dma(hsotg) && !continuing && (length != 0)) {
			/*
			 * write DMA address to control register, buffer
			 * already synced by dwc2_hsotg_ep_queue().