Page MenuHomeFreeBSD

D6097.1775558165.diff
No OneTemporary

Size
3 KB
Referenced Files
None
Subscribers
None

D6097.1775558165.diff

Index: sys/dev/mpr/mpr.c
===================================================================
--- sys/dev/mpr/mpr.c
+++ sys/dev/mpr/mpr.c
@@ -1923,9 +1923,10 @@
*/
rel_rep =
(MPI2_DIAG_RELEASE_REPLY *)reply;
- if (le16toh(rel_rep->IOCStatus) ==
+ if ((le16toh(rel_rep->IOCStatus) &
+ MPI2_IOCSTATUS_MASK) ==
MPI2_IOCSTATUS_DIAGNOSTIC_RELEASED)
- {
+ {
pBuffer =
&sc->fw_diag_buffer_list[
rel_rep->BufferType];
Index: sys/dev/mpr/mpr_sas.c
===================================================================
--- sys/dev/mpr/mpr_sas.c
+++ sys/dev/mpr/mpr_sas.c
@@ -375,15 +375,16 @@
return;
}
- if (reply->IOCStatus != MPI2_IOCSTATUS_SUCCESS) {
+ if ((le16toh(reply->IOCStatus) & MPI2_IOCSTATUS_MASK) !=
+ MPI2_IOCSTATUS_SUCCESS) {
mpr_dprint(sc, MPR_FAULT, "IOCStatus = 0x%x while resetting "
- "device 0x%x\n", 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",
- reply->TerminationCount);
+ le32toh(reply->TerminationCount));
mpr_free_reply(sc, tm->cm_reply_data);
tm->cm_reply = NULL; /* Ensures the reply won't get re-freed */
@@ -396,7 +397,8 @@
* this target id if possible, and so we can assign the same target id
* to this device if it comes back in the future.
*/
- if (reply->IOCStatus == MPI2_IOCSTATUS_SUCCESS) {
+ if ((le16toh(reply->IOCStatus) & MPI2_IOCSTATUS_MASK) ==
+ MPI2_IOCSTATUS_SUCCESS) {
targ = tm->cm_targ;
targ->handle = 0x0;
targ->encl_handle = 0x0;
@@ -576,7 +578,8 @@
return;
}
- if (le16toh(reply->IOCStatus) != MPI2_IOCSTATUS_SUCCESS) {
+ if ((le16toh(reply->IOCStatus) & MPI2_IOCSTATUS_MASK) !=
+ MPI2_IOCSTATUS_SUCCESS) {
mpr_dprint(sc, MPR_FAULT, "IOCStatus = 0x%x while resetting "
"device 0x%x\n", le16toh(reply->IOCStatus), handle);
mprsas_free_tm(sc, tm);
@@ -661,7 +664,8 @@
* this target id if possible, and so we can assign the same target id
* to this device if it comes back in the future.
*/
- if (le16toh(reply->IOCStatus) == MPI2_IOCSTATUS_SUCCESS) {
+ if ((le16toh(reply->IOCStatus) & MPI2_IOCSTATUS_MASK) ==
+ MPI2_IOCSTATUS_SUCCESS) {
targ = tm->cm_targ;
targ->handle = 0x0;
targ->encl_handle = 0x0;
Index: sys/dev/mpr/mpr_user.c
===================================================================
--- sys/dev/mpr/mpr_user.c
+++ sys/dev/mpr/mpr_user.c
@@ -1257,12 +1257,14 @@
* Process POST reply.
*/
reply = (MPI2_DIAG_BUFFER_POST_REPLY *)cm->cm_reply;
- if (reply->IOCStatus != MPI2_IOCSTATUS_SUCCESS) {
+ if ((le16toh(reply->IOCStatus) & MPI2_IOCSTATUS_MASK) !=
+ MPI2_IOCSTATUS_SUCCESS) {
status = MPR_DIAG_FAILURE;
mpr_dprint(sc, MPR_FAULT, "%s: post of FW Diag Buffer failed "
"with IOCStatus = 0x%x, IOCLogInfo = 0x%x and "
- "TransferLength = 0x%x\n", __func__, reply->IOCStatus,
- reply->IOCLogInfo, reply->TransferLength);
+ "TransferLength = 0x%x\n", __func__,
+ le16toh(reply->IOCStatus), le32toh(reply->IOCLogInfo),
+ le32toh(reply->TransferLength));
goto done;
}
@@ -1341,12 +1343,13 @@
* Process RELEASE reply.
*/
reply = (MPI2_DIAG_RELEASE_REPLY *)cm->cm_reply;
- if ((reply->IOCStatus != MPI2_IOCSTATUS_SUCCESS) ||
- pBuffer->owned_by_firmware) {
+ if (((le16toh(reply->IOCStatus) & MPI2_IOCSTATUS_MASK) !=
+ MPI2_IOCSTATUS_SUCCESS) || pBuffer->owned_by_firmware) {
status = MPR_DIAG_FAILURE;
mpr_dprint(sc, MPR_FAULT, "%s: release of FW Diag Buffer "
"failed with IOCStatus = 0x%x and IOCLogInfo = 0x%x\n",
- __func__, reply->IOCStatus, reply->IOCLogInfo);
+ __func__, le16toh(reply->IOCStatus),
+ le32toh(reply->IOCLogInfo));
goto done;
}

File Metadata

Mime Type
text/plain
Expires
Tue, Apr 7, 10:36 AM (3 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28293874
Default Alt Text
D6097.1775558165.diff (3 KB)

Event Timeline