Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/mpr/mpr_sas.c
Show First 20 Lines • Show All 371 Lines • ▼ Show 20 Lines | if (reply == NULL) { | ||||
mpr_dprint(sc, MPR_FAULT, "%s NULL reply resetting device " | mpr_dprint(sc, MPR_FAULT, "%s NULL reply resetting device " | ||||
"0x%04x\n", __func__, handle); | "0x%04x\n", __func__, handle); | ||||
mprsas_free_tm(sc, tm); | mprsas_free_tm(sc, tm); | ||||
return; | return; | ||||
} | } | ||||
if ((le16toh(reply->IOCStatus) & MPI2_IOCSTATUS_MASK) != | if ((le16toh(reply->IOCStatus) & MPI2_IOCSTATUS_MASK) != | ||||
MPI2_IOCSTATUS_SUCCESS) { | MPI2_IOCSTATUS_SUCCESS) { | ||||
mpr_dprint(sc, MPR_FAULT, "IOCStatus = 0x%x while resetting " | mpr_dprint(sc, MPR_ERROR, "IOCStatus = 0x%x while resetting " | ||||
"device 0x%x\n", le16toh(reply->IOCStatus), handle); | "device 0x%x\n", le16toh(reply->IOCStatus), handle); | ||||
mprsas_free_tm(sc, tm); | |||||
return; | |||||
} | } | ||||
mpr_dprint(sc, MPR_XINFO, "Reset aborted %u commands\n", | mpr_dprint(sc, MPR_XINFO, "Reset aborted %u commands\n", | ||||
le32toh(reply->TerminationCount)); | le32toh(reply->TerminationCount)); | ||||
mpr_free_reply(sc, tm->cm_reply_data); | mpr_free_reply(sc, tm->cm_reply_data); | ||||
tm->cm_reply = NULL; /* Ensures the reply won't get re-freed */ | tm->cm_reply = NULL; /* Ensures the reply won't get re-freed */ | ||||
mpr_dprint(sc, MPR_XINFO, "clearing target %u handle 0x%04x\n", | mpr_dprint(sc, MPR_XINFO, "clearing target %u handle 0x%04x\n", | ||||
▲ Show 20 Lines • Show All 169 Lines • ▼ Show 20 Lines | mprsas_remove_device(struct mpr_softc *sc, struct mpr_command *tm) | ||||
* Currently there should be no way we can hit this case. It only | * Currently there should be no way we can hit this case. It only | ||||
* happens when we have a failure to allocate chain frames, and | * happens when we have a failure to allocate chain frames, and | ||||
* task management commands don't have S/G lists. | * task management commands don't have S/G lists. | ||||
*/ | */ | ||||
if ((tm->cm_flags & MPR_CM_FLAGS_ERROR_MASK) != 0) { | if ((tm->cm_flags & MPR_CM_FLAGS_ERROR_MASK) != 0) { | ||||
mpr_dprint(sc, MPR_ERROR, "%s: cm_flags = %#x for remove of " | mpr_dprint(sc, MPR_ERROR, "%s: cm_flags = %#x for remove of " | ||||
"handle %#04x! This should not happen!\n", __func__, | "handle %#04x! This should not happen!\n", __func__, | ||||
tm->cm_flags, handle); | tm->cm_flags, handle); | ||||
mprsas_free_tm(sc, tm); | |||||
return; | |||||
} | } | ||||
if (reply == NULL) { | if (reply == NULL) { | ||||
/* XXX retry the remove after the diag reset completes? */ | /* XXX retry the remove after the diag reset completes? */ | ||||
mpr_dprint(sc, MPR_FAULT, "%s NULL reply resetting device " | mpr_dprint(sc, MPR_FAULT, "%s NULL reply resetting device " | ||||
"0x%04x\n", __func__, handle); | "0x%04x\n", __func__, handle); | ||||
mprsas_free_tm(sc, tm); | mprsas_free_tm(sc, tm); | ||||
return; | return; | ||||
} | } | ||||
if ((le16toh(reply->IOCStatus) & MPI2_IOCSTATUS_MASK) != | if ((le16toh(reply->IOCStatus) & MPI2_IOCSTATUS_MASK) != | ||||
MPI2_IOCSTATUS_SUCCESS) { | MPI2_IOCSTATUS_SUCCESS) { | ||||
mpr_dprint(sc, MPR_FAULT, "IOCStatus = 0x%x while resetting " | mpr_dprint(sc, MPR_ERROR, "IOCStatus = 0x%x while resetting " | ||||
"device 0x%x\n", le16toh(reply->IOCStatus), handle); | "device 0x%x\n", le16toh(reply->IOCStatus), handle); | ||||
mprsas_free_tm(sc, tm); | |||||
return; | |||||
} | } | ||||
mpr_dprint(sc, MPR_XINFO, "Reset aborted %u commands\n", | mpr_dprint(sc, MPR_XINFO, "Reset aborted %u commands\n", | ||||
le32toh(reply->TerminationCount)); | le32toh(reply->TerminationCount)); | ||||
mpr_free_reply(sc, tm->cm_reply_data); | mpr_free_reply(sc, tm->cm_reply_data); | ||||
tm->cm_reply = NULL; /* Ensures the reply won't get re-freed */ | tm->cm_reply = NULL; /* Ensures the reply won't get re-freed */ | ||||
/* Reuse the existing command */ | /* Reuse the existing command */ | ||||
▲ Show 20 Lines • Show All 2,958 Lines • Show Last 20 Lines |