Index: sys/dev/mpi3mr/mpi3mr.c =================================================================== --- sys/dev/mpi3mr/mpi3mr.c +++ sys/dev/mpi3mr/mpi3mr.c @@ -867,6 +867,8 @@ { int retval = 0; U16 num_queues = 0, i = 0, qid; + U32 ioc_status; + enum mpi3mr_iocstate ioc_state; num_queues = min(sc->facts.max_op_reply_q, sc->facts.max_op_req_q); @@ -939,6 +941,14 @@ goto out_failed; } } + ioc_status = mpi3mr_regread(sc, MPI3_SYSIF_IOC_STATUS_OFFSET); + ioc_state = mpi3mr_get_iocstate(sc); + if ((ioc_status & MPI3_SYSIF_IOC_STATUS_RESET_HISTORY) || + ioc_state != MRIOC_STATE_READY) { + mpi3mr_print_fault_info(sc); + retval = -1; + goto out_failed; + } mpi3mr_dprint(sc, MPI3MR_INFO, "Successfully created %d Operational Queue pairs\n", sc->num_queues);