diff options
Diffstat (limited to 'sys/cam/scsi/scsi_xpt.c')
-rw-r--r-- | sys/cam/scsi/scsi_xpt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/cam/scsi/scsi_xpt.c b/sys/cam/scsi/scsi_xpt.c index 74364f05f4b3..4fd25b2a101e 100644 --- a/sys/cam/scsi/scsi_xpt.c +++ b/sys/cam/scsi/scsi_xpt.c @@ -1171,6 +1171,7 @@ probedone(struct cam_periph *periph, union ccb *done_ccb) softc = (probe_softc *)periph->softc; path = done_ccb->ccb_h.path; priority = done_ccb->ccb_h.pinfo.priority; + cam_periph_assert(periph, MA_OWNED); switch (softc->action) { case PROBE_TUR: @@ -2549,8 +2550,8 @@ scsi_dev_advinfo(union ccb *start_ccb) if (device->physpath != NULL) { free(device->physpath, M_CAMXPT); device->physpath = NULL; + device->physpath_len = 0; } - device->physpath_len = cdai->bufsiz; /* Clear existing buffer if zero length */ if (cdai->bufsiz == 0) break; @@ -2559,6 +2560,7 @@ scsi_dev_advinfo(union ccb *start_ccb) start_ccb->ccb_h.status = CAM_REQ_ABORTED; return; } + device->physpath_len = cdai->bufsiz; memcpy(device->physpath, cdai->buf, cdai->bufsiz); } else { cdai->provsiz = device->physpath_len; |