Print this page
7813 mpt_sas does not like concurrent HBA resets

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/scsi/adapters/mpt_sas/mptsas_impl.c
          +++ new/usr/src/uts/common/io/scsi/adapters/mpt_sas/mptsas_impl.c
↓ open down ↓ 594 lines elided ↑ open up ↑
 595  595  
 596  596          if (cmd && (cmd->cmd_flags & CFLAG_PREPARED)) {
 597  597                  mptsas_remove_cmd(mpt, cmd);
 598  598                  config_flags &= (~MPTSAS_REQUEST_POOL_CMD);
 599  599          }
 600  600          if (config_flags & MPTSAS_REQUEST_POOL_CMD)
 601  601                  mptsas_return_to_pool(mpt, cmd);
 602  602  
 603  603          if (config_flags & MPTSAS_CMD_TIMEOUT) {
 604  604                  mpt->m_softstate &= ~MPTSAS_SS_MSG_UNIT_RESET;
 605      -                if ((mptsas_restart_ioc(mpt)) == DDI_FAILURE) {
 606      -                        mptsas_log(mpt, CE_WARN, "mptsas_restart_ioc failed");
      605 +                if ((mptsas_reset_handler(mpt)) == DDI_FAILURE) {
      606 +                        mptsas_log(mpt, CE_WARN, "mptsas_reset_handler failed");
 607  607                  }
 608  608          }
 609  609  
 610  610          return (rval);
 611  611  }
 612  612  
 613  613  int
 614  614  mptsas_send_config_request_msg(mptsas_t *mpt, uint8_t action, uint8_t pagetype,
 615  615          uint32_t pageaddress, uint8_t pagenumber, uint8_t pageversion,
 616  616          uint8_t pagelength, uint32_t SGEflagslength, uint64_t SGEaddress)
↓ open down ↓ 579 lines elided ↑ open up ↑
1196 1196          slots->m_slot[MPTSAS_TM_SLOT(mpt)] = NULL;
1197 1197  
1198 1198          /*
1199 1199           * If we lost our task management command
1200 1200           * we need to reset the ioc
1201 1201           */
1202 1202          if (rval == FALSE) {
1203 1203                  mptsas_log(mpt, CE_WARN, "mptsas_ioc_task_management failed "
1204 1204                      "try to reset ioc to recovery!");
1205 1205                  mpt->m_softstate &= ~MPTSAS_SS_MSG_UNIT_RESET;
1206      -                if (mptsas_restart_ioc(mpt)) {
1207      -                        mptsas_log(mpt, CE_WARN, "mptsas_restart_ioc failed");
     1206 +                if (mptsas_reset_handler(mpt)) {
     1207 +                        mptsas_log(mpt, CE_WARN, "mptsas_reset_handler failed");
1208 1208                          rval = FAILED;
1209 1209                  }
1210 1210          }
1211 1211  
1212 1212          return (rval);
1213 1213  }
1214 1214  
1215 1215  /*
1216 1216   * Complete firmware download frame for v2.0 cards.
1217 1217   */
↓ open down ↓ 181 lines elided ↑ open up ↑
1399 1399          request_desc = (cmd->cmd_slot << 16) +
1400 1400              MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE;
1401 1401          cmd->cmd_rfm = NULL;
1402 1402          MPTSAS_START_CMD(mpt, request_desc);
1403 1403  
1404 1404          rvalue = 0;
1405 1405          (void) cv_reltimedwait(&mpt->m_fw_cv, &mpt->m_mutex,
1406 1406              drv_usectohz(60 * MICROSEC), TR_CLOCK_TICK);
1407 1407          if (!(cmd->cmd_flags & CFLAG_FINISHED)) {
1408 1408                  mpt->m_softstate &= ~MPTSAS_SS_MSG_UNIT_RESET;
1409      -                if ((mptsas_restart_ioc(mpt)) == DDI_FAILURE) {
1410      -                        mptsas_log(mpt, CE_WARN, "mptsas_restart_ioc failed");
     1409 +                if ((mptsas_reset_handler(mpt)) == DDI_FAILURE) {
     1410 +                        mptsas_log(mpt, CE_WARN, "mptsas_reset_handler failed");
1411 1411                  }
1412 1412                  rvalue = -1;
1413 1413          }
1414 1414          mptsas_remove_cmd(mpt, cmd);
1415 1415          mptsas_dma_addr_destroy(&flsh_dma_handle, &flsh_accessp);
1416 1416  
1417 1417          return (rvalue);
1418 1418  }
1419 1419  
1420 1420  static int
↓ open down ↓ 1380 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX