DragonFly- master sys/dev/disk/ahci ahci.c ahci.h ahci_cam.c

Matthew Dillon dillon at crater.dragonflybsd.org
Tue Jun 9 01:59:25 PDT 2009

commit 17eab71eccd5f3dda84b5d70ba6e7156732915c1
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Tue Jun 9 01:50:36 2009 -0700

    AHCI bug fixes & enhancements.  port_init, port_stop, port_start, etc.
    * When initializing the AHCI device do an unconditional reset instead of
      a conditional reset.  The previous conditional reset did not cover
      all the bases and could result in an unusable device.
    * Remove the second (unused) argument from ahci_port_start().
    * ahci_port_init()  - init/reinit common code.  If the hard reset
      fails try a second time before giving up.  Devices can get into
      weird states and two attempts seems to clear it up.
    * ahci_port_start() - FRE must be turned on before ST.   Wait for FR
      to come up before turning on ST.  The spec does not require this but
      it saves us from a race in ahci_port_stop() so do it anyway.
    * ahci_port_stop() - When turning off ST we must wait for CR to go
      inactive before we can turn off FRE.
    * ahci_port_free() - Properly sequence stopping of the port by calling
    * Create a consolidated ahci_port_reset() call to clean up some of the
      code paths.

Summary of changes:
 sys/dev/disk/ahci/ahci.c     |  214 +++++++++++++++++++++++++++---------------
 sys/dev/disk/ahci/ahci.h     |    3 +-
 sys/dev/disk/ahci/ahci_cam.c |    5 +-
 3 files changed, 141 insertions(+), 81 deletions(-)


DragonFly BSD source repository

More information about the Commits mailing list