+int
+bnx2x_vf_teardown_queue(struct bnx2x_softc *sc, int qid)
+{
+ struct vf_q_op_tlv *query_op;
+ struct vf_common_reply_tlv *reply = &sc->vf2pf_mbox->resp.common_reply;
+ int rc;
+
+ query_op = &sc->vf2pf_mbox->query[0].q_op;
+ bnx2x_vf_prep(sc, &query_op->first_tlv,
+ BNX2X_VF_TLV_TEARDOWN_Q,
+ sizeof(*query_op));
+
+ query_op->vf_qid = qid;
+
+ bnx2x_add_tlv(sc, query_op,
+ query_op->first_tlv.tl.length,
+ BNX2X_VF_TLV_LIST_END,
+ sizeof(struct channel_list_end_tlv));
+
+ rc = bnx2x_do_req4pf(sc, sc->vf2pf_mbox_mapping.paddr);
+ if (rc || reply->status != BNX2X_VF_STATUS_SUCCESS)
+ PMD_DRV_LOG(ERR, sc,
+ "Bad reply for vf_q %d teardown", qid);
+
+ bnx2x_vf_finalize(sc, &query_op->first_tlv);
+
+ return rc;
+}
+