diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2006-05-19 16:52:35 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-06-21 18:04:12 -0400 |
commit | c8155cc5d839838f8425dbea568fc537337176a7 (patch) | |
tree | fc50ffe774fa59a1a3d18e8543bb7e04d1e80726 /drivers/usb/host/uhci-debug.c | |
parent | caf3827a65af476c71eaeb79636869a4ab128d48 (diff) |
[PATCH] UHCI: remove ISO TDs as they are used
This patch (as690) does the same thing for ISO TDs as as680 did for
non-ISO TDs: free them as they are used rather than all at once when an
URB is complete. At the same time it fixes a minor buglet (I'm not
aware of it ever affecting anyone): An ISO TD should be retired when its
frame is over, regardless of whether or not the hardware has marked it
inactive.
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.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/usb/host/uhci-debug.c b/drivers/usb/host/uhci-debug.c index ab8ba8220ad1..6637a0e49978 100644 --- a/drivers/usb/host/uhci-debug.c +++ b/drivers/usb/host/uhci-debug.c | |||
@@ -127,7 +127,8 @@ static int uhci_show_urbp(struct urb_priv *urbp, char *buf, int len, int space) | |||
127 | 127 | ||
128 | i = nactive = ninactive = 0; | 128 | i = nactive = ninactive = 0; |
129 | list_for_each_entry(td, &urbp->td_list, list) { | 129 | list_for_each_entry(td, &urbp->td_list, list) { |
130 | if (++i <= 10 || debug > 2) { | 130 | if (urbp->qh->type != USB_ENDPOINT_XFER_ISOC && |
131 | (++i <= 10 || debug > 2)) { | ||
131 | out += sprintf(out, "%*s%d: ", space + 2, "", i); | 132 | out += sprintf(out, "%*s%d: ", space + 2, "", i); |
132 | out += uhci_show_td(td, out, len - (out - buf), 0); | 133 | out += uhci_show_td(td, out, len - (out - buf), 0); |
133 | } else { | 134 | } else { |
@@ -168,8 +169,9 @@ static int uhci_show_qh(struct uhci_qh *qh, char *buf, int len, int space) | |||
168 | space, "", qh, qtype, | 169 | space, "", qh, qtype, |
169 | le32_to_cpu(qh->link), le32_to_cpu(element)); | 170 | le32_to_cpu(qh->link), le32_to_cpu(element)); |
170 | if (qh->type == USB_ENDPOINT_XFER_ISOC) | 171 | if (qh->type == USB_ENDPOINT_XFER_ISOC) |
171 | out += sprintf(out, "%*s period %d\n", | 172 | out += sprintf(out, "%*s period %d frame %x desc [%p]\n", |
172 | space, "", qh->period); | 173 | space, "", qh->period, qh->iso_frame, |
174 | qh->iso_packet_desc); | ||
173 | 175 | ||
174 | if (element & UHCI_PTR_QH) | 176 | if (element & UHCI_PTR_QH) |
175 | out += sprintf(out, "%*s Element points to QH (bug?)\n", space, ""); | 177 | out += sprintf(out, "%*s Element points to QH (bug?)\n", space, ""); |
@@ -331,8 +333,10 @@ static int uhci_show_status(struct uhci_hcd *uhci, char *buf, int len) | |||
331 | out += sprintf(out, " sof = %02x\n", sof); | 333 | out += sprintf(out, " sof = %02x\n", sof); |
332 | out += uhci_show_sc(1, portsc1, out, len - (out - buf)); | 334 | out += uhci_show_sc(1, portsc1, out, len - (out - buf)); |
333 | out += uhci_show_sc(2, portsc2, out, len - (out - buf)); | 335 | out += uhci_show_sc(2, portsc2, out, len - (out - buf)); |
334 | out += sprintf(out, "Most recent frame: %x\n", | 336 | out += sprintf(out, "Most recent frame: %x (%d) " |
335 | uhci->frame_number); | 337 | "Last ISO frame: %x (%d)\n", |
338 | uhci->frame_number, uhci->frame_number & 1023, | ||
339 | uhci->last_iso_frame, uhci->last_iso_frame & 1023); | ||
336 | 340 | ||
337 | return out - buf; | 341 | return out - buf; |
338 | } | 342 | } |