Author: gallatin
Date: Wed Apr  6 15:45:32 2011
New Revision: 220385
URL: http://svn.freebsd.org/changeset/base/220385

Log:
  Implement mxge_init()
  
  This fixes a long standing bug in mxge(4) where "ifconfig mxge0 $IP"
  did not bring the interface into a RUNNING state, like it does on
  most (all?) other FreeBSD NIC drivers.
  
  Thanks to gnn for mentioning the bug, and yongari for pointing out that
  ether_ioctl() invokes ifp->if_init() in SIOCSIFADDR.
  
  MFC after: 7 days

Modified:
  head/sys/dev/mxge/if_mxge.c

Modified: head/sys/dev/mxge/if_mxge.c
==============================================================================
--- head/sys/dev/mxge/if_mxge.c Wed Apr  6 15:36:19 2011        (r220384)
+++ head/sys/dev/mxge/if_mxge.c Wed Apr  6 15:45:32 2011        (r220385)
@@ -3054,6 +3054,14 @@ mxge_intr(void *arg)
 static void
 mxge_init(void *arg)
 {
+       mxge_softc_t *sc = arg;
+       struct ifnet *ifp = sc->ifp;
+
+
+       mtx_lock(&sc->driver_mtx);
+       if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
+               (void) mxge_open(sc);
+       mtx_unlock(&sc->driver_mtx);
 }
 
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to