diff --git a/sys/cam/scsi/scsi_pass.c b/sys/cam/scsi/scsi_pass.c index c2133814eaab..b91b0556f10b 100644 --- a/sys/cam/scsi/scsi_pass.c +++ b/sys/cam/scsi/scsi_pass.c @@ -2261,7 +2261,9 @@ passsendccb(struct cam_periph *periph, union ccb *ccb, union ccb *inccb) /* sense_flags */ SF_RETRY_UA | SF_NO_PRINT, softc->device_stats); + cam_periph_unlock(periph); cam_periph_unmapmem(ccb, &mapinfo); + cam_periph_lock(periph); ccb->ccb_h.cbfcnp = NULL; ccb->ccb_h.periph_priv = inccb->ccb_h.periph_priv; diff --git a/sys/cam/scsi/scsi_sg.c b/sys/cam/scsi/scsi_sg.c index caa6c7c34314..c4812f247cd9 100644 --- a/sys/cam/scsi/scsi_sg.c +++ b/sys/cam/scsi/scsi_sg.c @@ -915,7 +915,9 @@ sgsendccb(struct cam_periph *periph, union ccb *ccb) SF_RETRY_UA, softc->device_stats); + cam_periph_unlock(periph); cam_periph_unmapmem(ccb, &mapinfo); + cam_periph_lock(periph); return (error); }