diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2013-08-01 21:09:28 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-01 21:37:07 (GMT) |
commit | 6753f4cf29046f4a2ae68c3a93bf6e6e6dce9fb7 (patch) | |
tree | 37d15d48d057c017b1b1daac4a4ad40339ddb7e4 /Documentation/blackfin | |
parent | 3a20446f02bfb71d68ae9ec673268bb7823f878c (diff) | |
download | linux-6753f4cf29046f4a2ae68c3a93bf6e6e6dce9fb7.tar.xz |
USB: EHCI: don't depend on hardware for tracking port resets and resumes
In theory, an EHCI controller can turn off the PORT_RESUME or
PORT_RESET bits in a port status register all by itself (and some
controllers actually do this). We shouldn't depend on these bits
being set correctly.
This patch rearranges the code in ehci-hcd that handles completion of
port resets and resumes. We guarantee that ehci->reset_done[portnum]
is nonzero if a reset or resume is in progress, and that the portnum
bit is set in ehci->resuming_ports if the operation is a resume. (To
help enforce this guarantee, the patch prevents suspended ports from
being reset.) Therefore it's not necessary to look at the port status
bits to learn what's going on.
The patch looks bigger than it really is, because it changes the
indentation level of a sizeable region of code. Most of what it
actually does is interchange some tests. The only functional changes
are testing reset_done and resuming_ports rather than PORT_RESUME and
PORT_RESET, removing a now-unnecessary check for spontaneous
resets of the PORT_RESUME and PORT_RESET bits, and preventing a
suspended or resuming port from being reset.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation/blackfin')
0 files changed, 0 insertions, 0 deletions