Hi Miod!
Looking good. No issues. ..and just for your information the relevant
ident from my dmesg:
OpenBSD 7.4-stable (TEST74) #13: Tue Feb 27 22:09:08 EET 2024
r...@miodfxpfix.strangeloop.cc:/var/obj/kernel/TEST74
AlphaServer DS15, 1000MHz
...
fxp0 at pci0 dev 9 function 0 "Intel 82559ER" rev 0x09, i82559S: dec
6600 irq 28, address 00:02:a5:20:c7:1e
inphy0 at fxp0 phy 1: i82555 10/100 PHY, rev. 4
fxp1 at pci0 dev 10 function 0 "Intel 82559ER" rev 0x09, i82559S: dec
6600 irq 4, address 00:02:a5:20:c7:1d
inphy1 at fxp1 phy 1: i82555 10/100 PHY, rev. 4
Thanks again guys keep up the good work :)
Dennis
On 2024-02-26 20:12, Miod Vallat wrote:
Hello,
thank you for your bug report. This appears to be a subtle bug
introduced in sys/dev/ic/fxp.c 1.49, a couple months short of being 20
years old.
The following diff ought to fix it. Can you give it a try on your
system?
Thanks,
Miod
Index: fxp.c
===================================================================
RCS file: /OpenBSD/src/sys/dev/ic/fxp.c,v
retrieving revision 1.133
diff -u -p -r1.133 fxp.c
--- fxp.c 10 Nov 2023 15:51:20 -0000 1.133
+++ fxp.c 26 Feb 2024 18:10:58 -0000
@@ -1382,11 +1382,12 @@ fxp_init(void *xsc)
else
bufs = FXP_NRFABUFS_MIN;
if (sc->rx_bufs > bufs) {
- while (sc->rfa_headm != NULL && sc->rx_bufs-- > bufs) {
+ while (sc->rfa_headm != NULL && sc->rx_bufs > bufs) {
rxmap = *((bus_dmamap_t *)sc->rfa_headm->m_ext.ext_buf);
bus_dmamap_unload(sc->sc_dmat, rxmap);
FXP_RXMAP_PUT(sc, rxmap);
sc->rfa_headm = m_free(sc->rfa_headm);
+ sc->rx_bufs--;
}
} else if (sc->rx_bufs < bufs) {
int err, tmp_rx_bufs = sc->rx_bufs;