aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/cppi_dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/musb/cppi_dma.c')
-rw-r--r--drivers/usb/musb/cppi_dma.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/usb/musb/cppi_dma.c b/drivers/usb/musb/cppi_dma.c
index 5ad6d0893cb..569ef0fed0f 100644
--- a/drivers/usb/musb/cppi_dma.c
+++ b/drivers/usb/musb/cppi_dma.c
@@ -9,6 +9,7 @@
9#include <linux/usb.h> 9#include <linux/usb.h>
10 10
11#include "musb_core.h" 11#include "musb_core.h"
12#include "musb_debug.h"
12#include "cppi_dma.h" 13#include "cppi_dma.h"
13 14
14 15
@@ -423,6 +424,7 @@ cppi_rndis_update(struct cppi_channel *c, int is_rx,
423 } 424 }
424} 425}
425 426
427#ifdef CONFIG_USB_MUSB_DEBUG
426static void cppi_dump_rxbd(const char *tag, struct cppi_descriptor *bd) 428static void cppi_dump_rxbd(const char *tag, struct cppi_descriptor *bd)
427{ 429{
428 pr_debug("RXBD/%s %08x: " 430 pr_debug("RXBD/%s %08x: "
@@ -431,10 +433,11 @@ static void cppi_dump_rxbd(const char *tag, struct cppi_descriptor *bd)
431 bd->hw_next, bd->hw_bufp, bd->hw_off_len, 433 bd->hw_next, bd->hw_bufp, bd->hw_off_len,
432 bd->hw_options); 434 bd->hw_options);
433} 435}
436#endif
434 437
435static void cppi_dump_rxq(int level, const char *tag, struct cppi_channel *rx) 438static void cppi_dump_rxq(int level, const char *tag, struct cppi_channel *rx)
436{ 439{
437#if MUSB_DEBUG > 0 440#ifdef CONFIG_USB_MUSB_DEBUG
438 struct cppi_descriptor *bd; 441 struct cppi_descriptor *bd;
439 442
440 if (!_dbg_level(level)) 443 if (!_dbg_level(level))
@@ -881,12 +884,14 @@ cppi_next_rx_segment(struct musb *musb, struct cppi_channel *rx, int onepacket)
881 bd->hw_options |= CPPI_SOP_SET; 884 bd->hw_options |= CPPI_SOP_SET;
882 tail->hw_options |= CPPI_EOP_SET; 885 tail->hw_options |= CPPI_EOP_SET;
883 886
884 if (debug >= 5) { 887#ifdef CONFIG_USB_MUSB_DEBUG
888 if (_dbg_level(5)) {
885 struct cppi_descriptor *d; 889 struct cppi_descriptor *d;
886 890
887 for (d = rx->head; d; d = d->next) 891 for (d = rx->head; d; d = d->next)
888 cppi_dump_rxbd("S", d); 892 cppi_dump_rxbd("S", d);
889 } 893 }
894#endif
890 895
891 /* in case the preceding transfer left some state... */ 896 /* in case the preceding transfer left some state... */
892 tail = rx->last_processed; 897 tail = rx->last_processed;
@@ -990,6 +995,7 @@ static int cppi_channel_program(struct dma_channel *ch,
990 cppi_ch->offset = 0; 995 cppi_ch->offset = 0;
991 cppi_ch->maxpacket = maxpacket; 996 cppi_ch->maxpacket = maxpacket;
992 cppi_ch->buf_len = len; 997 cppi_ch->buf_len = len;
998 cppi_ch->channel.actual_len = 0;
993 999
994 /* TX channel? or RX? */ 1000 /* TX channel? or RX? */
995 if (cppi_ch->transmit) 1001 if (cppi_ch->transmit)