When deregistering a bus, attempt to flush out all outstanding
authorPeter Avalos <pavalos@dragonflybsd.org>
Sun, 2 Dec 2007 00:30:35 +0000 (00:30 +0000)
committerPeter Avalos <pavalos@dragonflybsd.org>
Sun, 2 Dec 2007 00:30:35 +0000 (00:30 +0000)
commitc8f7fab0d33319abf2e02d983ce0d8ae4fb1a860
tree3dfe739b8a6e805971e607272052f5a6910a6a26
parentbaa93599f97b9e9220d4d14234a2caab8b465eac
When deregistering a bus, attempt to flush out all outstanding
operations before returning. Point the bus at a dummy cam_sim
structure so that any CCBs will complete immediately with a
CAM_DEV_NOT_THERE status, and ensure that any xpt_schedule() calls
on the bus's devices will immediately call the peripheral's
periph_start() routine. Also repeat the async messages because
devices that were part of the way through being probed may appear
after the original AC_LOST_DEVICE was sent, and would otherwise
never go away.

Obtained-from: FreeBSD
sys/bus/cam/cam_xpt.c