Require and enforce that dareprobe() has to be called with the periph lock held.
Reviewed by: scottl, ken Differential Revision: https://reviews.freebsd.org/D22295
This commit is contained in:
parent
fb6ea34a3a
commit
fe95666bab
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=354621
@ -2133,8 +2133,8 @@ daasync(void *callback_arg, u_int32_t code,
|
||||
"Capacity data has changed\n");
|
||||
cam_periph_lock(periph);
|
||||
softc->flags &= ~DA_FLAG_PROBED;
|
||||
cam_periph_unlock(periph);
|
||||
dareprobe(periph);
|
||||
cam_periph_unlock(periph);
|
||||
} else if (asc == 0x28 && ascq == 0x00) {
|
||||
cam_periph_lock(periph);
|
||||
softc->flags &= ~DA_FLAG_PROBED;
|
||||
@ -2145,8 +2145,8 @@ daasync(void *callback_arg, u_int32_t code,
|
||||
"INQUIRY data has changed\n");
|
||||
cam_periph_lock(periph);
|
||||
softc->flags &= ~DA_FLAG_PROBED;
|
||||
cam_periph_unlock(periph);
|
||||
dareprobe(periph);
|
||||
cam_periph_unlock(periph);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -5827,6 +5827,8 @@ dareprobe(struct cam_periph *periph)
|
||||
|
||||
softc = (struct da_softc *)periph->softc;
|
||||
|
||||
cam_periph_assert(periph, MA_OWNED);
|
||||
|
||||
/* Probe in progress; don't interfere. */
|
||||
if (softc->state != DA_STATE_NORMAL)
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user