--- b/sys/cam/scsi/scsi_cd.c +++ b/sys/cam/scsi/scsi_cd.c @@ -1032,7 +1032,8 @@ cdstart(struct cam_periph *periph, union ccb *start_ccb) * If the CD is already locked, we don't need to do this. * Move on to the capacity check. */ - if ((softc->flags & CD_FLAG_DISC_LOCKED) != 0) { + if (softc->state == CD_STATE_MEDIA_PREVENT && + (softc->flags & CD_FLAG_DISC_LOCKED) != 0) { softc->state = CD_STATE_MEDIA_SIZE; xpt_release_ccb(start_ccb); xpt_schedule(periph, CAM_PRIORITY_NORMAL);