Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F175811969
D60698.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D60698.diff
View Options
Index: sys/dev/bnxt/bnxt_en/bnxt.h
===================================================================
--- sys/dev/bnxt/bnxt_en/bnxt.h
+++ sys/dev/bnxt/bnxt_en/bnxt.h
@@ -672,8 +672,8 @@
uint8_t mpc_chnl_type; /* valid when queue_id == BNXT_MPC_QUEUE_ID */
struct iflib_dma_info ring_mem; /* manual DMA alloc for driver-private rings (MPC) */
struct bnxt_cp_ring *cp_ring; /* completion ring this TX ring reports to (MPC) */
- uint16_t prod; /* MPC TX ring producer index */
- uint16_t cons; /* MPC TX ring consumer index */
+ uint32_t prod; /* MPC TX ring producer index */
+ uint32_t cons; /* MPC TX ring consumer index */
struct mtx tx_lock; /* MPC TX ring lock */
union {
struct bnxt_sw_tx_bd *tx_buf_ring;
Index: sys/dev/bnxt/bnxt_en/bnxt_mpc.c
===================================================================
--- sys/dev/bnxt/bnxt_en/bnxt_mpc.c
+++ sys/dev/bnxt/bnxt_en/bnxt_mpc.c
@@ -844,8 +844,8 @@
{
uint32_t used, prod, cons;
- prod = atomic_load_acq_16(&txr->prod);
- cons = atomic_load_acq_16(&txr->cons);
+ prod = atomic_load_acq_32(&txr->prod);
+ cons = atomic_load_acq_32(&txr->cons);
if (prod >= cons)
used = prod - cons;
@@ -907,9 +907,8 @@
}
memcpy(txbd, data, len);
prod = ADVANCE_TX_BY(txr, prod, bds);
- /* Release-store pairs with the atomic_load_acq_16(&txr->prod) in
- * bnxt_tx_avail() and bnxt_adv_mpc_cons(). */
- atomic_store_rel_16(&txr->prod, prod);
+ /* Pairs with the acquire load of prod in bnxt_tx_avail(). */
+ atomic_store_rel_32(&txr->prod, prod);
softc->db_ops.bnxt_db_tx(txr, prod);
@@ -952,9 +951,9 @@
}
}
tx_cons = ADVANCE_TX_BY(txr, tx_cons, mpc_buf->inline_bds);
- /* Pairs with bnxt_tx_avail()'s atomic_load_acq_16(&txr->cons). */
- atomic_store_rel_16(&txr->cons, tx_cons);
- if (tx_cons == atomic_load_acq_16(&txr->prod))
+ /* Pairs with the acquire load in bnxt_tx_avail(). */
+ atomic_store_rel_32(&txr->cons, tx_cons);
+ if (tx_cons == atomic_load_acq_32(&txr->prod))
break;
mpc_buf = &txr->tx_mpc_buf_ring[tx_cons];
} while (mpc_buf->handle == BNXT_INV_MPC_HDL);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Oct 14, 1:58 PM (14 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40803366
Default Alt Text
D60698.diff (2 KB)
Attached To
Mode
D60698: if_bnxt: fix powerpc build of the MPC ring code
Attached
Detach File
Event Timeline
Log In to Comment