Print this page
XXXX introduce drv_sectohz


1046         /* disable interrupts before sending INIT2 frame */
1047         instance->func_ptr->disable_intr(instance);
1048 
1049         req_desc.Words = cmd->scsi_io_request_phys_addr;
1050         req_desc.MFAIo.RequestFlags =
1051             (MPI2_REQ_DESCRIPT_FLAGS_MFA << MPI2_REQ_DESCRIPT_FLAGS_TYPE_SHIFT);
1052 
1053         cmd->request_desc = &req_desc;
1054 
1055         /* issue the init frame */
1056 
1057         mutex_enter(&instance->reg_write_mtx);
1058         WR_IB_LOW_QPORT((uint32_t)(req_desc.Words), instance);
1059         WR_IB_HIGH_QPORT((uint32_t)(req_desc.Words >> 32), instance);
1060         mutex_exit(&instance->reg_write_mtx);
1061 
1062         con_log(CL_ANN1, (CE_CONT, "[cmd = %d] ", frame_hdr->cmd));
1063         con_log(CL_ANN1, (CE_CONT, "[cmd  Status= %x] ",
1064             frame_hdr->cmd_status));
1065 
1066         timeout = drv_usectohz(MFI_POLL_TIMEOUT_SECS * MICROSEC);
1067         do {
1068                 if (ddi_get8(cmd->frame_dma_obj.acc_handle,
1069                     &mfiFrameInit2->cmd_status) != MFI_CMD_STATUS_POLL_MODE)
1070                         break;
1071                 delay(1);
1072                 timeout--;
1073         } while (timeout > 0);
1074 
1075         if (ddi_get8(instance->mpi2_frame_pool_dma_obj.acc_handle,
1076             &mfiFrameInit2->cmd_status) == 0) {
1077                 con_log(CL_ANN, (CE_NOTE, "INIT2 Success"));
1078         } else {
1079                 con_log(CL_ANN, (CE_WARN, "INIT2 Fail"));
1080                 mrsas_dump_reply_desc(instance);
1081                 goto fail_ioc_init;
1082         }
1083 
1084         mrsas_dump_reply_desc(instance);
1085 
1086         instance->unroll.verBuff = 1;




1046         /* disable interrupts before sending INIT2 frame */
1047         instance->func_ptr->disable_intr(instance);
1048 
1049         req_desc.Words = cmd->scsi_io_request_phys_addr;
1050         req_desc.MFAIo.RequestFlags =
1051             (MPI2_REQ_DESCRIPT_FLAGS_MFA << MPI2_REQ_DESCRIPT_FLAGS_TYPE_SHIFT);
1052 
1053         cmd->request_desc = &req_desc;
1054 
1055         /* issue the init frame */
1056 
1057         mutex_enter(&instance->reg_write_mtx);
1058         WR_IB_LOW_QPORT((uint32_t)(req_desc.Words), instance);
1059         WR_IB_HIGH_QPORT((uint32_t)(req_desc.Words >> 32), instance);
1060         mutex_exit(&instance->reg_write_mtx);
1061 
1062         con_log(CL_ANN1, (CE_CONT, "[cmd = %d] ", frame_hdr->cmd));
1063         con_log(CL_ANN1, (CE_CONT, "[cmd  Status= %x] ",
1064             frame_hdr->cmd_status));
1065 
1066         timeout = drv_sectohz(MFI_POLL_TIMEOUT_SECS);
1067         do {
1068                 if (ddi_get8(cmd->frame_dma_obj.acc_handle,
1069                     &mfiFrameInit2->cmd_status) != MFI_CMD_STATUS_POLL_MODE)
1070                         break;
1071                 delay(1);
1072                 timeout--;
1073         } while (timeout > 0);
1074 
1075         if (ddi_get8(instance->mpi2_frame_pool_dma_obj.acc_handle,
1076             &mfiFrameInit2->cmd_status) == 0) {
1077                 con_log(CL_ANN, (CE_NOTE, "INIT2 Success"));
1078         } else {
1079                 con_log(CL_ANN, (CE_WARN, "INIT2 Fail"));
1080                 mrsas_dump_reply_desc(instance);
1081                 goto fail_ioc_init;
1082         }
1083 
1084         mrsas_dump_reply_desc(instance);
1085 
1086         instance->unroll.verBuff = 1;