Date: Tue, 11 Dec 2001 08:32:07 -0800 (PST) From: Jean-Luc Richier <Jean-Luc.Richier@imag.fr> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/32699: Tulip ether card EN2242 (if_dc.c) use wrong multicast table Message-ID: <200112111632.fBBGW7w67855@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 32699 >Category: misc >Synopsis: Tulip ether card EN2242 (if_dc.c) use wrong multicast table >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Dec 11 08:40:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: Jean-Luc Richier >Release: 4.4 >Organization: LSR-IMAG, Grenoble, France >Environment: FreeBSD sonate.imag.fr 4.4-RELEASE FreeBSD 4.4-RELEASE #36: Fri Dec 7 18:44:42 CET 2001 root@sonate.imag.fr:/usr/src/sys/compile/SONATE i386 >Description: The ether multicast filter table is incorrectly initialized in the driver if_dc.c for the ether card of a XE3 HP portable computer.. Therefore multicast are not received and IPv6 does not not work correctly. The card is recognized as: dc0: <Accton EN2242 MiniPCI 10/100BaseTX> port 0x1c00-0x1cff mem 0xe8000000-0xe80003ff irq 11 at device 16.0 on pci0 >How-To-Repeat: Configure IPv6 on the computer and try to ping6 hosts not on the local network. This does not work. ndp -a show that the IPv6 router is not in the ndp table. Put the interface in promisc mode using tcpdump and try ping6 again. This time everything works well, until promisc mode is turned off and the NDP cache expires. >Fix: When looking in the driver source (if_dc.c), one can see that tulip like cards have two different algorithms to initialize the muticast filter table.Comparing FreeBSD code which fails and linux 2.4.9 driver (tulip_core.c) which works, one can see that the function invoked for the EN2242 card is the incorrect one. Changing the function corrects the bug. See proposed patch. The correction is also done for AN985, as the linux code says that the two cards are similar (but the AN985 is not tested) Proposed correction: *** sys/pci/if_dc.c.DIST Fri Jul 20 04:01:26 2001 --- sys/pci/if_dc.c Wed Oct 31 13:30:00 2001 *************** *** 1083,1089 **** ifma = ifma->ifma_link.le_next) { if (ifma->ifma_addr->sa_family != AF_LINK) continue; ! h = dc_crc_be(LLADDR((struct sockaddr_dl *)ifma->ifma_addr)); if (h < 32) hashes[0] |= (1 << h); else --- 1083,1093 ---- ifma = ifma->ifma_link.le_next) { if (ifma->ifma_addr->sa_family != AF_LINK) continue; ! if (DC_IS_CENTAUR(sc)) ! h = dc_crc_le(sc, ! LLADDR((struct sockaddr_dl *)ifma->ifma_addr)); ! else ! h = dc_crc_be(LLADDR((struct sockaddr_dl *)ifma->ifma_addr)); if (h < 32) hashes[0] |= (1 << h); else *************** *** 1753,1758 **** --- 1757,1763 ---- case DC_DEVICEID_AN985: case DC_DEVICEID_EN2242: sc->dc_type = DC_TYPE_AN985; + sc->dc_flags |= DC_64BIT_HASH; sc->dc_flags |= DC_TX_USE_TX_INTR; sc->dc_flags |= DC_TX_ADMTEK_WAR; sc->dc_pmode = DC_PMODE_MII; >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200112111632.fBBGW7w67855>