usb: dwc_otg: Use dma allocation for mphi dummy_send buffer
authorDave Stevenson <dave.stevenson@raspberrypi.org>
Wed, 30 Jan 2019 17:47:51 +0000 (17:47 +0000)
committerpopcornmix <popcornmix@gmail.com>
Mon, 13 May 2019 23:08:20 +0000 (00:08 +0100)
commit395eb197e8d2040f84e9a33757e2232505b8e3ad
treef04a8eddf6a80508813ffdcfc30bbe81b26ea3a6
parent4e11f2bf0ee11da7d58bf357e88ea241246b8b53
usb: dwc_otg: Use dma allocation for mphi dummy_send buffer

The FIQ driver used a kzalloc'ed buffer for dummy_send,
passing a kernel virtual address to the hardware block.
The buffer is only ever used for a dummy read, so it
should be harmless, but there is the chance that it will
cause exceptions.

Use a dma allocation so that we have a genuine bus address,
and read from that.
Free the allocation when done for good measure.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c
drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h
drivers/usb/host/dwc_otg/dwc_otg_hcd.c