|
@@ -6939,6 +6939,39 @@ int t4_identify_port(struct adapter *adap, unsigned int mbox, unsigned int viid,
|
|
|
return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL);
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * t4_iq_stop - stop 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
|
|
|
+ *
|
|
|
+ * Stops an ingress queue and its associated FLs, if any. This causes
|
|
|
+ * any current or future data/messages destined for these queues to be
|
|
|
+ * tossed.
|
|
|
+ */
|
|
|
+int t4_iq_stop(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(FW_CMD_OP_V(FW_IQ_CMD) | FW_CMD_REQUEST_F |
|
|
|
+ FW_CMD_EXEC_F | FW_IQ_CMD_PFN_V(pf) |
|
|
|
+ FW_IQ_CMD_VFN_V(vf));
|
|
|
+ c.alloc_to_len16 = cpu_to_be32(FW_IQ_CMD_IQSTOP_F | FW_LEN16(c));
|
|
|
+ c.type_to_iqandstindex = cpu_to_be32(FW_IQ_CMD_TYPE_V(iqtype));
|
|
|
+ c.iqid = cpu_to_be16(iqid);
|
|
|
+ c.fl0id = cpu_to_be16(fl0id);
|
|
|
+ c.fl1id = cpu_to_be16(fl1id);
|
|
|
+ return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL);
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* t4_iq_free - free an ingress queue and its FLs
|
|
|
* @adap: the adapter
|