mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
mpi3mr: Only set callout_owned when we create a timeout
Since we assume there's a timeout to cancel when this is true, only set it true when we set the timeout. Otherwise we may try to cancel a timeout when there's been an error in submission. Sponsored by: Netflix Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D42541 (cherry picked from commit 1cfd01111eb6a28ca5043e928aa8e9099064177a)
This commit is contained in:
parent
3c12997a1c
commit
c351a6ec91
1 changed files with 3 additions and 3 deletions
|
|
@ -1223,15 +1223,15 @@ mpi3mr_action_scsiio(struct mpi3mr_cam_softc *cam_sc, union ccb *ccb)
|
|||
mpi3mr_set_ccbstatus(ccb, CAM_RESRC_UNAVAIL);
|
||||
xpt_done(ccb);
|
||||
} else {
|
||||
callout_reset_sbt(&cm->callout, SBT_1S * 90 , 0,
|
||||
mpi3mr_scsiio_timeout, cm, 0);
|
||||
callout_reset_sbt(&cm->callout, mstosbt(ccb->ccb_h.timeout), 0,
|
||||
mpi3mr_scsiio_timeout, cm, 0);
|
||||
cm->callout_owner = true;
|
||||
mpi3mr_atomic_inc(&sc->fw_outstanding);
|
||||
mpi3mr_atomic_inc(&targ->outstanding);
|
||||
if (mpi3mr_atomic_read(&sc->fw_outstanding) > sc->io_cmds_highwater)
|
||||
sc->io_cmds_highwater++;
|
||||
}
|
||||
|
||||
cm->callout_owner = true;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue