Star64_linux/drivers/usb/dwc2
Andrzej Pietrasiewicz 066cfd0770 usb: gadget: dwc2: fix zlp handling
The patch 10209abe87
usb: dwc2: gadget: Add scatter-gather mode

avoided a NULL pointer dereference (hs_ep->req == NULL) by
calling dwc2_gadget_fill_nonisoc_xfer_dma_one() directly instead of through
the dwc2_gadget_config_nonisoc_xfer_ddma() wrapper, which unconditionally
dereferenced the said pointer.

However, this was based on an incorrect assumption that in the context of
dwc2_hsotg_program_zlp() the pointer is always NULL, which is not the case.
The result were SB CV MSC tests failing starting from Test Case 6.

Instead, this patch reverts to calling the wrapper and adds a check for
the pointer being NULL inside the wrapper.

Fixes: 10209abe87 (usb: dwc2: gadget: Add scatter-gather mode)
Acked-by: Minas Harutyunyan <hminas@synopsys.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2019-06-06 13:51:57 +03:00
..
core.c usb: dwc2: gadget: Move gadget phy init into core phy init 2019-05-03 09:13:48 +03:00
core.h usb: dwc2: Delayed status support 2019-05-03 09:13:48 +03:00
core_intr.c usb: dwc2: optionally assert phy reset when waking up 2019-05-03 09:13:47 +03:00
debug.h
debugfs.c
gadget.c usb: gadget: dwc2: fix zlp handling 2019-06-06 13:51:57 +03:00
hcd.c usb: dwc2: Fix DMA cache alignment issues 2019-06-06 13:51:57 +03:00
hcd.h usb: dwc2: host: Fix wMaxPacketSize handling (fix webcam regression) 2019-06-06 13:51:41 +03:00
hcd_ddma.c
hcd_intr.c usb: dwc2: host: Fix wMaxPacketSize handling (fix webcam regression) 2019-06-06 13:51:41 +03:00
hcd_queue.c usb: dwc2: host: Fix wMaxPacketSize handling (fix webcam regression) 2019-06-06 13:51:41 +03:00
hw.h usb: dwc2: Move UTMI_PHY_DATA defines closer 2019-05-03 09:13:48 +03:00
Kconfig
Makefile
params.c usb: dwc2: Set lpm mode parameters depend on HW configuration 2019-05-03 09:13:49 +03:00
pci.c
platform.c usb: dwc2: gadget: Replace phyif with phy_utmi_width 2019-05-03 09:13:48 +03:00