Commit 0d8e6bb9 authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

[PATCH] maintain hcd_dev queue in FIFO order

Current uses of the urb_list have all been to make
sure we have some list of pending urbs, so we can
clean them all up after HCs die, and avoid trying
to unlink something that's not actually linked.
So order hasn't mattered.

This makes the order be FIFO, which is more useful
for other purposes.  Like being the HCD's internal
schedule, or dumping for debug.
parent 6aa8a409
......@@ -1001,7 +1001,7 @@ static int hcd_submit_urb (struct urb *urb, int mem_flags)
spin_lock_irqsave (&hcd_data_lock, flags);
if (HCD_IS_RUNNING (hcd->state) && hcd->state != USB_STATE_QUIESCING) {
usb_get_dev (urb->dev);
list_add (&urb->urb_list, &dev->urb_list);
list_add_tail (&urb->urb_list, &dev->urb_list);
status = 0;
} else {
INIT_LIST_HEAD (&urb->urb_list);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment