aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/uhci-q.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2005-12-17 18:03:37 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-20 17:49:57 -0500
commit8d402e1ae03656c1ad215514f8885ef4793f0948 (patch)
treeceac7800d7e07be1a7320a0b729156b12fbf26d6 /drivers/usb/host/uhci-q.c
parent0ed8fee1c1d38a62e981025ba40b5eba30c4ce2a (diff)
[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>
Diffstat (limited to 'drivers/usb/host/uhci-q.c')
-rw-r--r--drivers/usb/host/uhci-q.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/usb/host/uhci-q.c b/drivers/usb/host/uhci-q.c
index 44bba9a6d196..5d6c4f75d0d8 100644
--- a/drivers/usb/host/uhci-q.c
+++ b/drivers/usb/host/uhci-q.c
@@ -736,7 +736,6 @@ err:
736 if (errbuf) { 736 if (errbuf) {
737 /* Print the chain for debugging purposes */ 737 /* Print the chain for debugging purposes */
738 uhci_show_qh(urbp->qh, errbuf, ERRBUF_LEN, 0); 738 uhci_show_qh(urbp->qh, errbuf, ERRBUF_LEN, 0);
739
740 lprintk(errbuf); 739 lprintk(errbuf);
741 } 740 }
742 } 741 }
@@ -924,26 +923,17 @@ td_error:
924 ret = uhci_map_status(status, uhci_packetout(td_token(td))); 923 ret = uhci_map_status(status, uhci_packetout(td_token(td)));
925 924
926err: 925err:
927 /*
928 * Enable this chunk of code if you want to see some more debugging.
929 * But be careful, it has the tendancy to starve out khubd and prevent
930 * disconnects from happening successfully if you have a slow debug
931 * log interface (like a serial console.
932 */
933#if 0
934 if ((debug == 1 && ret != -EPIPE) || debug > 1) { 926 if ((debug == 1 && ret != -EPIPE) || debug > 1) {
935 /* Some debugging code */ 927 /* Some debugging code */
936 dev_dbg(uhci_dev(uhci), "%s: failed with status %x\n", 928 dev_dbg(uhci_dev(uhci), "%s: failed with status %x\n",
937 __FUNCTION__, status); 929 __FUNCTION__, status);
938 930
939 if (errbuf) { 931 if (debug > 1 && errbuf) {
940 /* Print the chain for debugging purposes */ 932 /* Print the chain for debugging purposes */
941 uhci_show_qh(urbp->qh, errbuf, ERRBUF_LEN, 0); 933 uhci_show_qh(urbp->qh, errbuf, ERRBUF_LEN, 0);
942
943 lprintk(errbuf); 934 lprintk(errbuf);
944 } 935 }
945 } 936 }
946#endif
947 937
948 /* Note that the queue has stopped and save the next toggle value */ 938 /* Note that the queue has stopped and save the next toggle value */
949 urbp->qh->element = UHCI_PTR_TERM; 939 urbp->qh->element = UHCI_PTR_TERM;