diff options
author | truckman <truckman@FreeBSD.org> | 2007-08-12 18:45:24 +0000 |
---|---|---|
committer | truckman <truckman@FreeBSD.org> | 2007-08-12 18:45:24 +0000 |
commit | ac482a42e132d506af1a4fd3cf88b5af07fa96c5 (patch) | |
tree | 28615061eab47cfdd635b8a3c1f0aafa636ff4da /sbin/tunefs/tunefs.8 | |
parent | 43d47bd7967cb26165dd1d88bdebf43509c28c4c (diff) | |
download | FreeBSD-src-ac482a42e132d506af1a4fd3cf88b5af07fa96c5.zip FreeBSD-src-ac482a42e132d506af1a4fd3cf88b5af07fa96c5.tar.gz |
Replace three copies of the host controller reset sequence that
differ in their details with calls to a new function, ehci_hcreset(),
that performs the reset.
The original sequences either had no delay or a 1ms delay between
telling the controller to stop and asserting the controller reset
bit. One instance of the original reset sequence waited for the
controller to indicate that its reset was complete before continuing,
but the other two immediately let the subsequent code execute. The
latter is a problem on some hardware, because a read of the HCCPARAMS
register returns an incorrect value while the reset is in progress,
which triggers an infinite loop in ehci_pci_givecontroller(), which
hangs the system on shutdown.
The reset sequence in ehci_hcreset() starts with the most complete
instance from the original code, which contains a loop to wait for
the controller to indicate that its reset is complete. This appears
to be the correct thing to do according to "Enhanced Host Controller
Interface Specification for Universal Serial Bus" revision 1.0,
section 2.3.1. Add another loop to wait for the controller to
indicate that it has stopped before setting the HCRESET bit. This
is required by the section 2.3.1 in the specification, which says
that setting HCRESET before the controller has halted "will result
in undefined behaviour".
Reviewed by: imp (previous patch version without the extra wait loop)
Tested by: se (previous patch version without the extra wait loop)
Approved by: re (bmah)
MFC after: 1 week
Diffstat (limited to 'sbin/tunefs/tunefs.8')
0 files changed, 0 insertions, 0 deletions