Alan Stern 977dcfdc60 USB: OHCI: don't lose track of EDs when a controller dies
This patch fixes a bug in ohci-hcd.  When an URB is unlinked, the
corresponding Endpoint Descriptor is added to the ed_rm_list and taken
off the hardware schedule.  Once the ED is no longer visible to the
hardware, finish_unlinks() handles the URBs that were unlinked or have
completed.  If any URBs remain attached to the ED, the ED is added
back to the hardware schedule -- but only if the controller is
running.

This fails when a controller dies.  A non-empty ED does not get added
back to the hardware schedule and does not remain on the ed_rm_list;
ohci-hcd loses track of it.  The remaining URBs cannot be unlinked,
which causes the USB stack to hang.

The patch changes finish_unlinks() so that non-empty EDs remain on
the ed_rm_list if the controller isn't running.  This requires moving
some of the existing code around, to avoid modifying the ED's hardware
fields more than once.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-17 17:05:07 -07:00
..
2014-07-10 21:04:25 +02:00
2014-06-23 16:47:44 -07:00
2014-07-09 16:45:36 -07:00
2014-06-26 13:34:15 +01:00
2014-06-25 12:19:01 -07:00
2014-07-06 12:11:57 -07:00
2014-07-12 14:13:10 -07:00
2014-06-17 15:43:48 -07:00
2014-07-06 12:08:30 -07:00
2014-06-26 10:48:23 +01:00
2014-07-11 17:43:13 -07:00
2014-06-23 09:22:48 +03:00
2014-07-01 13:18:38 +03:00