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>

authored by Alan Stern and committed by Greg Kroah-Hartman db59b464 5df3d8b5

+1 -1
+1 -1
drivers/usb/host/uhci-q.c
··· 372 * need to change any toggles in this URB */ 373 td = list_entry(urbp->td_list.next, struct uhci_td, list); 374 if (toggle > 1 || uhci_toggle(td_token(td)) == toggle) { 375 - td = list_entry(urbp->td_list.next, struct uhci_td, 376 list); 377 toggle = uhci_toggle(td_token(td)) ^ 1; 378
··· 372 * need to change any toggles in this URB */ 373 td = list_entry(urbp->td_list.next, struct uhci_td, list); 374 if (toggle > 1 || uhci_toggle(td_token(td)) == toggle) { 375 + td = list_entry(urbp->td_list.prev, struct uhci_td, 376 list); 377 toggle = uhci_toggle(td_token(td)) ^ 1; 378