// SPDX-License-Identifier: GPL-2.0 /* Marvell OcteonTX CPT driver * * Copyright (C) 2019 Marvell International Ltd. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation.
*/
/* * ACKs VF's mailbox message * @vf: VF to which ACK to be sent
*/ staticvoid otx_cpt_mbox_send_ack(struct otx_cpt_device *cpt, int vf, struct otx_cpt_mbox *mbx)
{
mbx->data = 0ull;
mbx->msg = OTX_CPT_MSG_ACK;
otx_cpt_send_msg_to_vf(cpt, vf, mbx);
}
/* NACKs VF's mailbox message that PF is not able to complete the action */ staticvoid otx_cptpf_mbox_send_nack(struct otx_cpt_device *cpt, int vf, struct otx_cpt_mbox *mbx)
{
mbx->data = 0ull;
mbx->msg = OTX_CPT_MSG_NACK;
otx_cpt_send_msg_to_vf(cpt, vf, mbx);
}
staticvoid otx_cpt_clear_mbox_intr(struct otx_cpt_device *cpt, u32 vf)
{ /* W1C for the VF */
writeq(1ull << vf, cpt->reg_base + OTX_CPT_PF_MBOX_INTX(0));
}
/* * Configure QLEN/Chunk sizes for VF
*/ staticvoid otx_cpt_cfg_qlen_for_vf(struct otx_cpt_device *cpt, int vf,
u32 size)
{ union otx_cptx_pf_qx_ctl pf_qx_ctl;
if (q >= cpt->max_vfs) {
dev_err(dev, "Requested queue %d is > than maximum avail %d\n",
q, cpt->max_vfs); return -EINVAL;
}
if (grp >= OTX_CPT_MAX_ENGINE_GROUPS) {
dev_err(dev, "Requested group %d is > than maximum avail %d\n",
grp, OTX_CPT_MAX_ENGINE_GROUPS); return -EINVAL;
}
eng_grp = &cpt->eng_grps.grp[grp]; if (!eng_grp->is_enabled) {
dev_err(dev, "Requested engine group %d is disabled\n", grp); return -EINVAL;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.