aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/mpi3mr
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/mpi3mr')
-rw-r--r--sys/dev/mpi3mr/mpi3mr.c9
-rw-r--r--sys/dev/mpi3mr/mpi3mr_cam.c5
2 files changed, 8 insertions, 6 deletions
diff --git a/sys/dev/mpi3mr/mpi3mr.c b/sys/dev/mpi3mr/mpi3mr.c
index 99edd3542619..bcf8f46ddf5d 100644
--- a/sys/dev/mpi3mr/mpi3mr.c
+++ b/sys/dev/mpi3mr/mpi3mr.c
@@ -2799,10 +2799,11 @@ retry_init:
U32 fault = mpi3mr_regread(sc, MPI3_SYSIF_FAULT_OFFSET) &
MPI3_SYSIF_FAULT_CODE_MASK;
- if (fault == MPI3_SYSIF_FAULT_CODE_INSUFFICIENT_PCI_SLOT_POWER)
+ if (fault == MPI3_SYSIF_FAULT_CODE_INSUFFICIENT_PCI_SLOT_POWER) {
mpi3mr_dprint(sc, MPI3MR_INFO,
"controller faulted due to insufficient power, try by connecting it in a different slot\n");
goto err;
+ }
U32 host_diagnostic;
timeout = MPI3_SYSIF_DIAG_SAVE_TIMEOUT * 10;
@@ -4486,7 +4487,7 @@ static void mpi3mr_process_admin_reply_desc(struct mpi3mr_softc *sc,
Mpi3SuccessReplyDescriptor_t *success_desc;
Mpi3DefaultReply_t *def_reply = NULL;
struct mpi3mr_drvr_cmd *cmdptr = NULL;
- Mpi3SCSIIOReply_t *scsi_reply;
+ Mpi3SCSIIOReply_t *scsi_reply = NULL;
U8 *sense_buf = NULL;
*reply_dma = 0;
@@ -4589,7 +4590,7 @@ static void mpi3mr_process_admin_reply_desc(struct mpi3mr_softc *sc,
}
}
out:
- if (sense_buf != NULL)
+ if (scsi_reply != NULL && sense_buf != NULL)
mpi3mr_repost_sense_buf(sc,
scsi_reply->SenseDataBufferAddress);
return;
@@ -6161,7 +6162,7 @@ static int mpi3mr_issue_reset(struct mpi3mr_softc *sc, U16 reset_type,
{
int retval = -1;
U8 unlock_retry_count = 0;
- U32 host_diagnostic, ioc_status, ioc_config, scratch_pad0;
+ U32 host_diagnostic = 0, ioc_status, ioc_config, scratch_pad0;
U32 timeout = MPI3MR_RESET_ACK_TIMEOUT * 10;
if ((reset_type != MPI3_SYSIF_HOST_DIAG_RESET_ACTION_SOFT_RESET) &&
diff --git a/sys/dev/mpi3mr/mpi3mr_cam.c b/sys/dev/mpi3mr/mpi3mr_cam.c
index 77e25339a1a9..a5120e2788db 100644
--- a/sys/dev/mpi3mr/mpi3mr_cam.c
+++ b/sys/dev/mpi3mr/mpi3mr_cam.c
@@ -1856,10 +1856,11 @@ int mpi3mr_remove_device_from_os(struct mpi3mr_softc *sc, U16 handle)
"Poll reply queue once\n", target_outstanding, target->per_id);
mpi3mr_poll_pend_io_completions(sc);
target_outstanding = mpi3mr_atomic_read(&target->outstanding);
- if (target_outstanding)
+ if (target_outstanding) {
target_outstanding = mpi3mr_atomic_read(&target->outstanding);
mpi3mr_dprint(sc, MPI3MR_ERROR, "[%2d] outstanding IOs present on target: %d "
- "despite poll\n", target_outstanding, target->per_id);
+ "despite poll\n", target_outstanding, target->per_id);
+ }
}
if (target->exposed_to_os && !sc->reset_in_progress) {