Skip to content

Commit f53f3ba

Browse files
committed
Remove my workaround which prevented ice(4) from getting stuck in OACTIVE.
A much simpler fix for this issue was found by yasuoka@ for vmx(4). An equivalent fix will be applied to ice(4) shortly.
1 parent 58d1a60 commit f53f3ba

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

sys/dev/pci/if_ice.c

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: if_ice.c,v 1.47 2025/06/19 09:05:03 stsp Exp $ */
1+
/* $OpenBSD: if_ice.c,v 1.48 2025/06/20 09:27:49 stsp Exp $ */
22

33
/* Copyright (c) 2024, Intel Corporation
44
* All rights reserved.
@@ -29110,7 +29110,7 @@ ice_txeof(struct ice_softc *sc, struct ice_tx_queue *txq)
2911029110
struct ice_tx_desc *ring, *txd;
2911129111
struct ice_tx_map *txm;
2911229112
bus_dmamap_t map;
29113-
unsigned int cons, prod, last, free;
29113+
unsigned int cons, prod, last;
2911429114
unsigned int mask;
2911529115
uint64_t dtype;
2911629116
int done = 0;
@@ -29121,11 +29121,6 @@ ice_txeof(struct ice_softc *sc, struct ice_tx_queue *txq)
2912129121
if (cons == prod)
2912229122
return (0);
2912329123

29124-
free = cons;
29125-
if (free <= prod)
29126-
free += txq->desc_count;
29127-
free -= prod;
29128-
2912929124
bus_dmamap_sync(sc->sc_dmat, ICE_DMA_MAP(&txq->tx_desc_mem),
2913029125
0, ICE_DMA_LEN(&txq->tx_desc_mem), BUS_DMASYNC_POSTREAD);
2913129126

@@ -29167,15 +29162,6 @@ ice_txeof(struct ice_softc *sc, struct ice_tx_queue *txq)
2916729162

2916829163
if (ifq_is_oactive(ifq))
2916929164
ifq_restart(ifq);
29170-
else if (free <= ICE_MIN_DESC_COUNT + 1) {
29171-
/* XXX sometimes ring was OACTIVE but is_oactive() is false */
29172-
free = cons;
29173-
if (free <= prod)
29174-
free += txq->desc_count;
29175-
free -= prod;
29176-
if (free > ICE_MIN_DESC_COUNT + 1)
29177-
ifq_restart(ifq);
29178-
}
2917929165

2918029166
return (done);
2918129167
}

0 commit comments

Comments
 (0)