DragonFly-2.3.1.212.gcf5f3 master sys/dev/disk/ahci ahci.c

看板DFBSD_commit作者時間16年前 (2009/06/10 03:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
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
文章代碼(AID): #1ABh5s00 (DFBSD_commit)