AHCI - Implement parallel port scan and thread each port interrupt.
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 12 Jun 2009 21:45:35 +0000 (14:45 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 12 Jun 2009 21:45:35 +0000 (14:45 -0700)
commitf4553de13c8796ae9536441d5de2afa0aa352699
tree5052d7b825b9ba84a2818a808a13fef5fbd4e7b6
parent349309161cb36568364827741349e2d011f0c461
AHCI - Implement parallel port scan and thread each port interrupt.

* Implement a thread helper for each port.  The master interrupt will perform
  all actions which can be done without blocking and will delegate any
  remaining actions (typically error and timeout handling) to the
  port's thread helper.

* The thread helper is responsible for the initial probe.  Thus ALL AHCI
  SATA PORTS WILL NOW PROBE IN PARALLEL!  Instead of 6 ports each taking
  2 seconds to probe we now have 6 ports probing in a total of 2 seconds.

* Multiple port multipliers will probe in parallel, but targets on each
  one have to be iterated.

* The attach code waits for all ports to fully probe and then runs CAM
  attachments serially.  This step goes very quickly since the ports
  have already probed.

* Stalls on one physical port will no longer stall the rest of the ports.
  So, for example, stalls on the port connected to your port multiplier
  will not effect operations on, say, your internal SATA ports.
sys/dev/disk/ahci/ahci.c
sys/dev/disk/ahci/ahci.h
sys/dev/disk/ahci/ahci_attach.c
sys/dev/disk/ahci/ahci_cam.c
sys/dev/disk/ahci/ahci_dragonfly.c
sys/dev/disk/ahci/ahci_dragonfly.h
sys/dev/disk/ahci/atascsi.h