kernel - Fix SILI callout timer race
authorMatthew Dillon <dillon@apollo.backplane.com>
Mon, 23 Jan 2012 20:55:33 +0000 (12:55 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Mon, 23 Jan 2012 20:59:40 +0000 (12:59 -0800)
commitca0a66e567cbeb1b974a2feb7c2176464d7fb6b1
treeef0512351fa1f859422469477189fb5f82d7d501
parent231c3428b3c507648a171aed6d41eabb5b3ee113
kernel - Fix SILI callout timer race

* Do similar fix for SILI that we did for AHCI.

* callout_stop_sync() can block.  If this occurs a race can cause a
  CCB to be processed for completion twice.

* Add a serial number to detect this situation.

* If the serial number does not match after the timeout is stopped
   we don't want to mess with the xa at all.

Tested-by: lentferj
sys/dev/disk/sili/atascsi.h
sys/dev/disk/sili/sili.c