]> git.baikalelectronics.ru Git - kernel.git/commit
USB: OHCI: no shortcut for unlinking URBS from a dead controller
authorAlan Stern <stern@rowland.harvard.edu>
Fri, 18 Jul 2014 20:25:49 +0000 (16:25 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jul 2014 23:30:46 +0000 (16:30 -0700)
commitf7559b738b0979b73a6434f7372b41eb5da0cac1
treef00e592e7f176b5dc5e2a088fb6f72618c1858e7
parent0444506c09bb3000e9d8db19cb61928fc30fa809
USB: OHCI: no shortcut for unlinking URBS from a dead controller

When an URB is unlinked from a dead controller, ohci-hcd gives back
the URB with no regard for cleaning up the internal data structures.
This won't play nicely with the upcoming changes to the TD done
list.

Therefore make ohci_urb_dequeue() call finish_unlinks(), which uses
td_done() to do a proper cleanup, rather than calling finish_urb()
directly.  Also, remove the checks that urb_priv is non-NULL; the
driver guarantees that urb_priv will never be NULL for a valid URB.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ohci-hcd.c