FreeBSD/sys/dev/mrsas/mrsas.c
/*
 * mrsas_build_mpt_cmd:	Calls helper function to build Passthru cmd
 * input:				Adapter soft state mfi cmd to build
 *
 * This function is called by mrsas_issue_cmd() to build the MPT-MFI passthru
 * command and prepares the MPT command to send to Firmware.
 */
Calls helper function to build Passthru cmd
input:                               Adapter soft state mfi cmd to build

This function is called by mrsas_issue_cmd() to build the MPT-MFI passthru
command and prepares the MPT command to send to Firmware.
Calls helper function to build Passthru cmd input : Adapter soft state mfi cmd to build This function is called by mrsas_issue_cmd () to build the MPT - MFI passthru command and prepares the MPT command to send to Firmware .
MRSAS_REQUEST_DESCRIPTOR_UNION *
mrsas_build_mpt_cmd(struct mrsas_softc *sc, struct mrsas_mfi_cmd *cmd)
{
	MRSAS_REQUEST_DESCRIPTOR_UNION *req_desc;
	u_int16_t index;
	if (mrsas_build_mptmfi_passthru(sc, cmd)) {
		device_printf(sc->mrsas_dev, "Cannot build MPT-MFI passthru cmd.\n");
		return NULL;
	}
	index = cmd->cmd_id.context.smid;
	req_desc = mrsas_get_request_desc(sc, index - 1);
	if (!req_desc)
		return NULL;
	req_desc->addr.Words = 0;
	req_desc->SCSIIO.RequestFlags = (MPI2_REQ_DESCRIPT_FLAGS_SCSI_IO << MRSAS_REQ_DESCRIPT_FLAGS_TYPE_SHIFT);
	req_desc->SCSIIO.SMID = index;
	return (req_desc);
}
MRSAS_REQUEST_DESCRIPTOR_UNION * mrsas_build_mpt_cmd ( struct mrsas_softc * sc , struct mrsas_mfi_cmd * cmd ) { MRSAS_REQUEST_DESCRIPTOR_UNION * req_desc ; u_int16_t index ; if ( mrsas_build_mptmfi_passthru ( sc , cmd ) ) { device_printf ( sc -> mrsas_dev , " \n " ) ; return NULL ; } index = cmd -> cmd_id . context . smid ; req_desc = mrsas_get_request_desc ( sc , index - 1 ) ; if ( ! req_desc ) return NULL ; req_desc -> addr . Words = 0 ; req_desc -> SCSIIO . RequestFlags = ( MPI2_REQ_DESCRIPT_FLAGS_SCSI_IO << MRSAS_REQ_DESCRIPT_FLAGS_TYPE_SHIFT ) ; req_desc -> SCSIIO . SMID = index ; return ( req_desc ) ; }
mrsas_build_mpt_cmd: Calls helper function to build Passthru cmd
 input:                               Adapter soft state mfi cmd to build
mrsas_build_mpt_cmd : Calls helper function to build Passthru cmd input : Adapter soft state mfi cmd to build