[PATCH] UHCI: improve debugging code

This patch (as626) makes some improvements to the debugging code in
uhci-hcd.  The main change is that now the code won't get compiled if
CONFIG_USB_DEBUG isn't set.  But there are other changes too, like
adding a missing .owner field and printing a debugging dump if the
controller dies.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff --git a/drivers/usb/host/uhci-q.c b/drivers/usb/host/uhci-q.c
index 44bba9a..5d6c4f7 100644
--- a/drivers/usb/host/uhci-q.c
+++ b/drivers/usb/host/uhci-q.c
@@ -736,7 +736,6 @@
 		if (errbuf) {
 			/* Print the chain for debugging purposes */
 			uhci_show_qh(urbp->qh, errbuf, ERRBUF_LEN, 0);
-
 			lprintk(errbuf);
 		}
 	}
@@ -924,26 +923,17 @@
 	ret = uhci_map_status(status, uhci_packetout(td_token(td)));
 
 err:
-	/* 
-	 * Enable this chunk of code if you want to see some more debugging.
-	 * But be careful, it has the tendancy to starve out khubd and prevent
-	 * disconnects from happening successfully if you have a slow debug
-	 * log interface (like a serial console.
-	 */
-#if 0
 	if ((debug == 1 && ret != -EPIPE) || debug > 1) {
 		/* Some debugging code */
 		dev_dbg(uhci_dev(uhci), "%s: failed with status %x\n",
 				__FUNCTION__, status);
 
-		if (errbuf) {
+		if (debug > 1 && errbuf) {
 			/* Print the chain for debugging purposes */
 			uhci_show_qh(urbp->qh, errbuf, ERRBUF_LEN, 0);
-
 			lprintk(errbuf);
 		}
 	}
-#endif
 
 	/* Note that the queue has stopped and save the next toggle value */
 	urbp->qh->element = UHCI_PTR_TERM;