This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: patch to fix mcast address reception


On Fri, 2002-07-26 at 06:29, Ken Cox wrote:
> While initializing and configuring the network stack, the enet chip is
> reset several times.  This causes it to lose its multicast addresses.
> This patch will reconfigure the mcast addresses if any are present in
> the interface struct.
> 

Committed:

Index: io/eth/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/io/eth/current/ChangeLog,v
retrieving revision 1.34
diff -u -5 -p -r1.34 ChangeLog
--- io/eth/current/ChangeLog	31 May 2002 01:05:55 -0000	1.34
+++ io/eth/current/ChangeLog	26 Jul 2002 14:59:55 -0000
@@ -1,5 +1,11 @@
+2002-07-26  Gary Thomas  <gary@chez-thomas.org>
+2002-07-26  Ken Cox <jkc@redhat.com>
+
+	* src/net/eth_drv.c (eth_drv_start): Force multicast address
+	setup any time chip is reset/reconfigured.
+
 2002-05-30  Jonathan Larmour  <jlarmour@redhat.com>
 
 	* cdl/eth_drivers.cdl: Provide CYGINT_IO_ETH_INT_SUPPORT_REQUIRED
 	interface to indicate if interrupt support is required.
 
Index: io/eth/current/src/net/eth_drv.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/io/eth/current/src/net/eth_drv.c,v
retrieving revision 1.22
diff -u -5 -p -r1.22 eth_drv.c
--- io/eth/current/src/net/eth_drv.c	23 May 2002 23:06:03 -0000	1.22
+++ io/eth/current/src/net/eth_drv.c	26 Jul 2002 14:58:07 -0000
@@ -408,12 +408,19 @@ eth_drv_stop(struct eth_drv_sc *sc)
 //
 static void
 eth_drv_start(struct eth_drv_sc *sc)
 {
     struct ifnet *ifp = &sc->sc_arpcom.ac_if;
+    int s;
     // Perform any hardware initialization
     (sc->funs->start)(sc, (unsigned char *)&sc->sc_arpcom.ac_enaddr, 0);
+    // resend multicast addresses if present
+    if(ifp->if_multiaddrs.lh_first && ifp->if_ioctl) {
+      	s = splimp();
+	ifp->if_ioctl(ifp, SIOCADDMULTI, 0);
+	splx(s);
+    }
     // Set 'running' flag, and clear output active flag.
     ifp->if_flags |= IFF_RUNNING;
     ifp->if_flags &= ~IFF_OACTIVE;
     sc->state |= ETH_DRV_STATE_ACTIVE;
     eth_drv_send(ifp);  // Try and start up transmit



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]