AHCI - properly initialize ccb_xa.flags in softreset, make poll code robust
authorMatthew Dillon <dillon@apollo.backplane.com>
Sun, 7 Jun 2009 19:36:35 +0000 (12:36 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 7 Jun 2009 19:36:35 +0000 (12:36 -0700)
commit5f8c1efd092f1039f63ce166e87fce744882a390
tree97c2297f291ede988eebee8003dbffac8fc53a22
parent4492a4a2203203415eb4ba98bae0d61fc6e812f4
AHCI - properly initialize ccb_xa.flags in softreset, make poll code robust

* The softreset code did not properly initialize ccb_xa.flags, causing
  the softreset FIS's to sometimes get queued as an NCQ command instead of
  as a non-NCQ command.

* Make ahci_poll() a bit more robust.  Properly set ccb_xa.state on
  timeout, check for unexpected completions, and check to see if the
  ccb was put on a queue (though the latter should never happen since
  active/sactive is cleared by ahci_get_err_ccb()).
sys/dev/disk/ahci/ahci.c