src/dpdk/drivers/net/cxgbe/base/t4_hw.c
int t4_iq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
	       unsigned int vf, unsigned int iqtype, unsigned int iqid,
	       unsigned int fl0id, unsigned int fl1id)
{
	struct fw_iq_cmd c;

	memset(&c, 0, sizeof(c));
	c.op_to_vfn = cpu_to_be32(V_FW_CMD_OP(FW_IQ_CMD) | F_FW_CMD_REQUEST |
				  F_FW_CMD_EXEC);
	if (is_pf4(adap))
		c.op_to_vfn |= cpu_to_be32(V_FW_IQ_CMD_PFN(pf) |
					   V_FW_IQ_CMD_VFN(vf));
	c.alloc_to_len16 = cpu_to_be32(F_FW_IQ_CMD_FREE | FW_LEN16(c));
	c.type_to_iqandstindex = cpu_to_be32(V_FW_IQ_CMD_TYPE(iqtype));
	c.iqid = cpu_to_be16(iqid);
	c.fl0id = cpu_to_be16(fl0id);
	c.fl1id = cpu_to_be16(fl1id);
	if (is_pf4(adap))
		return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL);
	else
		return t4vf_wr_mbox(adap, &c, sizeof(c), NULL);
}
/**
 * t4_iq_free - free an ingress queue and its FLs
 * @adap: the adapter
 * @mbox: mailbox to use for the FW command
 * @pf: the PF owning the queues
 * @vf: the VF owning the queues
 * @iqtype: the ingress queue type (FW_IQ_TYPE_FL_INT_CAP, etc.)
 * @iqid: ingress queue id
 * @fl0id: FL0 queue id or 0xffff if no attached FL0
 * @fl1id: FL1 queue id or 0xffff if no attached FL1
 *
 * Frees an ingress queue and its associated FLs, if any.
 */


Frees an ingress queue and its associated FLs, if any.
Frees an ingress queue and its associated FLs if any .
int t4_iq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
	       unsigned int vf, unsigned int iqtype, unsigned int iqid,
	       unsigned int fl0id, unsigned int fl1id)
{
	struct fw_iq_cmd c;
	memset(&c, 0, sizeof(c));
	c.op_to_vfn = cpu_to_be32(V_FW_CMD_OP(FW_IQ_CMD) | F_FW_CMD_REQUEST |
				  F_FW_CMD_EXEC);
	if (is_pf4(adap))
		c.op_to_vfn |= cpu_to_be32(V_FW_IQ_CMD_PFN(pf) |
					   V_FW_IQ_CMD_VFN(vf));
	c.alloc_to_len16 = cpu_to_be32(F_FW_IQ_CMD_FREE | FW_LEN16(c));
	c.type_to_iqandstindex = cpu_to_be32(V_FW_IQ_CMD_TYPE(iqtype));
	c.iqid = cpu_to_be16(iqid);
	c.fl0id = cpu_to_be16(fl0id);
	c.fl1id = cpu_to_be16(fl1id);
	if (is_pf4(adap))
		return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL);
	else
		return t4vf_wr_mbox(adap, &c, sizeof(c), NULL);
}
int t4_iq_free ( struct adapter * adap , unsigned int mbox , unsigned int pf , unsigned int vf , unsigned int iqtype , unsigned int iqid , unsigned int fl0id , unsigned int fl1id ) { struct fw_iq_cmd c ; memset ( & c , 0 , sizeof ( c ) ) ; c . op_to_vfn = cpu_to_be32 ( V_FW_CMD_OP ( FW_IQ_CMD ) | F_FW_CMD_REQUEST | F_FW_CMD_EXEC ) ; if ( is_pf4 ( adap ) ) c . op_to_vfn |= cpu_to_be32 ( V_FW_IQ_CMD_PFN ( pf ) | V_FW_IQ_CMD_VFN ( vf ) ) ; c . alloc_to_len16 = cpu_to_be32 ( F_FW_IQ_CMD_FREE | FW_LEN16 ( c ) ) ; c . type_to_iqandstindex = cpu_to_be32 ( V_FW_IQ_CMD_TYPE ( iqtype ) ) ; c . iqid = cpu_to_be16 ( iqid ) ; c . fl0id = cpu_to_be16 ( fl0id ) ; c . fl1id = cpu_to_be16 ( fl1id ) ; if ( is_pf4 ( adap ) ) return t4_wr_mbox ( adap , mbox , & c , sizeof ( c ) , NULL ) ; else return t4vf_wr_mbox ( adap , & c , sizeof ( c ) , NULL ) ; }
t4_iq_free - free an ingress queue and its FLs
 @adap: the adapter
 @mbox: mailbox to use for the FW command
 @pf: the PF owning the queues
 @vf: the VF owning the queues
 @iqtype: the ingress queue type (FW_IQ_TYPE_FL_INT_CAP, etc.)
t4_iq_free - free an ingress queue and its FLs @adap : the adapter @mbox : mailbox to use for the FW command @pf : the PF owning the queues @vf : the VF owning the queues @iqtype : the ingress queue type ( FW_IQ_TYPE_FL_INT_CAP etc . )