Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/mpr/mpr_sas.c
Show First 20 Lines • Show All 237 Lines • ▼ Show 20 Lines | mprsas_alloc_tm(struct mpr_softc *sc) | ||||
MPR_FUNCTRACE(sc); | MPR_FUNCTRACE(sc); | ||||
tm = mpr_alloc_high_priority_command(sc); | tm = mpr_alloc_high_priority_command(sc); | ||||
return tm; | return tm; | ||||
} | } | ||||
void | void | ||||
mprsas_free_tm(struct mpr_softc *sc, struct mpr_command *tm) | mprsas_free_tm(struct mpr_softc *sc, struct mpr_command *tm) | ||||
{ | { | ||||
int target_id = 0xFFFFFFFF; | |||||
MPR_FUNCTRACE(sc); | MPR_FUNCTRACE(sc); | ||||
if (tm == NULL) | if (tm == NULL) | ||||
return; | return; | ||||
/* | /* | ||||
* For TM's the devq is frozen for the device. Unfreeze it here and | * For TM's the devq is frozen for the device. Unfreeze it here and | ||||
* free the resources used for freezing the devq. Must clear the | * free the resources used for freezing the devq. Must clear the | ||||
* INRESET flag as well or scsi I/O will not work. | * INRESET flag as well or scsi I/O will not work. | ||||
*/ | */ | ||||
if (tm->cm_targ != NULL) { | if (tm->cm_targ != NULL) { | ||||
tm->cm_targ->flags &= ~MPRSAS_TARGET_INRESET; | tm->cm_targ->flags &= ~MPRSAS_TARGET_INRESET; | ||||
target_id = tm->cm_targ->tid; | |||||
} | } | ||||
if (tm->cm_ccb) { | if (tm->cm_ccb) { | ||||
mpr_dprint(sc, MPR_INFO, "Unfreezing devq for target ID %d\n", | mpr_dprint(sc, MPR_INFO, "Unfreezing devq for target ID %d\n", | ||||
tm->cm_targ->tid); | target_id); | ||||
xpt_release_devq(tm->cm_ccb->ccb_h.path, 1, TRUE); | xpt_release_devq(tm->cm_ccb->ccb_h.path, 1, TRUE); | ||||
xpt_free_path(tm->cm_ccb->ccb_h.path); | xpt_free_path(tm->cm_ccb->ccb_h.path); | ||||
xpt_free_ccb(tm->cm_ccb); | xpt_free_ccb(tm->cm_ccb); | ||||
} | } | ||||
mpr_free_high_priority_command(sc, tm); | mpr_free_high_priority_command(sc, tm); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 3,277 Lines • Show Last 20 Lines |