History

bnge/bng_re: fix ring ID widths

Firmware requires more than 16 bits to address TX ring IDs for its internal QP management. Widen the associated HSI ring ID fields to 32 bits. The values firmware assigns remain within 24 bits, bounded by the hardware doorbell XID field. The fw_ring_id field belongs to bnge_ring_struct, a common struct shared by all ring types, so widening it to u32 applies uniformly across TX, RX, CP, and NQ rings but firmware assigns values within 16-bit range for all ring types except TX, which requires the wider field. Note that, Thor Ultra hardware has not yet been deployed and no firmware has been released to field, so backward compatibility is not a concern.

Vikas Gupta committed 3 months ago

Commit b9e55891 parent 47f42ff8 files · +39 −41Browse files

Unified · Split

8 files
  1. drivers/infiniband/hw/bng_re/bng_dev.c +3 −3
  2. drivers/net/ethernet/broadcom/bnge/bnge.h +1 −0
  3. drivers/net/ethernet/broadcom/bnge/bnge_hwrm_lib.c +4 −4
  4. drivers/net/ethernet/broadcom/bnge/bnge_hwrm_lib.h +1 −1
  5. drivers/net/ethernet/broadcom/bnge/bnge_netdev.c +24 −26
  6. drivers/net/ethernet/broadcom/bnge/bnge_netdev.h +2 −2
  7. drivers/net/ethernet/broadcom/bnge/bnge_rmem.h +1 −1
  8. include/linux/bnge/hsi.h +3 −4
drivers/infiniband/hw/bng_re/bng_dev.c+3−3
@@ -113,7 +113,7 @@ static void bng_re_fill_fw_msg(struct bnge_fw_msg *fw_msg, void *msg, · 112 unmodified lines
113}113}
114 114
115static int bng_re_net_ring_free(struct bng_re_dev *rdev,115static int bng_re_net_ring_free(struct bng_re_dev *rdev,
116 u16 fw_ring_id, int type)116 u32 fw_ring_id, int type)
117{117{
118 struct bnge_auxr_dev *aux_dev = rdev->aux_dev;118 struct bnge_auxr_dev *aux_dev = rdev->aux_dev;
119 struct hwrm_ring_free_input req = {};119 struct hwrm_ring_free_input req = {};
@@ -123,7 +123,7 @@ static int bng_re_net_ring_free(struct bng_re_dev *rdev, · 3 unmodified lines
123 123
124 bng_re_init_hwrm_hdr((void *)&req, HWRM_RING_FREE);124 bng_re_init_hwrm_hdr((void *)&req, HWRM_RING_FREE);
125 req.ring_type = type;125 req.ring_type = type;
126 req.ring_id = cpu_to_le16(fw_ring_id);126 req.ring_id = cpu_to_le32(fw_ring_id);
127 bng_re_fill_fw_msg(&fw_msg, (void *)&req, sizeof(req), (void *)&resp,127 bng_re_fill_fw_msg(&fw_msg, (void *)&req, sizeof(req), (void *)&resp,
128 sizeof(resp), BNGE_DFLT_HWRM_CMD_TIMEOUT);128 sizeof(resp), BNGE_DFLT_HWRM_CMD_TIMEOUT);
129 rc = bnge_send_msg(aux_dev, &fw_msg);129 rc = bnge_send_msg(aux_dev, &fw_msg);
@@ -161,7 +161,7 @@ static int bng_re_net_ring_alloc(struct bng_re_dev *rdev, · 31 unmodified lines
161 sizeof(resp), BNGE_DFLT_HWRM_CMD_TIMEOUT);161 sizeof(resp), BNGE_DFLT_HWRM_CMD_TIMEOUT);
162 rc = bnge_send_msg(aux_dev, &fw_msg);162 rc = bnge_send_msg(aux_dev, &fw_msg);
163 if (!rc)163 if (!rc)
164 *fw_ring_id = le16_to_cpu(resp.ring_id);164 *fw_ring_id = (u16)le32_to_cpu(resp.ring_id);
165 165
166 return rc;166 return rc;
167}167}
drivers/net/ethernet/broadcom/bnge/bnge.h+1−0
@@ -36,6 +36,7 @@ struct bnge_pf_info { · 35 unmodified lines
36};36};
37 37
38#define INVALID_HW_RING_ID ((u16)-1)38#define INVALID_HW_RING_ID ((u16)-1)
39#define INVALID_HW_RING_ID_32BIT (U32_MAX)
39 40
40enum {41enum {
41 BNGE_FW_CAP_SHORT_CMD = BIT_ULL(0),42 BNGE_FW_CAP_SHORT_CMD = BIT_ULL(0),
drivers/net/ethernet/broadcom/bnge/bnge_hwrm_lib.c+4−4
@@ -1283,7 +1283,7 @@ int bnge_hwrm_stat_ctx_alloc(struct bnge_net *bn) · 1282 unmodified lines
1283 1283
1284int hwrm_ring_free_send_msg(struct bnge_net *bn,1284int hwrm_ring_free_send_msg(struct bnge_net *bn,
1285 struct bnge_ring_struct *ring,1285 struct bnge_ring_struct *ring,
1286 u32 ring_type, int cmpl_ring_id)1286 u32 ring_type, u32 cmpl_ring_id)
1287{1287{
1288 struct hwrm_ring_free_input *req;1288 struct hwrm_ring_free_input *req;
1289 struct bnge_dev *bd = bn->bd;1289 struct bnge_dev *bd = bn->bd;
@@ -1295,7 +1295,7 @@ int hwrm_ring_free_send_msg(struct bnge_net *bn, · 5 unmodified lines
1295 1295
1296 req->cmpl_ring = cpu_to_le16(cmpl_ring_id);1296 req->cmpl_ring = cpu_to_le16(cmpl_ring_id);
1297 req->ring_type = ring_type;1297 req->ring_type = ring_type;
1298 req->ring_id = cpu_to_le16(ring->fw_ring_id);1298 req->ring_id = cpu_to_le32(ring->fw_ring_id);
1299 1299
1300 bnge_hwrm_req_hold(bd, req);1300 bnge_hwrm_req_hold(bd, req);
1301 rc = bnge_hwrm_req_send(bd, req);1301 rc = bnge_hwrm_req_send(bd, req);
@@ -1317,7 +1317,7 @@ int hwrm_ring_alloc_send_msg(struct bnge_net *bn, · 15 unmodified lines
1317 struct hwrm_ring_alloc_output *resp;1317 struct hwrm_ring_alloc_output *resp;
1318 struct hwrm_ring_alloc_input *req;1318 struct hwrm_ring_alloc_input *req;
1319 struct bnge_dev *bd = bn->bd;1319 struct bnge_dev *bd = bn->bd;
1320 u16 ring_id, flags = 0;1320 u32 ring_id, flags = 0;
1321 int rc;1321 int rc;
1322 1322
1323 rc = bnge_hwrm_req_init(bd, req, HWRM_RING_ALLOC);1323 rc = bnge_hwrm_req_init(bd, req, HWRM_RING_ALLOC);
@@ -1401,7 +1401,7 @@ int hwrm_ring_alloc_send_msg(struct bnge_net *bn, · 77 unmodified lines
1401 1401
1402 resp = bnge_hwrm_req_hold(bd, req);1402 resp = bnge_hwrm_req_hold(bd, req);
1403 rc = bnge_hwrm_req_send(bd, req);1403 rc = bnge_hwrm_req_send(bd, req);
1404 ring_id = le16_to_cpu(resp->ring_id);1404 ring_id = le32_to_cpu(resp->ring_id);
1405 bnge_hwrm_req_drop(bd, req);1405 bnge_hwrm_req_drop(bd, req);
1406 1406
1407exit:1407exit:
drivers/net/ethernet/broadcom/bnge/bnge_hwrm_lib.h+1−1
@@ -50,7 +50,7 @@ int bnge_hwrm_cfa_l2_set_rx_mask(struct bnge_dev *bd, · 49 unmodified lines
50void bnge_hwrm_stat_ctx_free(struct bnge_net *bn);50void bnge_hwrm_stat_ctx_free(struct bnge_net *bn);
51int bnge_hwrm_stat_ctx_alloc(struct bnge_net *bn);51int bnge_hwrm_stat_ctx_alloc(struct bnge_net *bn);
52int hwrm_ring_free_send_msg(struct bnge_net *bn, struct bnge_ring_struct *ring,52int hwrm_ring_free_send_msg(struct bnge_net *bn, struct bnge_ring_struct *ring,
53 u32 ring_type, int cmpl_ring_id);53 u32 ring_type, u32 cmpl_ring_id);
54int hwrm_ring_alloc_send_msg(struct bnge_net *bn,54int hwrm_ring_alloc_send_msg(struct bnge_net *bn,
55 struct bnge_ring_struct *ring,55 struct bnge_ring_struct *ring,
56 u32 ring_type, u32 map_index);56 u32 ring_type, u32 map_index);
drivers/net/ethernet/broadcom/bnge/bnge_netdev.c+24−26
@@ -1327,12 +1327,12 @@ err_free_core: · 1326 unmodified lines
1327 return rc;1327 return rc;
1328}1328}
1329 1329
1330u16 bnge_cp_ring_for_rx(struct bnge_rx_ring_info *rxr)1330u32 bnge_cp_ring_for_rx(struct bnge_rx_ring_info *rxr)
1331{1331{
1332 return rxr->rx_cpr->ring_struct.fw_ring_id;1332 return rxr->rx_cpr->ring_struct.fw_ring_id;
1333}1333}
1334 1334
1335u16 bnge_cp_ring_for_tx(struct bnge_tx_ring_info *txr)1335u32 bnge_cp_ring_for_tx(struct bnge_tx_ring_info *txr)
1336{1336{
1337 return txr->tx_cpr->ring_struct.fw_ring_id;1337 return txr->tx_cpr->ring_struct.fw_ring_id;
1338}1338}
@@ -1375,12 +1375,12 @@ static void bnge_init_nq_tree(struct bnge_net *bn) · 36 unmodified lines
1375 struct bnge_nq_ring_info *nqr = &bn->bnapi[i]->nq_ring;1375 struct bnge_nq_ring_info *nqr = &bn->bnapi[i]->nq_ring;
1376 struct bnge_ring_struct *ring = &nqr->ring_struct;1376 struct bnge_ring_struct *ring = &nqr->ring_struct;
1377 1377
1378 ring->fw_ring_id = INVALID_HW_RING_ID;1378 ring->fw_ring_id = INVALID_HW_RING_ID_32BIT;
1379 for (j = 0; j < nqr->cp_ring_count; j++) {1379 for (j = 0; j < nqr->cp_ring_count; j++) {
1380 struct bnge_cp_ring_info *cpr = &nqr->cp_ring_arr[j];1380 struct bnge_cp_ring_info *cpr = &nqr->cp_ring_arr[j];
1381 1381
1382 ring = &cpr->ring_struct;1382 ring = &cpr->ring_struct;
1383 ring->fw_ring_id = INVALID_HW_RING_ID;1383 ring->fw_ring_id = INVALID_HW_RING_ID_32BIT;
1384 }1384 }
1385 }1385 }
1386}1386}
@@ -1637,7 +1637,7 @@ static void bnge_init_one_rx_ring_rxbd(struct bnge_net *bn, · 250 unmodified lines
1637 1637
1638 ring = &rxr->rx_ring_struct;1638 ring = &rxr->rx_ring_struct;
1639 bnge_init_rxbd_pages(ring, type);1639 bnge_init_rxbd_pages(ring, type);
1640 ring->fw_ring_id = INVALID_HW_RING_ID;1640 ring->fw_ring_id = INVALID_HW_RING_ID_32BIT;
1641}1641}
1642 1642
1643static void bnge_init_one_agg_ring_rxbd(struct bnge_net *bn,1643static void bnge_init_one_agg_ring_rxbd(struct bnge_net *bn,
@@ -1647,7 +1647,7 @@ static void bnge_init_one_agg_ring_rxbd(struct bnge_net *bn, · 3 unmodified lines
1647 u32 type;1647 u32 type;
1648 1648
1649 ring = &rxr->rx_agg_ring_struct;1649 ring = &rxr->rx_agg_ring_struct;
1650 ring->fw_ring_id = INVALID_HW_RING_ID;1650 ring->fw_ring_id = INVALID_HW_RING_ID_32BIT;
1651 if (bnge_is_agg_reqd(bn->bd)) {1651 if (bnge_is_agg_reqd(bn->bd)) {
1652 type = ((u32)BNGE_RX_PAGE_SIZE << RX_BD_LEN_SHIFT) |1652 type = ((u32)BNGE_RX_PAGE_SIZE << RX_BD_LEN_SHIFT) |
1653 RX_BD_TYPE_RX_AGG_BD | RX_BD_FLAGS_SOP;1653 RX_BD_TYPE_RX_AGG_BD | RX_BD_FLAGS_SOP;
@@ -1708,7 +1708,7 @@ static void bnge_init_tx_rings(struct bnge_net *bn) · 54 unmodified lines
1708 struct bnge_tx_ring_info *txr = &bn->tx_ring[i];1708 struct bnge_tx_ring_info *txr = &bn->tx_ring[i];
1709 struct bnge_ring_struct *ring = &txr->tx_ring_struct;1709 struct bnge_ring_struct *ring = &txr->tx_ring_struct;
1710 1710
1711 ring->fw_ring_id = INVALID_HW_RING_ID;1711 ring->fw_ring_id = INVALID_HW_RING_ID_32BIT;
1712 1712
1713 netif_queue_set_napi(bn->netdev, i, NETDEV_QUEUE_TYPE_TX,1713 netif_queue_set_napi(bn->netdev, i, NETDEV_QUEUE_TYPE_TX,
1714 &txr->bnapi->napi);1714 &txr->bnapi->napi);
@@ -1867,7 +1867,7 @@ static int bnge_hwrm_rx_agg_ring_alloc(struct bnge_net *bn, · 152 unmodified lines
1867 ring->fw_ring_id);1867 ring->fw_ring_id);
1868 bnge_db_write(bn->bd, &rxr->rx_agg_db, rxr->rx_agg_prod);1868 bnge_db_write(bn->bd, &rxr->rx_agg_db, rxr->rx_agg_prod);
1869 bnge_db_write(bn->bd, &rxr->rx_db, rxr->rx_prod);1869 bnge_db_write(bn->bd, &rxr->rx_db, rxr->rx_prod);
1870 bn->grp_info[grp_idx].agg_fw_ring_id = ring->fw_ring_id;1870 bn->grp_info[grp_idx].agg_fw_ring_id = (u16)ring->fw_ring_id;
1871 1871
1872 return 0;1872 return 0;
1873}1873}
@@ -1886,7 +1886,7 @@ static int bnge_hwrm_rx_ring_alloc(struct bnge_net *bn, · 12 unmodified lines
1886 return rc;1886 return rc;
1887 1887
1888 bnge_set_db(bn, &rxr->rx_db, type, map_idx, ring->fw_ring_id);1888 bnge_set_db(bn, &rxr->rx_db, type, map_idx, ring->fw_ring_id);
1889 bn->grp_info[map_idx].rx_fw_ring_id = ring->fw_ring_id;1889 bn->grp_info[map_idx].rx_fw_ring_id = (u16)ring->fw_ring_id;
1890 1890
1891 return 0;1891 return 0;
1892}1892}
@@ -1916,7 +1916,7 @@ static int bnge_hwrm_ring_alloc(struct bnge_net *bn) · 23 unmodified lines
1916 bnge_set_db(bn, &nqr->nq_db, type, map_idx, ring->fw_ring_id);1916 bnge_set_db(bn, &nqr->nq_db, type, map_idx, ring->fw_ring_id);
1917 bnge_db_nq(bn, &nqr->nq_db, nqr->nq_raw_cons);1917 bnge_db_nq(bn, &nqr->nq_db, nqr->nq_raw_cons);
1918 enable_irq(vector);1918 enable_irq(vector);
1919 bn->grp_info[i].nq_fw_ring_id = ring->fw_ring_id;1919 bn->grp_info[i].nq_fw_ring_id = (u16)ring->fw_ring_id;
1920 1920
1921 if (!i) {1921 if (!i) {
1922 rc = bnge_hwrm_set_async_event_cr(bd, ring->fw_ring_id);1922 rc = bnge_hwrm_set_async_event_cr(bd, ring->fw_ring_id);
@@ -1986,15 +1986,13 @@ void bnge_fill_hw_rss_tbl(struct bnge_net *bn, struct bnge_vnic_info *vnic) · 63 unmodified lines
1986 tbl_size = bnge_get_rxfh_indir_size(bd);1986 tbl_size = bnge_get_rxfh_indir_size(bd);
1987 1987
1988 for (i = 0; i < tbl_size; i++) {1988 for (i = 0; i < tbl_size; i++) {
1989 u16 ring_id, j;1989 u32 j;
1990 1990
1991 j = bd->rss_indir_tbl[i];1991 j = bd->rss_indir_tbl[i];
1992 rxr = &bn->rx_ring[j];1992 rxr = &bn->rx_ring[j];
1993 1993
1994 ring_id = rxr->rx_ring_struct.fw_ring_id;1994 *ring_tbl++ = cpu_to_le16(rxr->rx_ring_struct.fw_ring_id);
1995 *ring_tbl++ = cpu_to_le16(ring_id);1995 *ring_tbl++ = cpu_to_le16(bnge_cp_ring_for_rx(rxr));
1996 ring_id = bnge_cp_ring_for_rx(rxr);
1997 *ring_tbl++ = cpu_to_le16(ring_id);
1998 }1996 }
1999}1997}
2000 1998
@@ -2285,7 +2283,7 @@ static void bnge_disable_int(struct bnge_net *bn) · 284 unmodified lines
2285 nqr = &bnapi->nq_ring;2283 nqr = &bnapi->nq_ring;
2286 ring = &nqr->ring_struct;2284 ring = &nqr->ring_struct;
2287 2285
2288 if (ring->fw_ring_id != INVALID_HW_RING_ID)2286 if (ring->fw_ring_id != INVALID_HW_RING_ID_32BIT)
2289 bnge_db_nq(bn, &nqr->nq_db, nqr->nq_raw_cons);2287 bnge_db_nq(bn, &nqr->nq_db, nqr->nq_raw_cons);
2290 }2288 }
2291}2289}
@@ -2401,7 +2399,7 @@ static void bnge_hwrm_rx_ring_free(struct bnge_net *bn, · 109 unmodified lines
2401 u32 grp_idx = rxr->bnapi->index;2399 u32 grp_idx = rxr->bnapi->index;
2402 u32 cmpl_ring_id;2400 u32 cmpl_ring_id;
2403 2401
2404 if (ring->fw_ring_id == INVALID_HW_RING_ID)2402 if (ring->fw_ring_id == INVALID_HW_RING_ID_32BIT)
2405 return;2403 return;
2406 2404
2407 cmpl_ring_id = bnge_cp_ring_for_rx(rxr);2405 cmpl_ring_id = bnge_cp_ring_for_rx(rxr);
@@ -2409,7 +2407,7 @@ static void bnge_hwrm_rx_ring_free(struct bnge_net *bn, · 1 unmodified line
2409 RING_FREE_REQ_RING_TYPE_RX,2407 RING_FREE_REQ_RING_TYPE_RX,
2410 close_path ? cmpl_ring_id :2408 close_path ? cmpl_ring_id :
2411 INVALID_HW_RING_ID);2409 INVALID_HW_RING_ID);
2412 ring->fw_ring_id = INVALID_HW_RING_ID;2410 ring->fw_ring_id = INVALID_HW_RING_ID_32BIT;
2413 bn->grp_info[grp_idx].rx_fw_ring_id = INVALID_HW_RING_ID;2411 bn->grp_info[grp_idx].rx_fw_ring_id = INVALID_HW_RING_ID;
2414}2412}
2415 2413
@@ -2421,14 +2419,14 @@ static void bnge_hwrm_rx_agg_ring_free(struct bnge_net *bn, · 5 unmodified lines
2421 u32 grp_idx = rxr->bnapi->index;2419 u32 grp_idx = rxr->bnapi->index;
2422 u32 cmpl_ring_id;2420 u32 cmpl_ring_id;
2423 2421
2424 if (ring->fw_ring_id == INVALID_HW_RING_ID)2422 if (ring->fw_ring_id == INVALID_HW_RING_ID_32BIT)
2425 return;2423 return;
2426 2424
2427 cmpl_ring_id = bnge_cp_ring_for_rx(rxr);2425 cmpl_ring_id = bnge_cp_ring_for_rx(rxr);
2428 hwrm_ring_free_send_msg(bn, ring, RING_FREE_REQ_RING_TYPE_RX_AGG,2426 hwrm_ring_free_send_msg(bn, ring, RING_FREE_REQ_RING_TYPE_RX_AGG,
2429 close_path ? cmpl_ring_id :2427 close_path ? cmpl_ring_id :
2430 INVALID_HW_RING_ID);2428 INVALID_HW_RING_ID);
2431 ring->fw_ring_id = INVALID_HW_RING_ID;2429 ring->fw_ring_id = INVALID_HW_RING_ID_32BIT;
2432 bn->grp_info[grp_idx].agg_fw_ring_id = INVALID_HW_RING_ID;2430 bn->grp_info[grp_idx].agg_fw_ring_id = INVALID_HW_RING_ID;
2433}2431}
2434 2432
@@ -2439,14 +2437,14 @@ static void bnge_hwrm_tx_ring_free(struct bnge_net *bn, · 4 unmodified lines
2439 struct bnge_ring_struct *ring = &txr->tx_ring_struct;2437 struct bnge_ring_struct *ring = &txr->tx_ring_struct;
2440 u32 cmpl_ring_id;2438 u32 cmpl_ring_id;
2441 2439
2442 if (ring->fw_ring_id == INVALID_HW_RING_ID)2440 if (ring->fw_ring_id == INVALID_HW_RING_ID_32BIT)
2443 return;2441 return;
2444 2442
2445 cmpl_ring_id = close_path ? bnge_cp_ring_for_tx(txr) :2443 cmpl_ring_id = close_path ? bnge_cp_ring_for_tx(txr) :
2446 INVALID_HW_RING_ID;2444 INVALID_HW_RING_ID;
2447 hwrm_ring_free_send_msg(bn, ring, RING_FREE_REQ_RING_TYPE_TX,2445 hwrm_ring_free_send_msg(bn, ring, RING_FREE_REQ_RING_TYPE_TX,
2448 cmpl_ring_id);2446 cmpl_ring_id);
2449 ring->fw_ring_id = INVALID_HW_RING_ID;2447 ring->fw_ring_id = INVALID_HW_RING_ID_32BIT;
2450}2448}
2451 2449
2452static void bnge_hwrm_cp_ring_free(struct bnge_net *bn,2450static void bnge_hwrm_cp_ring_free(struct bnge_net *bn,
@@ -2455,12 +2453,12 @@ static void bnge_hwrm_cp_ring_free(struct bnge_net *bn, · 2 unmodified lines
2455 struct bnge_ring_struct *ring;2453 struct bnge_ring_struct *ring;
2456 2454
2457 ring = &cpr->ring_struct;2455 ring = &cpr->ring_struct;
2458 if (ring->fw_ring_id == INVALID_HW_RING_ID)2456 if (ring->fw_ring_id == INVALID_HW_RING_ID_32BIT)
2459 return;2457 return;
2460 2458
2461 hwrm_ring_free_send_msg(bn, ring, RING_FREE_REQ_RING_TYPE_L2_CMPL,2459 hwrm_ring_free_send_msg(bn, ring, RING_FREE_REQ_RING_TYPE_L2_CMPL,
2462 INVALID_HW_RING_ID);2460 INVALID_HW_RING_ID);
2463 ring->fw_ring_id = INVALID_HW_RING_ID;2461 ring->fw_ring_id = INVALID_HW_RING_ID_32BIT;
2464}2462}
2465 2463
2466static void bnge_hwrm_ring_free(struct bnge_net *bn, bool close_path)2464static void bnge_hwrm_ring_free(struct bnge_net *bn, bool close_path)
@@ -2496,11 +2494,11 @@ static void bnge_hwrm_ring_free(struct bnge_net *bn, bool close_path) · 29 unmodified lines
2496 bnge_hwrm_cp_ring_free(bn, &nqr->cp_ring_arr[j]);2494 bnge_hwrm_cp_ring_free(bn, &nqr->cp_ring_arr[j]);
2497 2495
2498 ring = &nqr->ring_struct;2496 ring = &nqr->ring_struct;
2499 if (ring->fw_ring_id != INVALID_HW_RING_ID) {2497 if (ring->fw_ring_id != INVALID_HW_RING_ID_32BIT) {
2500 hwrm_ring_free_send_msg(bn, ring,2498 hwrm_ring_free_send_msg(bn, ring,
2501 RING_FREE_REQ_RING_TYPE_NQ,2499 RING_FREE_REQ_RING_TYPE_NQ,
2502 INVALID_HW_RING_ID);2500 INVALID_HW_RING_ID);
2503 ring->fw_ring_id = INVALID_HW_RING_ID;2501 ring->fw_ring_id = INVALID_HW_RING_ID_32BIT;
2504 bn->grp_info[i].nq_fw_ring_id = INVALID_HW_RING_ID;2502 bn->grp_info[i].nq_fw_ring_id = INVALID_HW_RING_ID;
2505 }2503 }
2506 }2504 }
drivers/net/ethernet/broadcom/bnge/bnge_netdev.h+2−2
@@ -630,8 +630,8 @@ struct bnge_l2_filter { · 629 unmodified lines
630 refcount_t refcnt;630 refcount_t refcnt;
631};631};
632 632
633u16 bnge_cp_ring_for_rx(struct bnge_rx_ring_info *rxr);633u32 bnge_cp_ring_for_rx(struct bnge_rx_ring_info *rxr);
634u16 bnge_cp_ring_for_tx(struct bnge_tx_ring_info *txr);634u32 bnge_cp_ring_for_tx(struct bnge_tx_ring_info *txr);
635void bnge_fill_hw_rss_tbl(struct bnge_net *bn, struct bnge_vnic_info *vnic);635void bnge_fill_hw_rss_tbl(struct bnge_net *bn, struct bnge_vnic_info *vnic);
636int bnge_alloc_rx_data(struct bnge_net *bn, struct bnge_rx_ring_info *rxr,636int bnge_alloc_rx_data(struct bnge_net *bn, struct bnge_rx_ring_info *rxr,
637 u16 prod, gfp_t gfp);637 u16 prod, gfp_t gfp);
drivers/net/ethernet/broadcom/bnge/bnge_rmem.h+1−1
@@ -184,7 +184,7 @@ struct bnge_ctx_mem_info { · 183 unmodified lines
184struct bnge_ring_struct {184struct bnge_ring_struct {
185 struct bnge_ring_mem_info ring_mem;185 struct bnge_ring_mem_info ring_mem;
186 186
187 u16 fw_ring_id;187 u32 fw_ring_id;
188 union {188 union {
189 u16 grp_idx;189 u16 grp_idx;
190 u16 map_idx; /* Used by NQs */190 u16 map_idx; /* Used by NQs */
include/linux/bnge/hsi.h+3−4
@@ -8317,8 +8317,7 @@ struct hwrm_ring_alloc_output { · 8316 unmodified lines
8317 __le16 req_type;8317 __le16 req_type;
8318 __le16 seq_id;8318 __le16 seq_id;
8319 __le16 resp_len;8319 __le16 resp_len;
8320 __le16 ring_id;8320 __le32 ring_id;
8321 __le16 logical_ring_id;
8322 u8 push_buffer_index;8321 u8 push_buffer_index;
8323 #define RING_ALLOC_RESP_PUSH_BUFFER_INDEX_PING_BUFFER 0x0UL8322 #define RING_ALLOC_RESP_PUSH_BUFFER_INDEX_PING_BUFFER 0x0UL
8324 #define RING_ALLOC_RESP_PUSH_BUFFER_INDEX_PONG_BUFFER 0x1UL8323 #define RING_ALLOC_RESP_PUSH_BUFFER_INDEX_PONG_BUFFER 0x1UL
@@ -8345,10 +8344,10 @@ struct hwrm_ring_free_input { · 20 unmodified lines
8345 u8 flags;8344 u8 flags;
8346 #define RING_FREE_REQ_FLAGS_VIRTIO_RING_VALID 0x1UL8345 #define RING_FREE_REQ_FLAGS_VIRTIO_RING_VALID 0x1UL
8347 #define RING_FREE_REQ_FLAGS_LAST RING_FREE_REQ_FLAGS_VIRTIO_RING_VALID8346 #define RING_FREE_REQ_FLAGS_LAST RING_FREE_REQ_FLAGS_VIRTIO_RING_VALID
8348 __le16 ring_id;8347 __le16 unused_1;
8349 __le32 prod_idx;8348 __le32 prod_idx;
8350 __le32 opaque;8349 __le32 opaque;
8351 __le32 unused_1;8350 __le32 ring_id;
8352};8351};
8353 8352
8354/* hwrm_ring_free_output (size:128b/16B) */8353/* hwrm_ring_free_output (size:128b/16B) */