Do not destroy the device queue, it is needed by the peripheral code
commit8b6f04169b0ced7525630df021fc587bddf5ed69
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)
tree07ac13a50c8508e9c31554fde165d111754a4d33
parentb3537bd5f4d4ba48889521676762fc42fcb18ac6
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