summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/tms320dm320/sansa-connect/tnetv105_usb_drv.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/firmware/target/arm/tms320dm320/sansa-connect/tnetv105_usb_drv.c b/firmware/target/arm/tms320dm320/sansa-connect/tnetv105_usb_drv.c
index bf1305824d..56251a96db 100644
--- a/firmware/target/arm/tms320dm320/sansa-connect/tnetv105_usb_drv.c
+++ b/firmware/target/arm/tms320dm320/sansa-connect/tnetv105_usb_drv.c
@@ -590,10 +590,21 @@ static int tnetv_ep_start_xmit(int epn, void *buf, int size)
590 else 590 else
591 { 591 {
592 dma_addr_t buffer = (dma_addr_t)buf; 592 dma_addr_t buffer = (dma_addr_t)buf;
593 commit_discard_dcache_range(buf, size); 593 int send_zlp = 0;
594 if (size == 0)
595 {
596 /* Any address in SDRAM will do, contents do not matter */
597 buffer = CONFIG_SDRAM_START;
598 size = 1;
599 send_zlp = 1;
600 }
601 else
602 {
603 commit_discard_dcache_range(buf, size);
604 }
594 if ((buffer >= CONFIG_SDRAM_START) && (buffer + size < CONFIG_SDRAM_START + SDRAM_SIZE)) 605 if ((buffer >= CONFIG_SDRAM_START) && (buffer + size < CONFIG_SDRAM_START + SDRAM_SIZE))
595 { 606 {
596 if (tnetv_cppi_send(&cppi, (epn - 1), buffer, size, 0)) 607 if (tnetv_cppi_send(&cppi, (epn - 1), buffer, size, send_zlp))
597 { 608 {
598 panicf("tnetv_cppi_send() failed"); 609 panicf("tnetv_cppi_send() failed");
599 } 610 }