看板 DFBSD_commit 關於我們 聯絡資訊
commit cf5f3a81b0df75cd4844c3c89f008e209d59b218 Author: Matthew Dillon <dillon@apollo.backplane.com> Date: Tue Jun 9 11:47:54 2009 -0700 AHCI - Better reset sequencing, bug fixes * Change the reset sequence. If the first hardreset fails do a second hardreset. If that fails then try doing a softreset. This seems to catch all the cases. It is unclear why the reset sequence fails at random points but it seems to be a combination of the port command processor state and the device state. COMRESET does not actually reset everything like its supposed to. * Temporarily set ap_state to AP_S_NORMAL when starting a reset sequence so commands do not just fail due to a previously failed condition on the port. * Restoration of command register state now depends on whether the reset succeeded or failed. * Note that only SERR_DIAG_X needs to be cleared to allow for the next TFD update. These updates are serialized by the controller and there may be more then one. Add a function ahci_flush_tfd() which flushes all of them. * Add ahci_port_hardstop() for dealing with failed ports and device removals, instead of using ahci_port_hardreset(). This function tries to do multiple transitions via section 10.10.1. These transitions are not well documented by the standard. * Fix ahci_poll() to not queue a command if the port is in a failed state, as this really messes up our port processing state machine. Summary of changes: sys/dev/disk/ahci/ahci.c | 310 ++++++++++++++++++++++++++++++++++++---------- 1 files changed, 244 insertions(+), 66 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/cf5f3a81b0df75cd4844c3c89f008e209d59b218 -- DragonFly BSD source repository