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:55:33 +0000 (12:55 -0800)
commite27434d7864e9fb4463c99205dbd3eff78bdcae7
tree89fa9e63f2d1d2e42ccf1d4abd7ef1213e4d88bb
parent4c69c8bcb3b2fb2dd5c78d5902b9adfcea766268
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