2011-07-14 Till Straumann <strauman@slac.stanford.edu>

PR 1833/bsps
	* ne2000/ne2000.c: Addition of multicast support disabled broadcast
	reception. Patch also includes support to work on big endian CPUs.
This commit is contained in:
Joel Sherrill
2011-07-14 14:44:59 +00:00
parent 58679ac700
commit 1ca54022df
2 changed files with 12 additions and 8 deletions

View File

@@ -1,3 +1,9 @@
2011-07-14 Till Straumann <strauman@slac.stanford.edu>
PR 1833/bsps
* ne2000/ne2000.c: Addition of multicast support disabled broadcast
reception. Patch also includes support to work on big endian CPUs.
2011-07-14 Jennifer Averett
* make/custom/pcp4.cfg: New file.

View File

@@ -205,7 +205,8 @@ struct ne_ring
{
unsigned char rsr; /* receiver status */
unsigned char next; /* pointer to next packet */
unsigned short count; /* bytes in packet (length + 4) */
unsigned char cnt_lo; /* bytes in packet (length + 4) */
unsigned char cnt_hi; /* 16-bit, little-endian value */
};
/* Forward declarations to avoid warnings */
@@ -502,11 +503,8 @@ ne_init_hardware (struct ne_softc *sc)
/* Set page 0 registers */
outport_byte (port + CMDR, MSK_PG0 | MSK_RD2 | MSK_STP);
/* accept broadcast */
outport_byte (port + RCR, (sc->accept_broadcasts ? MSK_AB : 0));
/* accept multicast */
outport_byte (port + RCR, MSK_AM);
/* accept broadcast + multicast */
outport_byte (port + RCR, (sc->accept_broadcasts ? MSK_AB : 0) | MSK_AM);
/* Start interface */
outport_byte (port + CMDR, MSK_PG0 | MSK_RD2 | MSK_STA);
@@ -605,7 +603,7 @@ ne_rx_daemon (void *arg)
next = NE_FIRST_RX_PAGE;
/* check packet length */
len = hdr.count;
len = ( hdr.cnt_hi << 8 ) | hdr.cnt_lo;
if (currpage < startpage)
cnt1 = currpage + (NE_STOP_PAGE - NE_FIRST_RX_PAGE) - startpage;
else
@@ -684,7 +682,7 @@ ne_rx_daemon (void *arg)
m->m_data += sizeof (struct ether_header);
#ifdef DEBUG_NE
/* printk("[r%d]", hdr.count - sizeof(hdr)); */
/* printk("[r%d]", ((hdr.cnt_hi<<8) + hdr.cnt_lo - sizeof(hdr))); */
printk("<");
#endif
ether_input (ifp, eh, m);