]> git.hungrycats.org Git - linux/commit
dwc_otg: prevent crashes on host port disconnects
authorP33M <P33M@github.com>
Mon, 5 Aug 2013 10:47:12 +0000 (11:47 +0100)
committerP33M <P33M@github.com>
Mon, 5 Aug 2013 12:22:15 +0000 (13:22 +0100)
commit6ea91ce2fcd5e1aa6a6dc5bfbbd11715d85a00a5
tree2a79fcb4fe5fc316b6d5b9fbf386169ac7f884a3
parente25207d2df2f53019f3581549a26f890933124ed
dwc_otg: prevent crashes on host port disconnects

Fix several issues resulting in crashes or inconsistent state
if a Model A root port was disconnected.

- Clean up queue heads properly in kill_urbs_in_qh_list by
  removing the empty QHs from the schedule lists
- Set the halt status properly to prevent IRQ handlers from
  using freed memory
- Add fiq_split related cleanup for saved registers
- Make microframe scheduling reclaim host channels if
  active during a disconnect
- Abort URBs with -ESHUTDOWN status response, informing
  device drivers so they respond in a more correct fashion
  and don't try to resubmit URBs
- Prevent IRQ handlers from attempting to handle channel
  interrupts if the associated URB was dequeued (and the
  driver state was cleared)
drivers/usb/host/dwc_otg/dwc_otg_hcd.c
drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c
drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c