src/dpdk/drivers/net/cxgbe/base/t4_hw.c
int t4_iq_start_stop(struct adapter *adap, unsigned int mbox, bool start,
		     unsigned int pf, unsigned int vf, 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);
	c.alloc_to_len16 = cpu_to_be32(V_FW_IQ_CMD_IQSTART(start) |
				       V_FW_IQ_CMD_IQSTOP(!start) |
				       FW_LEN16(c));
	c.iqid = cpu_to_be16(iqid);
	c.fl0id = cpu_to_be16(fl0id);
	c.fl1id = cpu_to_be16(fl1id);
	if (is_pf4(adap)) {
		c.op_to_vfn |= cpu_to_be32(V_FW_IQ_CMD_PFN(pf) |
					   V_FW_IQ_CMD_VFN(vf));
		return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL);
	} else {
		return t4vf_wr_mbox(adap, &c, sizeof(c), NULL);
	}
}
/**
 * t4_iq_start_stop - enable/disable an ingress queue and its FLs
 * @adap: the adapter
 * @mbox: mailbox to use for the FW command
 * @start: %true to enable the queues, %false to disable them
 * @pf: the PF owning the queues
 * @vf: the VF owning the queues
 * @iqid: ingress queue id
 * @fl0id: FL0 queue id or 0xffff if no attached FL0
 * @fl1id: FL1 queue id or 0xffff if no attached FL1
 *
 * Starts or stops an ingress queue and its associated FLs, if any.
 */


Starts or stops an ingress queue and its associated FLs, if any.
Starts or stops an ingress queue and its associated FLs if any .
int t4_iq_start_stop(struct adapter *adap, unsigned int mbox, bool start,
		     unsigned int pf, unsigned int vf, 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);
	c.alloc_to_len16 = cpu_to_be32(V_FW_IQ_CMD_IQSTART(start) |
				       V_FW_IQ_CMD_IQSTOP(!start) |
				       FW_LEN16(c));
	c.iqid = cpu_to_be16(iqid);
	c.fl0id = cpu_to_be16(fl0id);
	c.fl1id = cpu_to_be16(fl1id);
	if (is_pf4(adap)) {
		c.op_to_vfn |= cpu_to_be32(V_FW_IQ_CMD_PFN(pf) |
					   V_FW_IQ_CMD_VFN(vf));
		return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL);
	} else {
		return t4vf_wr_mbox(adap, &c, sizeof(c), NULL);
	}
}
int t4_iq_start_stop ( struct adapter * adap , unsigned int mbox , bool start , unsigned int pf , unsigned int vf , 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 ) ; c . alloc_to_len16 = cpu_to_be32 ( V_FW_IQ_CMD_IQSTART ( start ) | V_FW_IQ_CMD_IQSTOP ( ! start ) | FW_LEN16 ( c ) ) ; c . iqid = cpu_to_be16 ( iqid ) ; c . fl0id = cpu_to_be16 ( fl0id ) ; c . fl1id = cpu_to_be16 ( fl1id ) ; if ( is_pf4 ( adap ) ) { c . op_to_vfn |= cpu_to_be32 ( V_FW_IQ_CMD_PFN ( pf ) | V_FW_IQ_CMD_VFN ( vf ) ) ; return t4_wr_mbox ( adap , mbox , & c , sizeof ( c ) , NULL ) ; } else { return t4vf_wr_mbox ( adap , & c , sizeof ( c ) , NULL ) ; } }
t4_iq_start_stop - enable/disable an ingress queue and its FLs
 @adap: the adapter
 @mbox: mailbox to use for the FW command
 @start: %true to enable the queues, %false to disable them
 @pf: the PF owning the queues
 @vf: the VF owning the queues
 @iqid: ingress queue id
 @fl0id: FL0 queue id or 0xffff if no attached FL0
 @fl1id: FL1 queue id or 0xffff if no attached FL1
t4_iq_start_stop - enable / disable an ingress queue and its FLs @adap : the adapter @mbox : mailbox to use for the FW command @start : %true to enable the queues %false to disable them @pf : the PF owning the queues @vf : the VF owning the queues @iqid : ingress queue id @fl0id : FL0 queue id or 0xffff if no attached FL0 @fl1id : FL1 queue id or 0xffff if no attached FL1