kernel - AHCI hotplug work to help support AMD chipsets
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 23 Nov 2010 02:25:33 +0000 (18:25 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 23 Nov 2010 02:39:53 +0000 (18:39 -0800)
commit5502cf2442bc10db6925a4db0956131ae634ec95
tree8048c75adc950e801b1b21406e5c81bb9794988e
parent493d3201ad53fca9e31c39c1480f9a6b38891cb4
kernel - AHCI hotplug work to help support AMD chipsets

* Change the Hot-plug mechanics to something which appears to work for
  both NVidia and AMD AHCI chipsets, and hopefully Intel too (untested).

  This appears to fix hot-plug for AMD's SB850-based AHCI (circa AM3 socket
  mobos).

* Basically the SCTL.DET and CMD.SUD bits control the behavior of the
  SATA Phy, but in typical Intel fashion the specification is seriously
  lacking on how events such as hot-plug are handled based on what state
  the phy is in.

  Previously we were looking for phy transition events while holding
  the port in the RESET state (DET=1, SUD=1), which worked up till this
  point.  But it doesn't work with AMD's SB850-based AHCI.

  Now we are attempting to do the same thing with the port in
  the SPIN-UP/NORMAL state (DET=0, SUD=1).

* The AHCI documentation wants us to use the LISTEN mode (DET=0, SUD=0)
  and get a SERR.DIAG.X event for hot-plug but this doesn't seem to work
  very reliably.  In fact, 10.10.4 is ambiguous for the case
  where Staggered-spin-up is not supported since SUD is wired to '1'
  in that case (making LISTEN mode impossible).
sys/dev/disk/ahci/ahci.c