Please test the following diff if you have an ne(4) NE2000
or compatible network adapter to ensure that it is still
operating properly after applying the diff.



Fix a wrong calculation bug around RX ring buffer memory address
slipped in about sixteen years ago (in NetBSD).  Fortunately, it
had been working for ages because some devices used address zero
and other devices ignored wrong higher bits.

>From NetBSD


Index: dp8390.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/dp8390.c,v
retrieving revision 1.41
diff -u -p -r1.41 dp8390.c
--- dp8390.c    28 Nov 2008 02:44:17 -0000      1.41
+++ dp8390.c    26 Feb 2010 02:02:21 -0000
@@ -106,7 +106,8 @@ dp8390_config(struct dp8390_softc *sc)
        sc->tx_page_start = sc->mem_start >> ED_PAGE_SHIFT;
        sc->rec_page_start = sc->tx_page_start + sc->txb_cnt * ED_TXBUF_SIZE;
        sc->rec_page_stop = sc->tx_page_start + (sc->mem_size >> ED_PAGE_SHIFT);
-       sc->mem_ring = sc->mem_start + (sc->rec_page_start << ED_PAGE_SHIFT);
+       sc->mem_ring = sc->mem_start +
+           ((sc->txb_cnt * ED_TXBUF_SIZE) << ED_PAGE_SHIFT);
        sc->mem_end = sc->mem_start + sc->mem_size;
 
        /* Now zero memory and verify that it is clear. */

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Reply via email to