Commands for user-initated device resets should come from the high-priority

allocator.  Prior to this change, they would leak from the normal allocator.
This commit is contained in:
Scott Long 2018-12-24 05:54:36 +00:00
parent b7f1ee7970
commit 3921a9f75c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=342387
2 changed files with 4 additions and 4 deletions

View File

@ -3312,7 +3312,7 @@ mprsas_action_resetdev(struct mprsas_softc *sassc, union ccb *ccb)
KASSERT(ccb->ccb_h.target_id < sassc->maxtargets, ("Target %d out of "
"bounds in XPT_RESET_DEV\n", ccb->ccb_h.target_id));
sc = sassc->sc;
tm = mpr_alloc_command(sc);
tm = mprsas_alloc_tm(sc);
if (tm == NULL) {
mpr_dprint(sc, MPR_ERROR, "command alloc failure in "
"mprsas_action_resetdev\n");
@ -3337,8 +3337,8 @@ mprsas_action_resetdev(struct mprsas_softc *sassc, union ccb *ccb)
mpr_dprint(sc, MPR_INFO, "%s: Sending reset for target ID %d\n",
__func__, targ->tid);
tm->cm_targ = targ;
targ->flags |= MPRSAS_TARGET_INRESET;
mprsas_prepare_for_tm(sc, cm, targ, CAM_LUN_WILDCARD);
mpr_map_command(sc, tm);
}

View File

@ -3057,7 +3057,7 @@ mpssas_action_resetdev(struct mpssas_softc *sassc, union ccb *ccb)
("Target %d out of bounds in XPT_RESET_DEV\n",
ccb->ccb_h.target_id));
sc = sassc->sc;
tm = mps_alloc_command(sc);
tm = mpssas_alloc_tm(sc);
if (tm == NULL) {
mps_dprint(sc, MPS_ERROR,
"command alloc failure in mpssas_action_resetdev\n");
@ -3079,8 +3079,8 @@ mpssas_action_resetdev(struct mpssas_softc *sassc, union ccb *ccb)
tm->cm_complete = mpssas_resetdev_complete;
tm->cm_complete_data = ccb;
tm->cm_targ = targ;
targ->flags |= MPSSAS_TARGET_INRESET;
mpssas_prepare_for_tm(sc, tm, targ, CAM_LUN_WILDCARD);
mps_map_command(sc, tm);
}