Do not destroy the device queue, it is needed by the peripheral code
commitbe1c3c46efb6567ce98cbd56fcba29923f3fdbe7
authorMatthew Dillon <dillon@dragonflybsd.org>
Thu, 14 Jun 2007 01:09:30 +0000 (14 01:09 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Thu, 14 Jun 2007 01:09:30 +0000 (14 01:09 +0000)
treebfb68d8839887e7d55961d29d99083a7f5030047
parente9aae4a23f6c8eeb0e6bf4608634f5aeec17dee2
Do not destroy the device queue, it is needed by the peripheral code
(e.g. scsi/scsi_da.c, etc) even if the backend hardware has disappeared.
When cam_sim_free() is called, set up a dummy poll and action callback
and make the action callback generate an I/O error.

This allows things like filesystem mounts of USB memory sticks to start
returning I/O errors instead of blocking forever if the stick is pulled.
sys/bus/cam/cam_sim.c
sys/bus/cam/cam_sim.h