static int megasas_dcmd_set_properties(MegasasState *s, MegasasCmd *cmd)

{

    struct mfi_ctrl_props info;

    size_t dcmd_size = sizeof(info);



    if (cmd->iov_size < dcmd_size) {

        trace_megasas_dcmd_invalid_xfer_len(cmd->index, cmd->iov_size,

                                            dcmd_size);

        return MFI_STAT_INVALID_PARAMETER;

    }

    dma_buf_write((uint8_t *)&info, cmd->iov_size, &cmd->qsg);

    trace_megasas_dcmd_unsupported(cmd->index, cmd->iov_size);

    return MFI_STAT_OK;

}

static int megasas_dcmd_set_properties(MegasasState *s, MegasasCmd *cmd)

{

    struct mfi_ctrl_props info;

    size_t dcmd_size = sizeof(info);



    if (cmd->iov_size < dcmd_size) {

        trace_megasas_dcmd_invalid_xfer_len(cmd->index, cmd->iov_size,

                                            dcmd_size);

        return MFI_STAT_INVALID_PARAMETER;

    }

    dma_buf_write((uint8_t *)&info, cmd->iov_size, &cmd->qsg);

    trace_megasas_dcmd_unsupported(cmd->index, cmd->iov_size);

    return MFI_STAT_OK;

}

static int FUNC_0(MegasasState *VAR_0, MegasasCmd *VAR_1)

{

    struct mfi_ctrl_props VAR_2;

    size_t dcmd_size = sizeof(VAR_2);



    if (VAR_1->iov_size < dcmd_size) {

        trace_megasas_dcmd_invalid_xfer_len(VAR_1->index, VAR_1->iov_size,

                                            dcmd_size);

        return MFI_STAT_INVALID_PARAMETER;

    }

    dma_buf_write((uint8_t *)&VAR_2, VAR_1->iov_size, &VAR_1->qsg);

    trace_megasas_dcmd_unsupported(VAR_1->index, VAR_1->iov_size);

    return MFI_STAT_OK;

}

static int FUNC_0(MegasasState *VAR_0, MegasasCmd *VAR_1)
{ struct mfi_ctrl_props VAR_2; size_t dcmd_size = sizeof(VAR_2); if (VAR_1->iov_size < dcmd_size) { trace_megasas_dcmd_invalid_xfer_len(VAR_1->index, VAR_1->iov_size,
dcmd_size); return MFI_STAT_INVALID_PARAMETER; } dma_buf_write((uint8_t *)&VAR_2, VAR_1->iov_size, &VAR_1->qsg); trace_megasas_dcmd_unsupported(VAR_1->index, VAR_1->iov_size); return MFI_STAT_OK; }