tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

if_bnx issues



I am trying to integrate a number of fixes for if_bnx back to netbsd
proper.  These are mostly about issues that manifest under unreasonable
load leading to mbuf exhaustion.  I would like some review on these.

This fix is due to Beverly Schwartz.

The issue is failing to get new hw_cons value from the hardware due to a
missing dmamap_sync.  This patch did fix the issue (on i386) and systems
with it are stable, but I'm not 100% certain the dmamap_sync is entirely
right.

Index: sys/dev/pci/if_bnx.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_bnx.c,v
retrieving revision 1.57
diff -u -p -u -u -r1.57 if_bnx.c
--- if_bnx.c	9 Jul 2014 16:30:11 -0000	1.57
+++ if_bnx.c	5 Feb 2015 23:18:50 -0000
@@ -4656,6 +4656,8 @@ bnx_rx_intr(struct bnx_softc *sc)
 
 		/* Refresh hw_cons to see if there's new work */
 		if (sw_cons == hw_cons) {
+			bus_dmamap_sync(sc->bnx_dmatag, sc->status_map, 0,
+					BNX_STATUS_BLK_SZ, BUS_DMASYNC_POSTREAD);
 			hw_cons = sc->hw_rx_cons =
 			    sblk->status_rx_quick_consumer_index0;
 			if ((hw_cons & USABLE_RX_BD_PER_PAGE) ==

Attachment: pgpQ28FvdwolO.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index