Lines Matching defs:mfi_cmd

64 int mfi_tbolt_build_io(struct mfi_softc *sc, struct mfi_command *mfi_cmd,
69 mfi_build_mpt_pass_thru(struct mfi_softc *sc, struct mfi_command *mfi_cmd);
71 *sc, struct mfi_command *mfi_cmd);
72 void mfi_tbolt_build_ldio(struct mfi_softc *sc, struct mfi_command *mfi_cmd,
75 *mfi_cmd, pMpi25IeeeSgeChain64_t sgl_ptr, struct mfi_cmd_tbolt *cmd);
77 map_tbolt_cmd_status(struct mfi_command *mfi_cmd, uint8_t status,
602 map_tbolt_cmd_status(struct mfi_command *mfi_cmd, uint8_t status,
607 mfi_cmd->cm_frame->header.cmd_status = MFI_STAT_OK;
608 mfi_cmd->cm_frame->dcmd.header.cmd_status = MFI_STAT_OK;
609 mfi_cmd->cm_error = MFI_STAT_OK;
614 mfi_cmd->cm_frame->header.cmd_status = status;
615 mfi_cmd->cm_frame->header.scsi_status = ext_status;
616 mfi_cmd->cm_frame->dcmd.header.cmd_status = status;
617 mfi_cmd->cm_frame->dcmd.header.scsi_status
622 mfi_cmd->cm_frame->header.cmd_status = ext_status;
623 mfi_cmd->cm_frame->dcmd.header.cmd_status = ext_status;
628 mfi_cmd->cm_frame->header.cmd_status = status;
629 mfi_cmd->cm_frame->dcmd.header.cmd_status = status;
633 mfi_cmd->cm_frame->header.cmd_status = status;
634 mfi_cmd->cm_frame->dcmd.header.cmd_status = status;
643 * @mfi_cmd: Oning MFI command packe
647 struct mfi_command *mfi_cmd)
651 mfi_cmd->cm_flags &= ~MFI_CMD_TBOLT;
652 mfi_cmd->cm_extra_frames = 0;
771 mfi_tbolt_get_cmd(struct mfi_softc *sc, struct mfi_command *mfi_cmd)
784 cmd->sync_cmd_idx = mfi_cmd->cm_index;
785 mfi_cmd->cm_extra_frames = cmd->index; /* Frame count used as SMID */
786 mfi_cmd->cm_flags |= MFI_CMD_TBOLT;
810 mfi_build_mpt_pass_thru(struct mfi_softc *sc, struct mfi_command *mfi_cmd)
816 cmd = mfi_tbolt_get_cmd(sc, mfi_cmd);
827 mpi25_ieee_chain->Address = mfi_cmd->cm_frame_busaddr;
843 mfi_tbolt_build_ldio(struct mfi_softc *sc, struct mfi_command *mfi_cmd,
850 device_id = mfi_cmd->cm_frame->io.header.target_id;
857 start_lba_lo = mfi_cmd->cm_frame->io.lba_lo;
858 start_lba_hi = mfi_cmd->cm_frame->io.lba_hi;
862 io_info.numBlocks = mfi_cmd->cm_frame->io.header.data_len;
864 if ((mfi_cmd->cm_frame->header.flags & MFI_FRAME_DIR_READ) ==
877 io_request->DataLength = mfi_cmd->cm_frame->io.header.data_len
882 mfi_tbolt_build_io(struct mfi_softc *sc, struct mfi_command *mfi_cmd,
892 if (!(mfi_cmd->cm_frame->header.cmd == MFI_CMD_LD_READ
893 || mfi_cmd->cm_frame->header.cmd == MFI_CMD_LD_WRITE))
896 mfi_tbolt_build_ldio(sc, mfi_cmd, cmd);
900 if (mfi_cmd->cm_frame->header.cmd == MFI_CMD_LD_WRITE)
905 lba = mfi_cmd->cm_frame->io.lba_hi;
906 lba = (lba << 32) + mfi_cmd->cm_frame->io.lba_lo;
908 mfi_cmd->cm_frame->io.header.data_len, io_request->CDB.CDB32);
916 sge_count = mfi_tbolt_make_sgl(sc, mfi_cmd,
926 if (mfi_cmd->cm_frame->header.cmd == MFI_CMD_LD_WRITE)
934 io_request->SenseBufferLowAddress = mfi_cmd->cm_sense_busaddr;
944 mfi_tbolt_make_sgl(struct mfi_softc *sc, struct mfi_command *mfi_cmd,
955 if (!mfi_cmd->cm_sg || !mfi_cmd->cm_len) {
959 os_sgl = mfi_cmd->cm_sg;
960 sge_count = mfi_cmd->cm_frame->header.sg_count;
1042 mfi_build_and_issue_cmd(struct mfi_softc *sc, struct mfi_command *mfi_cmd)
1047 cmd = mfi_tbolt_get_cmd(sc, mfi_cmd);
1054 mfi_tbolt_return_cmd(sc, cmd, mfi_cmd);
1058 if (mfi_tbolt_build_io(sc, mfi_cmd, cmd) != 0) {
1059 mfi_tbolt_return_cmd(sc, cmd, mfi_cmd);