git: ahci - Implement FBS for port-multipliers

Matthew Dillon dillon at
Mon Dec 19 10:20:53 PST 2016

commit 8119d5f597081d0e718c4fa67ac9e59304a2e062
Author: Matthew Dillon <dillon at>
Date:   Mon Dec 19 10:08:06 2016 -0800

    ahci - Implement FBS for port-multipliers
    * Implement FBS (FIS-Based Switching) for port-multipliers.  If the
      chipset supports it, the ahci driver now turns on FBS mode which
      allows us to queue concurrent requests to different targets.
      Most AHCI chipsets do not support FBS resulting in poor port-multiplier
      - FBS is enabled in the PM probe.
      - FBS must be disabled when doing a hard reset.
      - In FBS mode commands must be queued to PREG_CI one at a time,
        and the target must be written to AHCI_PREG_FBS prior to activation
        via CI.
      - RFIS area is larger, and RFIS responses are copied from the
        appropriate target index instead of index 0.
      - Issue a COMRESET during the PM probe if a BSY status is
        recognized, which helps on chipsets which do not implement
        the SCLO cap.
    * Clean-up a little logic in ahci_port_stop().
    * Use the saved sc_cap to check for the SCLO capability instead of
      re-reading AHCI_REG_CAP in a few places.
    * Dump the RFIS data to the console on error.
    * Fixup sc_cap to directly incorporate quirks.

Summary of changes:
 sys/dev/disk/ahci/ahci.c        | 147 ++++++++++++++++++++++++++++++++++------
 sys/dev/disk/ahci/ahci.h        |   3 +
 sys/dev/disk/ahci/ahci_attach.c |   9 ++-
 sys/dev/disk/ahci/ahci_pm.c     | 110 ++++++++++++++++++++++++------
 4 files changed, 225 insertions(+), 44 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list