]> git.baikalelectronics.ru Git - kernel.git/commit
USB: add check to detect host controller hardware removal
authorAlan Stern <stern@rowland.harvard.edu>
Wed, 9 Jun 2010 21:34:27 +0000 (17:34 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 10 Aug 2010 21:35:33 +0000 (14:35 -0700)
commite1ffc57e4867d3e7896d486710286d09124fd135
treefc9c29119b6d811ff28c3dfbdd03600ff80ea11d
parenta451aeadc60ba527155a4a4145e176a20b82d5ca
USB: add check to detect host controller hardware removal

This patch (as1391) fixes a problem that can occur when USB host
controller hardware is hot-unplugged.  If no interrupts are generated
by the unplug then the HCD may not realize that the controller is
gone, and the subsequent unbind may hang waiting for interrupts that
never arrive.

The solution (for PCI-based controllers) is to call the HCD's
interrupt handler at the start of usb_hcd_pci_remove().  If the
hardware is gone, the handler will realize this when it tries to read
the controller's status register.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/hcd-pci.c