nata - properly teardown interrupts on ENXIO
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 29 Oct 2010 06:23:48 +0000 (23:23 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 29 Oct 2010 06:23:48 +0000 (23:23 -0700)
commit47dc608a12063f0375f80c19aa6b85f48094b8ac
treefa1b7c170dbc3b3e23838a7b750733599ab2acbf
parentf70f1d6b9857f66df6200d7a857480b31c48b56e
nata - properly teardown interrupts on ENXIO

* When a ata controller cannot be attached (e.g. due to AHCI having
  already taken its resources) be sure to teardown and release any
  resources that had been obtained.

* This fixes a panic on certain motherboards (e.g. gigabyte / phenomX6)
  where the ata controller ENXIO'd but left interrupt handlers setup.
  An interrupt would then occur, access stale memory, and blow the machine
  up.
sys/dev/disk/nata/ata-chipset.c
sys/dev/disk/nata/ata-pci.c