Lines Matching refs:mfi_cmd

61 int mfi_tbolt_build_io(struct mfi_softc *sc, struct mfi_command *mfi_cmd,
66 mfi_build_mpt_pass_thru(struct mfi_softc *sc, struct mfi_command *mfi_cmd);
68 *sc, struct mfi_command *mfi_cmd);
69 void mfi_tbolt_build_ldio(struct mfi_softc *sc, struct mfi_command *mfi_cmd,
72 *mfi_cmd, pMpi25IeeeSgeChain64_t sgl_ptr, struct mfi_cmd_tbolt *cmd);
74 map_tbolt_cmd_status(struct mfi_command *mfi_cmd, uint8_t status,
597 map_tbolt_cmd_status(struct mfi_command *mfi_cmd, uint8_t status, in map_tbolt_cmd_status() argument
602 mfi_cmd->cm_frame->header.cmd_status = MFI_STAT_OK; in map_tbolt_cmd_status()
603 mfi_cmd->cm_frame->dcmd.header.cmd_status = MFI_STAT_OK; in map_tbolt_cmd_status()
604 mfi_cmd->cm_error = MFI_STAT_OK; in map_tbolt_cmd_status()
609 mfi_cmd->cm_frame->header.cmd_status = status; in map_tbolt_cmd_status()
610 mfi_cmd->cm_frame->header.scsi_status = ext_status; in map_tbolt_cmd_status()
611 mfi_cmd->cm_frame->dcmd.header.cmd_status = status; in map_tbolt_cmd_status()
612 mfi_cmd->cm_frame->dcmd.header.scsi_status in map_tbolt_cmd_status()
617 mfi_cmd->cm_frame->header.cmd_status = ext_status; in map_tbolt_cmd_status()
618 mfi_cmd->cm_frame->dcmd.header.cmd_status = ext_status; in map_tbolt_cmd_status()
623 mfi_cmd->cm_frame->header.cmd_status = status; in map_tbolt_cmd_status()
624 mfi_cmd->cm_frame->dcmd.header.cmd_status = status; in map_tbolt_cmd_status()
628 mfi_cmd->cm_frame->header.cmd_status = status; in map_tbolt_cmd_status()
629 mfi_cmd->cm_frame->dcmd.header.cmd_status = status; in map_tbolt_cmd_status()
642 struct mfi_command *mfi_cmd) in mfi_tbolt_return_cmd() argument
646 mfi_cmd->cm_flags &= ~MFI_CMD_TBOLT; in mfi_tbolt_return_cmd()
647 mfi_cmd->cm_extra_frames = 0; in mfi_tbolt_return_cmd()
764 mfi_tbolt_get_cmd(struct mfi_softc *sc, struct mfi_command *mfi_cmd) in mfi_tbolt_get_cmd() argument
777 cmd->sync_cmd_idx = mfi_cmd->cm_index; in mfi_tbolt_get_cmd()
778 mfi_cmd->cm_extra_frames = cmd->index; /* Frame count used as SMID */ in mfi_tbolt_get_cmd()
779 mfi_cmd->cm_flags |= MFI_CMD_TBOLT; in mfi_tbolt_get_cmd()
802 mfi_build_mpt_pass_thru(struct mfi_softc *sc, struct mfi_command *mfi_cmd) in mfi_build_mpt_pass_thru() argument
808 cmd = mfi_tbolt_get_cmd(sc, mfi_cmd); in mfi_build_mpt_pass_thru()
819 mpi25_ieee_chain->Address = mfi_cmd->cm_frame_busaddr; in mfi_build_mpt_pass_thru()
835 mfi_tbolt_build_ldio(struct mfi_softc *sc, struct mfi_command *mfi_cmd, in mfi_tbolt_build_ldio() argument
842 device_id = mfi_cmd->cm_frame->io.header.target_id; in mfi_tbolt_build_ldio()
849 start_lba_lo = mfi_cmd->cm_frame->io.lba_lo; in mfi_tbolt_build_ldio()
850 start_lba_hi = mfi_cmd->cm_frame->io.lba_hi; in mfi_tbolt_build_ldio()
854 io_info.numBlocks = mfi_cmd->cm_frame->io.header.data_len; in mfi_tbolt_build_ldio()
856 if ((mfi_cmd->cm_frame->header.flags & MFI_FRAME_DIR_READ) == in mfi_tbolt_build_ldio()
869 io_request->DataLength = mfi_cmd->cm_frame->io.header.data_len in mfi_tbolt_build_ldio()
874 mfi_tbolt_build_io(struct mfi_softc *sc, struct mfi_command *mfi_cmd, in mfi_tbolt_build_io() argument
884 if (!(mfi_cmd->cm_frame->header.cmd == MFI_CMD_LD_READ in mfi_tbolt_build_io()
885 || mfi_cmd->cm_frame->header.cmd == MFI_CMD_LD_WRITE)) in mfi_tbolt_build_io()
888 mfi_tbolt_build_ldio(sc, mfi_cmd, cmd); in mfi_tbolt_build_io()
892 if (mfi_cmd->cm_frame->header.cmd == MFI_CMD_LD_WRITE) in mfi_tbolt_build_io()
897 lba = mfi_cmd->cm_frame->io.lba_hi; in mfi_tbolt_build_io()
898 lba = (lba << 32) + mfi_cmd->cm_frame->io.lba_lo; in mfi_tbolt_build_io()
900 mfi_cmd->cm_frame->io.header.data_len, io_request->CDB.CDB32); in mfi_tbolt_build_io()
908 sge_count = mfi_tbolt_make_sgl(sc, mfi_cmd, in mfi_tbolt_build_io()
918 if (mfi_cmd->cm_frame->header.cmd == MFI_CMD_LD_WRITE) in mfi_tbolt_build_io()
926 io_request->SenseBufferLowAddress = mfi_cmd->cm_sense_busaddr; in mfi_tbolt_build_io()
935 mfi_tbolt_make_sgl(struct mfi_softc *sc, struct mfi_command *mfi_cmd, in mfi_tbolt_make_sgl() argument
946 if (!mfi_cmd->cm_sg || !mfi_cmd->cm_len) { in mfi_tbolt_make_sgl()
950 os_sgl = mfi_cmd->cm_sg; in mfi_tbolt_make_sgl()
951 sge_count = mfi_cmd->cm_frame->header.sg_count; in mfi_tbolt_make_sgl()
1033 mfi_build_and_issue_cmd(struct mfi_softc *sc, struct mfi_command *mfi_cmd) in mfi_build_and_issue_cmd() argument
1038 cmd = mfi_tbolt_get_cmd(sc, mfi_cmd); in mfi_build_and_issue_cmd()
1045 mfi_tbolt_return_cmd(sc, cmd, mfi_cmd); in mfi_build_and_issue_cmd()
1049 if (mfi_tbolt_build_io(sc, mfi_cmd, cmd) != 0) { in mfi_build_and_issue_cmd()
1050 mfi_tbolt_return_cmd(sc, cmd, mfi_cmd); in mfi_build_and_issue_cmd()