WSL2-Linux-Kernel/drivers/usb/core
Alan Stern 69fff59de4 USB: remove remaining usages of hcd->state from usbcore and fix regression
This patch (as1467) removes the last usages of hcd->state from
usbcore.  We no longer check to see if an interrupt handler finds that
a controller has died; instead we rely on host controller drivers to
make an explicit call to usb_hc_died().

This fixes a regression introduced by commit
9b37596a2e (USB: move usbcore away from
hcd->state).  It used to be that when a controller shared an IRQ with
another device and an interrupt arrived while hcd->state was set to
HC_STATE_HALT, the interrupt handler would be skipped.  The commit
removed that test; as a result the current code doesn't skip calling
the handler and ends up believing the controller has died, even though
it's only temporarily stopped.  The solution is to ignore HC_STATE_HALT
following the handler's return.

As a consequence of this change, several of the host controller
drivers need to be modified.  They can no longer implicitly rely on
usbcore realizing that a controller has died because of hcd->state.
The patch adds calls to usb_hc_died() in the appropriate places.

The patch also changes a few of the interrupt handlers.  They don't
expect to be called when hcd->state is equal to HC_STATE_HALT, even if
the controller is still alive.  Early returns were added to avoid any
confusion.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Manuel Lauss <manuel.lauss@googlemail.com>
CC: Rodolfo Giometti <giometti@linux.it>
CC: Olav Kongas <ok@artecdesign.ee>
CC: <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-19 16:34:04 -07:00
..
Kconfig kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT 2011-01-20 17:02:05 -08:00
Makefile usb: makefile cleanup 2010-10-22 10:22:07 -07:00
buffer.c USB: Core: Fix minor coding style issues 2011-01-22 19:35:39 -08:00
config.c usb/ch9: use proper endianess for wBytesPerInterval 2011-05-02 16:42:51 -07:00
devices.c Merge 2.6.39-rc4 into usb-next 2011-04-19 05:50:38 -07:00
devio.c USB: Do not pass negative length to snoop_urb() 2011-03-23 13:14:16 -07:00
driver.c USB: Move runtime PM callbacks to usb_device_pm_ops 2011-03-18 19:55:36 +01:00
endpoint.c usb: set ep_dev async suspend should be later than device_initialize 2011-01-22 18:36:42 -08:00
file.c USB: remove dead code from usb_deregister_dev() 2011-04-13 16:24:05 -07:00
generic.c USB: accept RNDIS configs if there's no alternative 2010-08-10 14:35:43 -07:00
hcd-pci.c Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 2011-03-16 15:04:26 -07:00
hcd.c USB: remove remaining usages of hcd->state from usbcore and fix regression 2011-05-19 16:34:04 -07:00
hub.c usbcore: warm reset USB3 port in SS.Inactive state 2011-05-02 16:42:54 -07:00
inode.c fs: dcache remove dcache_lock 2011-01-07 17:50:23 +11:00
message.c usb: Change usb_hcd->bandwidth_mutex to a pointer. 2011-03-13 18:07:14 -07:00
notify.c USB : correct comments in usb/core/notify.c 2008-02-01 14:34:44 -08:00
otg_whitelist.h USB: fix codingstyle issues in drivers/usb/core/*.h 2008-02-01 14:35:07 -08:00
quirks.c USB: Add quirk for Samsung Android phone modem 2011-02-17 10:30:24 -08:00
sysfs.c usb: core: Change usb_create_sysfs_intf_files()' return type to void 2011-04-29 17:24:38 -07:00
urb.c USB: Add support for SuperSpeed isoc endpoints 2011-03-13 18:23:57 -07:00
usb.c usb: core: Change usb_create_sysfs_intf_files()' return type to void 2011-04-29 17:24:38 -07:00
usb.h usb: core: Change usb_create_sysfs_intf_files()' return type to void 2011-04-29 17:24:38 -07:00