]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[bnxt] Allocate TX rings with firmware input
authorJoseph Wong <joseph.wong@broadcom.com>
Thu, 23 Jan 2025 00:06:18 +0000 (16:06 -0800)
committerMichael Brown <mcb30@ipxe.org>
Fri, 7 Feb 2025 09:26:15 +0000 (09:26 +0000)
Use queue_id value retrieved from firmware unconditionally when
allocating TX rings.

Signed-off by: Joseph Wong <joseph.wong@broadcom.com>

src/drivers/net/bnxt/bnxt.c
src/drivers/net/bnxt/bnxt.h

index a127f6cefb78ea2583205abc451b5ed2eadead10..5de8d094e65c7efe3be101b8388b13b4cf554cac 100644 (file)
@@ -1840,7 +1840,7 @@ static int bnxt_hwrm_ring_alloc ( struct bnxt *bp, u8 type )
                req->page_size   = LM_PAGE_BITS ( 8 );
                req->int_mode    = RING_ALLOC_REQ_INT_MODE_POLL;
                req->length      = ( u32 )bp->tx.ring_cnt;
-               req->queue_id    = TX_RING_QID;
+               req->queue_id    = ( u16 )bp->queue_id;
                req->stat_ctx_id = ( u32 )bp->stat_ctx_id;
                req->cmpl_ring_id  = bp->cq_ring_id;
                req->page_tbl_addr = virt_to_bus ( bp->tx.bd_virt );
index 8c8a3328285dd7027cd8853cc36dfa16851fe580..78288196424e33888dc7b65df992d6235d79b0e4 100644 (file)
@@ -178,7 +178,6 @@ union dma_addr64_t {
        RX_MASK_ACCEPT_MULTICAST)
 #define MAX_NQ_DESC_CNT                         64
 #define NQ_RING_BUFFER_SIZE (MAX_NQ_DESC_CNT * sizeof(struct cmpl_base))
-#define TX_RING_QID (FLAG_TEST(bp->flags, BNXT_FLAG_IS_CHIP_P5_PLUS) ? (u16)bp->queue_id : ((u16)bp->port_idx * 10))
 #define RX_RING_QID (FLAG_TEST(bp->flags, BNXT_FLAG_IS_CHIP_P5_PLUS) ? bp->queue_id : 0)
 #define STAT_CTX_ID ((bp->vf || FLAG_TEST(bp->flags, BNXT_FLAG_IS_CHIP_P5_PLUS)) ? bp->stat_ctx_id : 0)
 #define TX_AVAIL(r)                      (r - 1)