diff options
author | David Brownell <david-b@pacbell.net> | 2006-01-20 17:35:55 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-03-20 17:49:55 -0500 |
commit | d0852299381326c5d8eb67771aa98108050e6901 (patch) | |
tree | e4965e920fceeada861e5722228eb4472627c991 | |
parent | d5fb7f1b5b832946eaf450b2a695ec3e7fd2d351 (diff) |
[PATCH] USB: EHCI unlink tweaks
This patch modifies the behavior of the EHCI driver in an unlink path
that seems to be causing various issues on some systems. Those problems
have included issues with disconnection, driver unbinding, and similar
cases where urb unlinking would just not work right.
This patch should help avoid those problems by not turning off the async
(control/bulk) schedule until it's not expecting an "async advance" IRQ,
which comes from the processing passing the schedule head. Whether the
driver attempts to do such things is dependent on system timings, so
many folk would never have seen these problems.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/usb/host/ehci-q.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c index 6e28e593c044..5ada7cd5698b 100644 --- a/drivers/usb/host/ehci-q.c +++ b/drivers/usb/host/ehci-q.c | |||
@@ -1022,12 +1022,14 @@ static void start_unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh) | |||
1022 | /* stop async schedule right now? */ | 1022 | /* stop async schedule right now? */ |
1023 | if (unlikely (qh == ehci->async)) { | 1023 | if (unlikely (qh == ehci->async)) { |
1024 | /* can't get here without STS_ASS set */ | 1024 | /* can't get here without STS_ASS set */ |
1025 | if (ehci_to_hcd(ehci)->state != HC_STATE_HALT) { | 1025 | if (ehci_to_hcd(ehci)->state != HC_STATE_HALT |
1026 | && !ehci->reclaim) { | ||
1027 | /* ... and CMD_IAAD clear */ | ||
1026 | writel (cmd & ~CMD_ASE, &ehci->regs->command); | 1028 | writel (cmd & ~CMD_ASE, &ehci->regs->command); |
1027 | wmb (); | 1029 | wmb (); |
1028 | // handshake later, if we need to | 1030 | // handshake later, if we need to |
1031 | timer_action_done (ehci, TIMER_ASYNC_OFF); | ||
1029 | } | 1032 | } |
1030 | timer_action_done (ehci, TIMER_ASYNC_OFF); | ||
1031 | return; | 1033 | return; |
1032 | } | 1034 | } |
1033 | 1035 | ||