aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/uhci-debug.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2006-05-05 16:26:58 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-21 18:04:10 -0400
commit4de7d2c231a8624a47417977be0768c5b5257c4f (patch)
tree3dba388c3c8e0673a5884c900f2b04339dc4708e /drivers/usb/host/uhci-debug.c
parent2d61bde7a0e630e1906e6478b6b2a7aeaaa8f8da (diff)
[PATCH] USB: UHCI: store the endpoint type in the QH structure
This patch (as675) simplifies uhci-hcd slightly by storing each endpoint's type in the corresponding Queue Header structure. 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-debug.c')
-rw-r--r--drivers/usb/host/uhci-debug.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/drivers/usb/host/uhci-debug.c b/drivers/usb/host/uhci-debug.c
index e1239319655c..28c1c51ec475 100644
--- a/drivers/usb/host/uhci-debug.c
+++ b/drivers/usb/host/uhci-debug.c
@@ -98,6 +98,7 @@ static int uhci_show_urbp(struct urb_priv *urbp, char *buf, int len, int space)
98 char *out = buf; 98 char *out = buf;
99 struct uhci_td *td; 99 struct uhci_td *td;
100 int i, nactive, ninactive; 100 int i, nactive, ninactive;
101 char *ptype;
101 102
102 if (len < 200) 103 if (len < 200)
103 return 0; 104 return 0;
@@ -110,13 +111,14 @@ static int uhci_show_urbp(struct urb_priv *urbp, char *buf, int len, int space)
110 (usb_pipein(urbp->urb->pipe) ? "IN" : "OUT")); 111 (usb_pipein(urbp->urb->pipe) ? "IN" : "OUT"));
111 112
112 switch (usb_pipetype(urbp->urb->pipe)) { 113 switch (usb_pipetype(urbp->urb->pipe)) {
113 case PIPE_ISOCHRONOUS: out += sprintf(out, "ISO"); break; 114 case PIPE_ISOCHRONOUS: ptype = "ISO"; break;
114 case PIPE_INTERRUPT: out += sprintf(out, "INT"); break; 115 case PIPE_INTERRUPT: ptype = "INT"; break;
115 case PIPE_BULK: out += sprintf(out, "BLK"); break; 116 case PIPE_BULK: ptype = "BLK"; break;
116 case PIPE_CONTROL: out += sprintf(out, "CTL"); break; 117 default:
118 case PIPE_CONTROL: ptype = "CTL"; break;
117 } 119 }
118 120
119 out += sprintf(out, "%s", (urbp->fsbr ? " FSBR" : "")); 121 out += sprintf(out, "%s%s", ptype, (urbp->fsbr ? " FSBR" : ""));
120 122
121 if (urbp->urb->status != -EINPROGRESS) 123 if (urbp->urb->status != -EINPROGRESS)
122 out += sprintf(out, " Status=%d", urbp->urb->status); 124 out += sprintf(out, " Status=%d", urbp->urb->status);
@@ -147,13 +149,23 @@ static int uhci_show_qh(struct uhci_qh *qh, char *buf, int len, int space)
147 char *out = buf; 149 char *out = buf;
148 int i, nurbs; 150 int i, nurbs;
149 __le32 element = qh_element(qh); 151 __le32 element = qh_element(qh);
152 char *qtype;
150 153
151 /* Try to make sure there's enough memory */ 154 /* Try to make sure there's enough memory */
152 if (len < 80 * 6) 155 if (len < 80 * 6)
153 return 0; 156 return 0;
154 157
155 out += sprintf(out, "%*s[%p] link (%08x) element (%08x)\n", space, "", 158 switch (qh->type) {
156 qh, le32_to_cpu(qh->link), le32_to_cpu(element)); 159 case USB_ENDPOINT_XFER_ISOC: qtype = "ISO"; break;
160 case USB_ENDPOINT_XFER_INT: qtype = "INT"; break;
161 case USB_ENDPOINT_XFER_BULK: qtype = "BLK"; break;
162 case USB_ENDPOINT_XFER_CONTROL: qtype = "CTL"; break;
163 default: qtype = "Skel" ; break;
164 }
165
166 out += sprintf(out, "%*s[%p] %s QH link (%08x) element (%08x)\n",
167 space, "", qh, qtype,
168 le32_to_cpu(qh->link), le32_to_cpu(element));
157 169
158 if (element & UHCI_PTR_QH) 170 if (element & UHCI_PTR_QH)
159 out += sprintf(out, "%*s Element points to QH (bug?)\n", space, ""); 171 out += sprintf(out, "%*s Element points to QH (bug?)\n", space, "");