AHCI - Hotplug. Increase timeout for BSY check, FIS adjusts for softreset, CAM
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 6 Jun 2009 22:45:14 +0000 (15:45 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 6 Jun 2009 22:45:14 +0000 (15:45 -0700)
commitcec85a37534fc8449308734c4d53fe8a31c2772c
tree649746cbc1dbe4bd2cc71a0e8bc71cd6cdfe4ed9
parenta37888c929b1be5e472597048dd0ee2e395aca65
AHCI - Hotplug.  Increase timeout for BSY check, FIS adjusts for softreset, CAM

* Wait up to 3 seconds for BSY to clear.  1 second was not enough when
  powering up an external 2.5" drive already connected to the port.

* It is unclear how other fields in the FIS should be initialized when
  performing a soft reset.  Zero the fields instead of inheriting whatever
  junk was in the FIS from prior commands.  This seems to fix random
  errors from unplugging and plugging in a "My Book".

* Adjust the CAM devq to ensure that one ata_xfer remains available for error
  processing.  Do not clean out the devq when reducing the number of tags to
  1 as we will not use NCQ in this case anyway and need the extra CCB for
  error processing.
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