aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/linux/linux-davinci/davinci-sffsdr/0001-USB-musb-cppi-bugfixes.patch
blob: ad6a19b3d6739c37448cb0e2ec1f3123af38a049 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
From 901b05b33b8ca924bab3fa63ef3fd6dcb123e318 Mon Sep 17 00:00:00 2001
From: Hugo Villeneuve <hugo@hugovil.com>
Date: Sat, 24 Jan 2009 17:57:30 -0800
Subject: [PATCH 01/12] USB: musb cppi bugfixes

These compilation errors are related to incorrect
debugging macro and variable names and generated the
following errors:

  drivers/usb/musb/cppi_dma.c:437:5: warning: "MUSB_DEBUG" is not defined
  drivers/usb/musb/cppi_dma.c: In function 'cppi_next_rx_segment':
  drivers/usb/musb/cppi_dma.c:884: error: 'debug' undeclared (first use in this function)

Signed-off-by: Hugo Villeneuve <hugo@hugovil.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/usb/musb/cppi_dma.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/musb/cppi_dma.c b/drivers/usb/musb/cppi_dma.c
index 5ad6d08..d8d5345 100644
--- a/drivers/usb/musb/cppi_dma.c
+++ b/drivers/usb/musb/cppi_dma.c
@@ -9,6 +9,7 @@
 #include <linux/usb.h>
 
 #include "musb_core.h"
+#include "musb_debug.h"
 #include "cppi_dma.h"
 
 
@@ -423,6 +424,7 @@ cppi_rndis_update(struct cppi_channel *c, int is_rx,
 	}
 }
 
+#ifdef CONFIG_USB_MUSB_DEBUG
 static void cppi_dump_rxbd(const char *tag, struct cppi_descriptor *bd)
 {
 	pr_debug("RXBD/%s %08x: "
@@ -431,10 +433,11 @@ static void cppi_dump_rxbd(const char *tag, struct cppi_descriptor *bd)
 			bd->hw_next, bd->hw_bufp, bd->hw_off_len,
 			bd->hw_options);
 }
+#endif
 
 static void cppi_dump_rxq(int level, const char *tag, struct cppi_channel *rx)
 {
-#if MUSB_DEBUG > 0
+#ifdef CONFIG_USB_MUSB_DEBUG
 	struct cppi_descriptor	*bd;
 
 	if (!_dbg_level(level))
@@ -881,12 +884,14 @@ cppi_next_rx_segment(struct musb *musb, struct cppi_channel *rx, int onepacket)
 	bd->hw_options |= CPPI_SOP_SET;
 	tail->hw_options |= CPPI_EOP_SET;
 
-	if (debug >= 5) {
+#ifdef CONFIG_USB_MUSB_DEBUG
+	if (_dbg_level(5)) {
 		struct cppi_descriptor	*d;
 
 		for (d = rx->head; d; d = d->next)
 			cppi_dump_rxbd("S", d);
 	}
+#endif
 
 	/* in case the preceding transfer left some state... */
 	tail = rx->last_processed;
-- 
1.5.4.5