Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/dev/pci Pull up revision 1.49 (via patch, requested...



details:   https://anonhg.NetBSD.org/src/rev/567ced843056
branches:  netbsd-1-5
changeset: 492998:567ced843056
user:      he <he%NetBSD.org@localhost>
date:      Wed Mar 27 09:50:43 2002 +0000

description:
Pull up revision 1.49 (via patch, requested by is):
  Fix multicast reception on DP83815.  Fixes PR#15998.

diffstat:

 sys/dev/pci/if_sip.c |  13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diffs (48 lines):

diff -r 2e37dd6dee1a -r 567ced843056 sys/dev/pci/if_sip.c
--- a/sys/dev/pci/if_sip.c      Mon Mar 25 18:02:02 2002 +0000
+++ b/sys/dev/pci/if_sip.c      Wed Mar 27 09:50:43 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_sip.c,v 1.11.4.7 2002/03/09 17:02:19 he Exp $       */
+/*     $NetBSD: if_sip.c,v 1.11.4.8 2002/03/27 09:50:43 he Exp $       */
 
 /*-
  * Copyright (c) 1999 Network Computer, Inc.
@@ -1978,7 +1978,8 @@
        struct ether_multi *enm;
        u_int8_t *cp;    
        struct ether_multistep step; 
-       u_int32_t crc, mchash[16];
+       u_int32_t crc;
+       u_int16_t mchash[32];
        int i;
 
        /*
@@ -2025,13 +2026,13 @@
                                goto allmulti;
                        }
 
-                       crc = ether_crc32_le(enm->enm_addrlo, ETHER_ADDR_LEN);
+                       crc = ether_crc32_be(enm->enm_addrlo, ETHER_ADDR_LEN);
 
                        /* Just want the 9 most significant bits. */
                        crc >>= 23;
 
                        /* Set the corresponding bit in the hash table. */
-                       mchash[crc >> 5] |= 1 << (crc & 0x1f);
+                       mchash[crc >> 4] |= 1 << (crc & 0xf);
 
                        ETHER_NEXT_MULTI(step, enm);
                }
@@ -2063,11 +2064,9 @@
                /*
                 * Program the multicast hash table.
                 */
-               for (i = 0; i < 16; i++) {
+               for (i = 0; i < 32; i++) {
                        FILTER_EMIT(RFCR_NS_RFADDR_FILTMEM + (i * 2),
                            mchash[i] & 0xffff);
-                       FILTER_EMIT(RFCR_NS_RFADDR_FILTMEM + (i * 2) + 2,
-                           (mchash[i] >> 16) & 0xffff);
                }
        }
 #undef FILTER_EMIT



Home | Main Index | Thread Index | Old Index