[adm5120] fix RB153 CompactFlash driver for .24
[openwrt.git] / target / linux / adm5120 / files / drivers / usb / host / adm5120-dbg.c
index 17d4ad4..3eec94a 100644 (file)
@@ -1,10 +1,16 @@
 /*
- * OHCI HCD (Host Controller Driver) for USB.
+ * ADM5120 HCD (Host Controller Driver) for USB
  *
- * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
- * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
+ * Copyright (C) 2007,2008 Gabor Juhos <juhosg at openwrt.org>
+ *
+ * This file was derived from: drivers/usb/host/ohci-dbg.c
+ *   (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
+ *   (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
  *
- * This file is licenced under the GPL.
  */
 
 /*-------------------------------------------------------------------------*/
@@ -76,20 +82,20 @@ static inline char *td_togglestring(u32 info)
  * small: 0) header + data packets 1) just header
  */
 static void __attribute__((unused))
-urb_print(struct admhcd *ahcd, struct urb *urb, char * str, int small)
+urb_print(struct admhcd *ahcd, struct urb *urb, char *str, int small, int status)
 {
        unsigned int pipe = urb->pipe;
 
        if (!urb->dev || !urb->dev->bus) {
-               admhc_dbg("%s URB: no dev", str);
+               admhc_dbg(ahcd, "%s URB: no dev", str);
                return;
        }
 
 #ifndef        ADMHC_VERBOSE_DEBUG
-       if (urb->status != 0)
+       if (status != 0)
 #endif
        admhc_dbg(ahcd, "URB-%s %p dev=%d ep=%d%s-%s flags=%x len=%d/%d "
-                       "stat=%d",
+                       "stat=%d\n",
                        str,
                        urb,
                        usb_pipedevice (pipe),
@@ -99,7 +105,7 @@ urb_print(struct admhcd *ahcd, struct urb *urb, char * str, int small)
                        urb->transfer_flags,
                        urb->actual_length,
                        urb->transfer_buffer_length,
-                       urb->status);
+                       status);
 
 #ifdef ADMHC_VERBOSE_DEBUG
        if (!small) {
@@ -112,14 +118,14 @@ urb_print(struct admhcd *ahcd, struct urb *urb, char * str, int small)
                        printk ("\n");
                }
                if (urb->transfer_buffer_length > 0 && urb->transfer_buffer) {
-                       printk(KERN_DEBUG __FILE__ ": data(%d/%d):",
+                       admhc_dbg(ahcd, "data(%d/%d):",
                                urb->actual_length,
                                urb->transfer_buffer_length);
                        len = usb_pipeout(pipe)?
                                                urb->transfer_buffer_length: urb->actual_length;
                        for (i = 0; i < 16 && i < len; i++)
-                               printk (" %02x", ((__u8 *) urb->transfer_buffer) [i]);
-                       admhc_dbg("%s stat:%d\n", i < len? "...": "", urb->status);
+                               printk(" %02x", ((__u8 *)urb->transfer_buffer)[i]);
+                       printk("%s stat:%d\n", i < len? "...": "", status);
                }
        }
 #endif /* ADMHC_VERBOSE_DEBUG */
@@ -363,7 +369,8 @@ admhc_dump_ed(const struct admhcd *ahcd, const char *label,
 
 #else /* ifdef DEBUG */
 
-static inline void urb_print(struct urb * urb, char * str, int small) {}
+static inline void urb_print(struct admhcd *ahcd, struct urb * urb, char * str,
+       int small) {}
 static inline void admhc_dump_ed(const struct admhcd *ahcd, const char *label,
        const struct ed *ed, int verbose) {}
 static inline void admhc_dump_td(const struct admhcd *ahcd, const char *label,
@@ -675,4 +682,3 @@ static inline void remove_debug_files (struct admhcd *ahcd)
 #endif
 
 /*-------------------------------------------------------------------------*/
-
This page took 0.038762 seconds and 4 git commands to generate.