AHCI - Hot Plug support, ATAPI IDENTIFY, CAM bus scan issues, etc
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 6 Jun 2009 17:44:31 +0000 (10:44 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 6 Jun 2009 17:44:31 +0000 (10:44 -0700)
commitfd8bd95799cbcda4b7a5a16d41683d25ffc69422
tree1d81abe5735288cd65674c68f70e9fa6c3535654
parent419cb1ab6b58a7c9ea798a4b6eed871c8f2a248e
AHCI - Hot Plug support, ATAPI IDENTIFY, CAM bus scan issues, etc

* Split some code out of ahci_port_alloc() into its own procedure,
  ahci_port_init().  This procedure will be used to init/reinit a
  port for Hot-Plug.

* Do not free ports which have device problems, hot-plug can still
  operate on such ports.

* Re-detect ap_type when resetting a port.  Create a helper routine
  called ahci_port_signature_detect() to reduce code duplication.

* Augment ahci_cam_changed() so hot-plug can tell it whether a device
  is being added or removed.

* Scan the CAM bus asynchronously to fix reentrancy issues.

* Consolidate most of the ATAPI and DISK probe code back into one routine.

  Use ATA_C_ATAPI_IDENTIFY when probing an ATAPI device and also probe
  for NCQ on ATAPI devices (though nobody knows if it would actually work
  if an ATAPI device said it could do it).

* Do not try to set the security freeze-lock if the identify info
  indicates that the freeze-lock is already active.  This fixes a
  command timeout that occurs when re-plugging devices whos freeze-lock
  remains intact from a previous use.

* Add defines for ATA_C_ATAPI_IDENTIFY and ATA_SECURE_* identify bits.
sys/dev/disk/ahci/TODO
sys/dev/disk/ahci/ahci.c
sys/dev/disk/ahci/ahci.h
sys/dev/disk/ahci/ahci_cam.c
sys/dev/disk/ahci/atascsi.h