|
@@ -56,16 +56,16 @@
|
|
#endif
|
|
#endif
|
|
|
|
|
|
#ifdef DEBUG
|
|
#ifdef DEBUG
|
|
-#define USB_DEBUG
|
|
|
|
-#define USB_HUB_DEBUG
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
-#ifdef USB_DEBUG
|
|
|
|
-#define USB_PRINTF(fmt, args...) printf(fmt , ##args)
|
|
|
|
|
|
+#define USB_DEBUG 1
|
|
|
|
+#define USB_HUB_DEBUG 1
|
|
#else
|
|
#else
|
|
-#define USB_PRINTF(fmt, args...)
|
|
|
|
|
|
+#define USB_DEBUG 0
|
|
|
|
+#define USB_HUB_DEBUG 0
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
+#define USB_PRINTF(fmt, args...) debug_cond(USB_DEBUG, fmt, ##args)
|
|
|
|
+#define USB_HUB_PRINTF(fmt, args...) debug_cond(USB_HUB_DEBUG, fmt, ##args)
|
|
|
|
+
|
|
#define USB_BUFSIZ 512
|
|
#define USB_BUFSIZ 512
|
|
|
|
|
|
static struct usb_device usb_dev[USB_MAX_DEVICE];
|
|
static struct usb_device usb_dev[USB_MAX_DEVICE];
|
|
@@ -968,13 +968,6 @@ void usb_scan_devices(void)
|
|
* Probes device for being a hub and configurate it
|
|
* Probes device for being a hub and configurate it
|
|
*/
|
|
*/
|
|
|
|
|
|
-#ifdef USB_HUB_DEBUG
|
|
|
|
-#define USB_HUB_PRINTF(fmt, args...) printf(fmt , ##args)
|
|
|
|
-#else
|
|
|
|
-#define USB_HUB_PRINTF(fmt, args...)
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
-
|
|
|
|
static struct usb_hub_device hub_dev[USB_MAX_HUB];
|
|
static struct usb_hub_device hub_dev[USB_MAX_HUB];
|
|
static int usb_hub_index;
|
|
static int usb_hub_index;
|
|
|
|
|