Do not destroy the device queue, it is needed by the peripheral code
authorMatthew Dillon <dillon@dragonflybsd.org>
Thu, 14 Jun 2007 01:09:30 +0000 (01:09 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Thu, 14 Jun 2007 01:09:30 +0000 (01:09 +0000)
commit0cdc0aefd16b096f1644d8bc5497b2165d551fd6
tree33b4ad91a578590abbae9f6b3e89f683b2a9ae94
parent41cf35027836a1069b13a99d472d8d35c1e13781
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