mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-01-22 01:30:35 -05:00
usb-designware: fix incorrect cache discard with DMA disabled
Two cache discards for targets with POST_DMA_FLUSH were not properly guarded by USB_DW_ARCH_SLAVE, which causes data loss when DMA is disabled. Change-Id: If14ffdc5662f77b3ff57a04c5b9f94d4cac7e514
This commit is contained in:
parent
047871c58a
commit
361cd46a08
1 changed files with 2 additions and 2 deletions
|
|
@ -1018,7 +1018,7 @@ static void usb_dw_handle_xfer_complete(int epnum, enum usb_dw_epdir epdir)
|
|||
|
||||
if(is_ep0out)
|
||||
{
|
||||
#if defined(NO_UNCACHED_ADDR) && defined(POST_DMA_FLUSH)
|
||||
#if !defined(USB_DW_ARCH_SLAVE) && defined(NO_UNCACHED_ADDR) && defined(POST_DMA_FLUSH)
|
||||
DISCARD_DCACHE_RANGE(ep0_buffer, 64);
|
||||
#endif
|
||||
memcpy(dw_ep->addr, ep0_buffer, transferred);
|
||||
|
|
@ -1084,7 +1084,7 @@ static void usb_dw_handle_xfer_complete(int epnum, enum usb_dw_epdir epdir)
|
|||
|
||||
static void usb_dw_handle_setup_received(void)
|
||||
{
|
||||
#if defined(NO_UNCACHED_ADDR) && defined(POST_DMA_FLUSH)
|
||||
#if !defined(USB_DW_ARCH_SLAVE) && defined(NO_UNCACHED_ADDR) && defined(POST_DMA_FLUSH)
|
||||
DISCARD_DCACHE_RANGE(ep0_buffer, 64);
|
||||
#endif
|
||||
struct usb_ctrlrequest req;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue