sata_vsc: refactor vsc_sata_interrupt and hook up error handling
authorDan Williams <dan.j.williams@intel.com>
Fri, 23 Feb 2007 23:36:43 +0000 (16:36 -0700)
committerJeff Garzik <jeff@garzik.org>
Sun, 25 Feb 2007 01:54:26 +0000 (20:54 -0500)
commitea34e45a4670c4fa0da3442fc74789fd66c1201b
treeace85060ad169f4c48f2ba8e02e9f8c54f53e781
parente2f8fb72144a9f38d44ccf3f939e939392eda659
sata_vsc: refactor vsc_sata_interrupt and hook up error handling

Separate sata_vsc interrupt handling into a normal (per-port) path and an
error path with the addition of vsc_port_intr and vsc_error_intr
respectively.  The error path handles interrupt based
hotplug events which requires the definition of vsc_freeze and vsc_thaw.

Note: vsc_port_intr has a workaround for unexpected interrupts that occur
during polled commands.  This fixes a regression between 2.6.19 and 2.6.20.

Changes in take2:
* removed definition of invalid fis bit
* let standard ata-error-handling handle the serror register
* clear all unhandled interrupts
* revert changes to vsc_intr_mask_update (vsc_thaw enables all interrupts)
* use unlikely() for the pci-abort and not-our-interrupt cases in vsc_sata_interrupt

Changes in take3:
* Unify the "add" + "hook-up" patches into this single patch

[htejun@gmail.com: clean up comments and suggestions]
Cc: Jeremy Higdon <jeremy@sgi.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/sata_vsc.c