freebsd-dev/sys/cam
Ian Dowse d3ef345454 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.

These changes make it possible to deregister a bus and free the SIM
at most stages during bus probing without the usual crashes in
camisr(). In particular, plugging in a umass device and then
unplugging it as soon as the first probe messages appeared would
almost always result in a crash. Now the device just goes away with
a few CAM errors and all references to the CAM bus, target and
device are dropped correctly.
2006-01-11 02:06:08 +00:00
..
scsi Style nit. 2005-12-19 03:43:48 +00:00
cam_ccb.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
cam_debug.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
cam_periph.c There should be no need to retry when the CCB status code is 2006-01-08 20:04:55 +00:00
cam_periph.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
cam_queue.c - Providing fine-grained malloc statistic by replacing M_DEVBUF with 2005-07-01 15:21:30 +00:00
cam_queue.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
cam_sim.c - Providing fine-grained malloc statistic by replacing M_DEVBUF with 2005-07-01 15:21:30 +00:00
cam_sim.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
cam_xpt_periph.h - Providing fine-grained malloc statistic by replacing M_DEVBUF with 2005-07-01 15:21:30 +00:00
cam_xpt_sim.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
cam_xpt.c When deregistering a bus, attempt to flush out all outstanding 2006-01-11 02:06:08 +00:00
cam_xpt.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
cam.c Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
cam.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00