Disks can go missing until a reboot is done in some cases.

This is due to the DevHandle not being released, which causes the Firmware to
not allow that disk to be re-added.

Reviewed by:    ken, scottl, ambrisko, asomers
Approved by:	ken, scottl, ambrisko
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D6102
This commit is contained in:
slm 2016-05-09 16:36:40 +00:00
parent c299ac9344
commit 0a5339fd05

View File

@ -377,10 +377,8 @@ mprsas_remove_volume(struct mpr_softc *sc, struct mpr_command *tm)
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",
@ -566,8 +564,6 @@ mprsas_remove_device(struct mpr_softc *sc, struct mpr_command *tm)
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) {
@ -580,10 +576,8 @@ mprsas_remove_device(struct mpr_softc *sc, struct mpr_command *tm)
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",