diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2006-08-31 14:18:39 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-08-31 21:04:30 -0400 |
commit | db59b464f8708cdba857f16b183cff0b7466d6b5 (patch) | |
tree | aba762f4214e4bbbf7b6340f5a7007c7a78c2393 | |
parent | 5df3d8b53f436a26fad8077b1ceb39a7708e95ec (diff) |
uhci-hcd: fix list access bug
When skipping to the last TD of an URB, go to the _last_ entry in the
list instead of the _first_ entry (as780). This fixes Bugzilla #6747
and possibly others.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/usb/host/uhci-q.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/uhci-q.c b/drivers/usb/host/uhci-q.c index 026dad06f82b..431e8f31f1a9 100644 --- a/drivers/usb/host/uhci-q.c +++ b/drivers/usb/host/uhci-q.c | |||
@@ -372,7 +372,7 @@ static void uhci_fixup_toggles(struct uhci_qh *qh, int skip_first) | |||
372 | * need to change any toggles in this URB */ | 372 | * need to change any toggles in this URB */ |
373 | td = list_entry(urbp->td_list.next, struct uhci_td, list); | 373 | td = list_entry(urbp->td_list.next, struct uhci_td, list); |
374 | if (toggle > 1 || uhci_toggle(td_token(td)) == toggle) { | 374 | if (toggle > 1 || uhci_toggle(td_token(td)) == toggle) { |
375 | td = list_entry(urbp->td_list.next, struct uhci_td, | 375 | td = list_entry(urbp->td_list.prev, struct uhci_td, |
376 | list); | 376 | list); |
377 | toggle = uhci_toggle(td_token(td)) ^ 1; | 377 | toggle = uhci_toggle(td_token(td)) ^ 1; |
378 | 378 | ||