kernel - Fix three AHCI bugs
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 23 Mar 2012 04:31:31 +0000 (21:31 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 23 Mar 2012 04:31:31 +0000 (21:31 -0700)
commit3d102df7db4f442f9921757788d791d3ec0ebca0
tree3fc19ca53c71290cb36d570e6f1eddd4173d0405
parent9de13b88006e48f96c997b0ed454a1ec9971ecd7
kernel - Fix three AHCI bugs

* This fixes spurious timeouts which occur on SMP boxes with faster devices
  (such as SSDs or more recent hard drives)

* The global interrupt status register appears to be latched on some parts
  rather than wire-or.  Clearing it after signaling the port threads or
  processing the interrupt can cause interrupts to be lost.

* In cases where it is actually wire-or we may get a double-interrupt,
  but stability is more important here.

* Fix the port signaling code.  The mask was being cleared with the
  port interlock released.  It has to be cleared when the interlock is
  held.

* Reorder the per-port interrupt status register clearing code in two
  places to execute before processing the operation rather than after,
  which may fix another source of lost interrupts.
sys/dev/disk/ahci/ahci.c
sys/dev/disk/ahci/ahci_dragonfly.c