Commit 704a1485 authored by Hugo Villeneuve's avatar Hugo Villeneuve Committed by Greg Kroah-Hartman

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: default avatarHugo Villeneuve <hugo@hugovil.com>
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 96bcd090
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <linux/usb.h> #include <linux/usb.h>
#include "musb_core.h" #include "musb_core.h"
#include "musb_debug.h"
#include "cppi_dma.h" #include "cppi_dma.h"
...@@ -423,6 +424,7 @@ cppi_rndis_update(struct cppi_channel *c, int is_rx, ...@@ -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) static void cppi_dump_rxbd(const char *tag, struct cppi_descriptor *bd)
{ {
pr_debug("RXBD/%s %08x: " pr_debug("RXBD/%s %08x: "
...@@ -431,10 +433,11 @@ static void cppi_dump_rxbd(const char *tag, struct cppi_descriptor *bd) ...@@ -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_next, bd->hw_bufp, bd->hw_off_len,
bd->hw_options); bd->hw_options);
} }
#endif
static void cppi_dump_rxq(int level, const char *tag, struct cppi_channel *rx) 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; struct cppi_descriptor *bd;
if (!_dbg_level(level)) if (!_dbg_level(level))
...@@ -881,12 +884,14 @@ cppi_next_rx_segment(struct musb *musb, struct cppi_channel *rx, int onepacket) ...@@ -881,12 +884,14 @@ cppi_next_rx_segment(struct musb *musb, struct cppi_channel *rx, int onepacket)
bd->hw_options |= CPPI_SOP_SET; bd->hw_options |= CPPI_SOP_SET;
tail->hw_options |= CPPI_EOP_SET; tail->hw_options |= CPPI_EOP_SET;
if (debug >= 5) { #ifdef CONFIG_USB_MUSB_DEBUG
if (_dbg_level(5)) {
struct cppi_descriptor *d; struct cppi_descriptor *d;
for (d = rx->head; d; d = d->next) for (d = rx->head; d; d = d->next)
cppi_dump_rxbd("S", d); cppi_dump_rxbd("S", d);
} }
#endif
/* in case the preceding transfer left some state... */ /* in case the preceding transfer left some state... */
tail = rx->last_processed; tail = rx->last_processed;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment