The XXopen() methods of the da, sa etc drivers get a reference to
the peripheral ("periph") through cam_periph_acquire() and don't
release it on error exit. I suspect this leads to CAM wedge if the
device is removed when its driver is in XXopen(). That is because
the "periph" stays acquired (refcount > 0), but the XXopen() caller
wouldn't invoke XXclose() subsequently since it sees XXopen() having
failed. Thus CAM won't ever "forget" the device removed.
Moreover, after I had patched daopen() to release the peripheral
if returning non-zero error code, the CAM wedge has gone.
Your approach sounds correct to me. open should call cam_periph_release
if it errors out after cam_periph_acquire. Care to submit a patch?
To Unsubscribe: send mail to majo...@FreeBSD.org
with "unsubscribe freebsd-scsi" in the body of the message