diff for additional Ethernet driver ioctl cleaning needs testing.

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

diff for additional Ethernet driver ioctl cleaning needs testing.

Brad Smith-14
The following diff is the next step of some further cleaning
of the Ethernet ioctl handling code in the Ethernet drivers.
This takes advantage of the addition of MTU and multicast
handling to ether_ioctl() so some some duplicate code can be
removed from the individual drivers and simplifies things
a bit.

This needs testing with pretty much every NIC supported. Please
send me a dmesg with whatever you are able to test.

This mainly affects multicast handling which is used by things
such as IPv6, CARP and OSPF.


Index: arch/mac68k/dev/if_mc.c
===================================================================
RCS file: /cvs/src/sys/arch/mac68k/dev/if_mc.c,v
retrieving revision 1.18
diff -u -p -r1.18 if_mc.c
--- arch/mac68k/dev/if_mc.c 8 Oct 2008 23:53:08 -0000 1.18
+++ arch/mac68k/dev/if_mc.c 9 Oct 2008 00:00:07 -0000
@@ -176,15 +176,13 @@ mcioctl(ifp, cmd, data)
  caddr_t data;
 {
  struct mc_softc *sc = ifp->if_softc;
- struct ifaddr *ifa;
- struct ifreq *ifr;
+ struct ifaddr *ifa = (struct ifaddr *) data;
  int s, err = 0;
 
  s = splnet();
 
  switch (cmd) {
  case SIOCSIFADDR:
- ifa = (struct ifaddr *)data;
  ifp->if_flags |= IFF_UP;
  switch (ifa->ifa_addr->sa_family) {
 #ifdef INET
@@ -225,25 +223,14 @@ mcioctl(ifp, cmd, data)
  }
  break;
 
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- ifr = (struct ifreq *) data;
- err = (cmd == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_ethercom) :
-    ether_delmulti(ifr, &sc->sc_ethercom);
-
- if (err == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware
- * filter accordingly. But remember UP flag!
- */
- if (ifp->if_flags & IFF_RUNNING)
- mcreset(sc);
- err = 0;
- }
- break;
  default:
  err = ether_ioctl(ifp, &sc->sc_ethercom, cmd, data);
+ }
+
+ if (err == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ mcreset(sc);
+ err = 0;
  }
 
  splx(s);
Index: arch/mac68k/dev/if_sn.c
===================================================================
RCS file: /cvs/src/sys/arch/mac68k/dev/if_sn.c,v
retrieving revision 1.49
diff -u -p -r1.49 if_sn.c
--- arch/mac68k/dev/if_sn.c 8 Oct 2008 23:53:08 -0000 1.49
+++ arch/mac68k/dev/if_sn.c 9 Oct 2008 00:00:32 -0000
@@ -251,16 +251,14 @@ snsetup(struct sn_softc *sc, u_int8_t *l
 static int
 snioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
 {
- struct ifaddr *ifa;
- struct ifreq *ifr;
  struct sn_softc *sc = ifp->if_softc;
+ struct ifaddr *ifa = (struct ifaddr *) data;
  int s, err = 0;
 
  s = splnet();
 
  switch (cmd) {
  case SIOCSIFADDR:
- ifa = (struct ifaddr *)data;
  ifp->if_flags |= IFF_UP;
  switch (ifa->ifa_addr->sa_family) {
 #ifdef INET
@@ -301,26 +299,14 @@ snioctl(struct ifnet *ifp, u_long cmd, c
  }
  break;
 
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- ifr = (struct ifreq *) data;
- if (cmd == SIOCADDMULTI)
- err = ether_addmulti(ifr, &sc->sc_arpcom);
- else
- err = ether_delmulti(ifr, &sc->sc_arpcom);
-
- if (err == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware
- * filter accordingly. But remember UP flag!
- */
- if (ifp->if_flags & IFF_RUNNING)
- snreset(sc);
- err = 0;
- }
- break;
  default:
  err = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
+ }
+
+ if (err == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ snreset(sc);
+ err = 0;
  }
 
  splx(s);
Index: arch/macppc/dev/if_bm.c
===================================================================
RCS file: /cvs/src/sys/arch/macppc/dev/if_bm.c,v
retrieving revision 1.24
diff -u -p -r1.24 if_bm.c
--- arch/macppc/dev/if_bm.c 15 Oct 2008 19:12:19 -0000 1.24
+++ arch/macppc/dev/if_bm.c 15 Oct 2008 23:45:08 -0000
@@ -801,25 +801,6 @@ bmac_ioctl(struct ifnet *ifp, u_long cmd
 #endif
  break;
 
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (cmd == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->arpcom) :
-    ether_delmulti(ifr, &sc->arpcom);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware filter
- * accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING) {
- bmac_init(sc);
- bmac_setladrf(sc);
- }
- error = 0;
- }
- break;
-
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, cmd);
@@ -827,6 +808,14 @@ bmac_ioctl(struct ifnet *ifp, u_long cmd
 
  default:
  error = ether_ioctl(ifp, &sc->arpcom, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING) {
+ bmac_init(sc);
+ bmac_setladrf(sc);
+ }
+ error = 0;
  }
 
  splx(s);
Index: arch/macppc/dev/if_mc.c
===================================================================
RCS file: /cvs/src/sys/arch/macppc/dev/if_mc.c,v
retrieving revision 1.12
diff -u -p -r1.12 if_mc.c
--- arch/macppc/dev/if_mc.c 8 Oct 2008 23:53:08 -0000 1.12
+++ arch/macppc/dev/if_mc.c 9 Oct 2008 00:07:58 -0000
@@ -496,7 +496,6 @@ mc_ioctl(struct ifnet *ifp, u_long cmd,
 {
  struct mc_softc *sc = ifp->if_softc;
  struct ifaddr *ifa = (struct ifaddr *)data;
- struct ifreq *ifr;
  int s, err = 0;
 
  s = splnet();
@@ -537,25 +536,14 @@ mc_ioctl(struct ifnet *ifp, u_long cmd,
  }
  break;
 
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- ifr = (struct ifreq *) data;
- err = (cmd == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_arpcom) :
-    ether_delmulti(ifr, &sc->sc_arpcom);
-
- if (err == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware
- * filter accordingly. But remember UP flag!
- */
- if (ifp->if_flags & IFF_RUNNING)
- mc_reset(sc);
- err = 0;
- }
- break;
  default:
  err = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
+ }
+
+ if (err == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ mc_reset(sc);
+ err = 0;
  }
 
  splx(s);
Index: arch/mvme68k/dev/if_ie.c
===================================================================
RCS file: /cvs/src/sys/arch/mvme68k/dev/if_ie.c,v
retrieving revision 1.36
diff -u -p -r1.36 if_ie.c
--- arch/mvme68k/dev/if_ie.c 2 Oct 2008 20:21:13 -0000 1.36
+++ arch/mvme68k/dev/if_ie.c 2 Oct 2008 23:09:12 -0000
@@ -1806,7 +1806,6 @@ ieioctl(ifp, cmd, data)
 {
  struct ie_softc *sc = ifp->if_softc;
  struct ifaddr *ifa = (struct ifaddr *)data;
- struct ifreq *ifr = (struct ifreq *)data;
  int s, error = 0;
 
  s = splnet();
@@ -1861,25 +1860,14 @@ ieioctl(ifp, cmd, data)
 #endif
  break;
 
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (cmd == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_arpcom):
-    ether_delmulti(ifr, &sc->sc_arpcom);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware filter
- * accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- mc_reset(sc);
- error = 0;
- }
- break;
-
  default:
  error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ mc_reset(sc);
+ error = 0;
  }
 
  splx(s);
Index: arch/mvme88k/dev/if_ie.c
===================================================================
RCS file: /cvs/src/sys/arch/mvme88k/dev/if_ie.c,v
retrieving revision 1.42
diff -u -p -r1.42 if_ie.c
--- arch/mvme88k/dev/if_ie.c 2 Oct 2008 20:21:13 -0000 1.42
+++ arch/mvme88k/dev/if_ie.c 2 Oct 2008 23:10:43 -0000
@@ -1789,7 +1789,6 @@ ieioctl(ifp, cmd, data)
 {
  struct ie_softc *sc = ifp->if_softc;
  struct ifaddr *ifa = (struct ifaddr *)data;
- struct ifreq *ifr = (struct ifreq *)data;
  int s, error = 0;
 
  s = splnet();
@@ -1844,25 +1843,14 @@ ieioctl(ifp, cmd, data)
 #endif
  break;
 
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (cmd == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_arpcom):
-    ether_delmulti(ifr, &sc->sc_arpcom);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware filter
- * accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- mc_reset(sc);
- error = 0;
- }
- break;
-
  default:
  error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ mc_reset(sc);
+ error = 0;
  }
 
  splx(s);
Index: arch/sgi/dev/if_mec.c
===================================================================
RCS file: /cvs/src/sys/arch/sgi/dev/if_mec.c,v
retrieving revision 1.17
diff -u -p -r1.17 if_mec.c
--- arch/sgi/dev/if_mec.c 15 Oct 2008 19:12:19 -0000 1.17
+++ arch/sgi/dev/if_mec.c 15 Oct 2008 23:45:21 -0000
@@ -1060,12 +1060,6 @@ mec_ioctl(struct ifnet *ifp, u_long cmd,
  break;
  }
  break;
- case SIOCSIFMTU:
- if (ifr->ifr_mtu > ETHERMTU || ifr->ifr_mtu < ETHERMIN)
- error = EINVAL;
- else if (ifp->if_mtu != ifr->ifr_mtu)
- ifp->if_mtu = ifr->ifr_mtu;
- break;
 
  case SIOCSIFFLAGS:
  /*
@@ -1080,23 +1074,6 @@ mec_ioctl(struct ifnet *ifp, u_long cmd,
  mec_stop(ifp);
  break;
 
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (cmd == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_ac) :
-    ether_delmulti(ifr, &sc->sc_ac);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware
- * filter accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- mec_init(ifp);
- error = 0;
- }
- break;
-
  case SIOCSIFMEDIA:
  case SIOCGIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, cmd);
@@ -1104,6 +1081,12 @@ mec_ioctl(struct ifnet *ifp, u_long cmd,
 
  default:
  error = ether_ioctl(ifp, &sc->sc_ac, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ mec_init(ifp);
+ error = 0;
  }
 
  splx(s);
Index: arch/socppc/dev/if_tsec.c
===================================================================
RCS file: /cvs/src/sys/arch/socppc/dev/if_tsec.c,v
retrieving revision 1.13
diff -u -p -r1.13 if_tsec.c
--- arch/socppc/dev/if_tsec.c 15 Oct 2008 19:12:19 -0000 1.13
+++ arch/socppc/dev/if_tsec.c 15 Oct 2008 23:45:24 -0000
@@ -480,26 +480,6 @@ tsec_ioctl(struct ifnet *ifp, u_long cmd
  }
  break;
 
- case SIOCSIFMTU:
- if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ifp->if_hardmtu)
- error = EINVAL;
- else if (ifp->if_mtu != ifr->ifr_mtu)
- ifp->if_mtu = ifr->ifr_mtu;
- break;
-
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (cmd == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_ac) :
-    ether_delmulti(ifr, &sc->sc_ac);
-
- if (error == ENETRESET) {
- if (ifp->if_flags & IFF_RUNNING)
- tsec_iff(sc);
- error = 0;
- }
- break;
-
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->sc_media, cmd);
@@ -508,6 +488,12 @@ tsec_ioctl(struct ifnet *ifp, u_long cmd
  default:
  error = ether_ioctl(ifp, &sc->sc_ac, cmd, addr);
  break;
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ tsec_iff(sc);
+ error = 0;
  }
 
  splx(s);
Index: arch/sparc/dev/be.c
===================================================================
RCS file: /cvs/src/sys/arch/sparc/dev/be.c,v
retrieving revision 1.42
diff -u -p -r1.42 be.c
--- arch/sparc/dev/be.c 15 Oct 2008 19:12:19 -0000 1.42
+++ arch/sparc/dev/be.c 15 Oct 2008 23:45:26 -0000
@@ -615,28 +615,19 @@ beioctl(ifp, cmd, data)
  }
  break;
 
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (cmd == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_arpcom):
-    ether_delmulti(ifr, &sc->sc_arpcom);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware filter
- * accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- be_mcreset(sc);
- error = 0;
- }
- break;
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->sc_ifmedia, cmd);
  break;
+
  default:
  error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ be_mcreset(sc);
+ error = 0;
  }
 
  splx(s);
Index: arch/sparc/dev/hme.c
===================================================================
RCS file: /cvs/src/sys/arch/sparc/dev/hme.c,v
retrieving revision 1.57
diff -u -p -r1.57 hme.c
--- arch/sparc/dev/hme.c 14 Oct 2008 18:01:53 -0000 1.57
+++ arch/sparc/dev/hme.c 15 Oct 2008 23:45:27 -0000
@@ -440,28 +440,19 @@ hmeioctl(ifp, cmd, data)
  }
  break;
 
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (cmd == SIOCADDMULTI) ?
- ether_addmulti(ifr, &sc->sc_arpcom):
- ether_delmulti(ifr, &sc->sc_arpcom);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware filter
- * accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- hme_mcreset(sc);
- error = 0;
- }
- break;
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr,  &sc->sc_mii.mii_media, cmd);
  break;
+
  default:
  error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ hme_mcreset(sc);
+ error = 0;
  }
 
  sc->sc_if_flags = ifp->if_flags;
Index: arch/sparc/dev/if_ie.c
===================================================================
RCS file: /cvs/src/sys/arch/sparc/dev/if_ie.c,v
retrieving revision 1.38
diff -u -p -r1.38 if_ie.c
--- arch/sparc/dev/if_ie.c 2 Oct 2008 20:21:13 -0000 1.38
+++ arch/sparc/dev/if_ie.c 2 Oct 2008 23:17:42 -0000
@@ -1948,7 +1948,6 @@ ieioctl(ifp, cmd, data)
 {
  struct ie_softc *sc = ifp->if_softc;
  struct ifaddr *ifa = (struct ifaddr *)data;
- struct ifreq *ifr = (struct ifreq *)data;
  int s, error = 0;
 
  s = splnet();
@@ -2003,25 +2002,14 @@ ieioctl(ifp, cmd, data)
 #endif
  break;
 
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (cmd == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_arpcom):
-    ether_delmulti(ifr, &sc->sc_arpcom);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware filter
- * accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- mc_reset(sc);
- error = 0;
- }
- break;
-
  default:
  error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ mc_reset(sc);  
+ error = 0;
  }
 
  splx(s);
Index: arch/sparc/dev/qe.c
===================================================================
RCS file: /cvs/src/sys/arch/sparc/dev/qe.c,v
retrieving revision 1.31
diff -u -p -r1.31 qe.c
--- arch/sparc/dev/qe.c 2 Oct 2008 20:21:13 -0000 1.31
+++ arch/sparc/dev/qe.c 2 Oct 2008 23:18:52 -0000
@@ -634,28 +634,19 @@ qeioctl(ifp, cmd, data)
  }
  break;
 
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (cmd == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_arpcom):
-    ether_delmulti(ifr, &sc->sc_arpcom);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware filter
- * accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- qeinit(sc);
- error = 0;
- }
- break;
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->sc_ifmedia, cmd);
  break;
+
  default:
  error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ qeinit(sc);
+ error = 0;
  }
 
  splx(s);
Index: arch/vax/bi/if_ni.c
===================================================================
RCS file: /cvs/src/sys/arch/vax/bi/if_ni.c,v
retrieving revision 1.12
diff -u -p -r1.12 if_ni.c
--- arch/vax/bi/if_ni.c 8 Oct 2008 23:53:08 -0000 1.12
+++ arch/vax/bi/if_ni.c 9 Oct 2008 01:23:26 -0000
@@ -695,7 +695,6 @@ niioctl(ifp, cmd, data)
  caddr_t data;
 {
  struct ni_softc *sc = ifp->if_softc;
- struct ifreq *ifr = (struct ifreq *)data;
  struct ifaddr *ifa = (struct ifaddr *)data;
  int s, error = 0;
 
@@ -739,28 +738,14 @@ niioctl(ifp, cmd, data)
  }
  break;
 
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- /*
- * Update our multicast list.
- */
- error = (cmd == SIOCADDMULTI) ?
- ether_addmulti(ifr, &sc->sc_ec):
- ether_delmulti(ifr, &sc->sc_ec);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware filter
- * accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- ni_setup(sc);
- error = 0;
- }
- break;
-
  default:
  error = ether_ioctl(ifp, &sc->sc_ec, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ ni_setup(sc);
+ error = 0;
  }
 
  splx(s);
Index: arch/vax/if/if_qe.c
===================================================================
RCS file: /cvs/src/sys/arch/vax/if/if_qe.c,v
retrieving revision 1.23
diff -u -p -r1.23 if_qe.c
--- arch/vax/if/if_qe.c 8 Oct 2008 23:53:08 -0000 1.23
+++ arch/vax/if/if_qe.c 8 Oct 2008 23:54:38 -0000
@@ -631,7 +631,6 @@ int
 qeioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
 {
  struct qe_softc *sc = ifp->if_softc;
- struct ifreq *ifr = (struct ifreq *)data;
  struct ifaddr *ifa = (struct ifaddr *)data;
  int s, error = 0;
 
@@ -676,27 +675,14 @@ qeioctl(struct ifnet *ifp, u_long cmd, c
  }
  break;
 
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- /*
- * Update our multicast list.
- */
- error = (cmd == SIOCADDMULTI) ?
- ether_addmulti(ifr, &sc->sc_ac):
- ether_delmulti(ifr, &sc->sc_ac);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware filter
- * accordingly.
- */
- qe_setup(sc);
- error = 0;
- }
- break;
-
  default:
  error = ether_ioctl(ifp, &sc->sc_ac, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ qe_setup(sc);
+ error = 0;
  }
 
  splx(s);
Index: arch/vax/if/sgec.c
===================================================================
RCS file: /cvs/src/sys/arch/vax/if/sgec.c,v
retrieving revision 1.18
diff -u -p -r1.18 sgec.c
--- arch/vax/if/sgec.c 9 Oct 2008 00:17:54 -0000 1.18
+++ arch/vax/if/sgec.c 9 Oct 2008 01:24:36 -0000
@@ -625,7 +625,6 @@ zeioctl(ifp, cmd, data)
  caddr_t data;
 {
  struct ze_softc *sc = ifp->if_softc;
- struct ifreq *ifr = (struct ifreq *)data;
  struct ifaddr *ifa = (struct ifaddr *)data;
  int s, error = 0;
 
@@ -646,8 +645,7 @@ zeioctl(ifp, cmd, data)
 
  case SIOCSIFMEDIA:
  case SIOCGIFMEDIA:
- error = ifmedia_ioctl(ifp, (struct ifreq *)data,
-    &sc->sc_ifmedia, cmd);
+ error = ifmedia_ioctl(ifp, ifr, &sc->sc_ifmedia, cmd);
  break;
 
  case SIOCSIFFLAGS:
@@ -676,28 +674,14 @@ zeioctl(ifp, cmd, data)
  }
  break;
 
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- /*
- * Update our multicast list.
- */
- error = (cmd == SIOCADDMULTI) ?
- ether_addmulti(ifr, &sc->sc_ac):
- ether_delmulti(ifr, &sc->sc_ac);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware filter
- * accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- ze_setup(sc);
- error = 0;
- }
- break;
-
  default:
  error = ether_ioctl(ifp, &sc->sc_ac, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ ze_setup(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/ic/aic6915.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/aic6915.c,v
retrieving revision 1.7
diff -u -p -r1.7 aic6915.c
--- dev/ic/aic6915.c 2 Oct 2008 20:21:13 -0000 1.7
+++ dev/ic/aic6915.c 2 Oct 2008 23:33:17 -0000
@@ -571,27 +571,6 @@ sf_ioctl(struct ifnet *ifp, u_long cmd,
  sc->sc_flags = ifp->if_flags;
  break;
 
- case SIOCSIFMTU:
- if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ifp->if_hardmtu)
- error = EINVAL;
- else if (ifp->if_mtu != ifr->ifr_mtu)
- ifp->if_mtu = ifr->ifr_mtu;
- break;
-
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- ifr = (struct ifreq *)data;
- error = (cmd == SIOCADDMULTI) ?
- ether_addmulti(ifr, &sc->sc_arpcom) :
- ether_delmulti(ifr, &sc->sc_arpcom);
-
- if (error == ENETRESET) {
- if (ifp->if_flags & IFF_RUNNING)
- sf_set_filter(sc);
- error = 0;
- }
- break;
-
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, cmd);
@@ -599,6 +578,12 @@ sf_ioctl(struct ifnet *ifp, u_long cmd,
 
  default:
  error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ sf_set_filter(sc);
+ error = 0;
  }
 
  /* Try to get more packets going. */
Index: dev/ic/am7990.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/am7990.c,v
retrieving revision 1.42
diff -u -p -r1.42 am7990.c
--- dev/ic/am7990.c 2 Oct 2008 20:21:13 -0000 1.42
+++ dev/ic/am7990.c 2 Oct 2008 23:36:03 -0000
@@ -892,23 +892,6 @@ am7990_ioctl(ifp, cmd, data)
 #endif
  break;
 
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (cmd == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_arpcom) :
-    ether_delmulti(ifr, &sc->sc_arpcom);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware filter
- * accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- am7990_reset(sc);
- error = 0;
- }
- break;
-
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  if (sc->sc_hasifmedia)
@@ -919,6 +902,12 @@ am7990_ioctl(ifp, cmd, data)
 
  default:
  error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ am7990_reset(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/ic/atw.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/atw.c,v
retrieving revision 1.63
diff -u -p -r1.63 atw.c
--- dev/ic/atw.c 3 Oct 2008 00:58:39 -0000 1.63
+++ dev/ic/atw.c 3 Oct 2008 19:52:27 -0000
@@ -4041,13 +4041,6 @@ atw_ioctl(struct ifnet *ifp, u_long cmd,
  s = splnet();
 
  switch (cmd) {
-        case SIOCSIFMTU:
-                if (ifr->ifr_mtu > ETHERMTU || ifr->ifr_mtu < ETHERMIN) {
-                        error = EINVAL;
-                } else if (ifp->if_mtu != ifr->ifr_mtu) {
-                        ifp->if_mtu = ifr->ifr_mtu;
-                }
-                break;
         case SIOCSIFADDR:
                 ifp->if_flags |= IFF_UP;
 #ifdef INET
@@ -4056,6 +4049,7 @@ atw_ioctl(struct ifnet *ifp, u_long cmd,
                 }
 #endif  /* INET */
  /* FALLTHROUGH */
+
  case SIOCSIFFLAGS:
  if (ifp->if_flags & IFF_UP) {
  if (ATW_IS_ENABLED(sc)) {
@@ -4070,6 +4064,7 @@ atw_ioctl(struct ifnet *ifp, u_long cmd,
  } else if (ATW_IS_ENABLED(sc))
  atw_stop(ifp, 1);
  break;
+
  case SIOCADDMULTI:
  case SIOCDELMULTI:
  error = (cmd == SIOCADDMULTI) ?
@@ -4082,6 +4077,7 @@ atw_ioctl(struct ifnet *ifp, u_long cmd,
  error = 0;
  }
  break;
+
  default:
  error = ieee80211_ioctl(ifp, cmd, data);
  if (error == ENETRESET) {
Index: dev/ic/dc.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/dc.c,v
retrieving revision 1.106
diff -u -p -r1.106 dc.c
--- dev/ic/dc.c 15 Oct 2008 19:12:19 -0000 1.106
+++ dev/ic/dc.c 15 Oct 2008 23:45:49 -0000
@@ -3000,29 +3000,6 @@ dc_ioctl(struct ifnet *ifp, u_long comma
  }
  sc->dc_if_flags = ifp->if_flags;
  break;
- case SIOCSIFMTU:
- if (ifr->ifr_mtu > ETHERMTU || ifr->ifr_mtu < ETHERMIN) {
- error = EINVAL;
- } else if (ifp->if_mtu != ifr->ifr_mtu) {
- ifp->if_mtu = ifr->ifr_mtu;
- }
- break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (command == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_arpcom) :
-    ether_delmulti(ifr, &sc->sc_arpcom);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware
- * filter accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- dc_setfilt(sc);
- error = 0;
- }
- break;
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  mii = &sc->sc_mii;
@@ -3034,6 +3011,12 @@ dc_ioctl(struct ifnet *ifp, u_long comma
  break;
  default:
  error = ether_ioctl(ifp, &sc->sc_arpcom, command, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ dc_setfilt(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/ic/dp8390.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/dp8390.c,v
retrieving revision 1.40
diff -u -p -r1.40 dp8390.c
--- dev/ic/dp8390.c 3 Oct 2008 20:25:29 -0000 1.40
+++ dev/ic/dp8390.c 3 Oct 2008 20:27:08 -0000
@@ -839,14 +839,6 @@ dp8390_ioctl(struct ifnet *ifp, u_long c
  }
  break;
 
- case SIOCSIFMTU:
- if (ifr->ifr_mtu > ETHERMTU || ifr->ifr_mtu < ETHERMIN) {
- error = EINVAL;
- } else if (ifp->if_mtu != ifr->ifr_mtu) {
- ifp->if_mtu = ifr->ifr_mtu;
- }
- break;
-
  case SIOCSIFFLAGS:
  if ((ifp->if_flags & IFF_UP) == 0 &&
     (ifp->if_flags & IFF_RUNNING) != 0) {
@@ -876,31 +868,6 @@ dp8390_ioctl(struct ifnet *ifp, u_long c
  }
  break;
 
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- if (sc->sc_enabled == 0) {
- error = EIO;
- break;
- }
-
- /* Update our multicast list. */
- error = (cmd == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_arpcom) :
-    ether_delmulti(ifr, &sc->sc_arpcom);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware filter
- * accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING) {
- dp8390_stop(sc); /* XXX for ds_setmcaf? */
- dp8390_init(sc);
- }
- error = 0;
- }
- break;
-
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->sc_media, cmd);
@@ -908,6 +875,14 @@ dp8390_ioctl(struct ifnet *ifp, u_long c
 
  default:
  error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING) {
+ dp8390_stop(sc); /* XXX for ds_setmcaf? */
+ dp8390_init(sc);
+ }
+ error = 0;
  }
 
  splx(s);
Index: dev/ic/elink3.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/elink3.c,v
retrieving revision 1.72
diff -u -p -r1.72 elink3.c
--- dev/ic/elink3.c 2 Oct 2008 20:21:13 -0000 1.72
+++ dev/ic/elink3.c 3 Oct 2008 00:11:27 -0000
@@ -1499,14 +1499,6 @@ epioctl(ifp, cmd, data)
  error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, cmd);
  break;
 
- case SIOCSIFMTU:
- if (ifr->ifr_mtu > ETHERMTU || ifr->ifr_mtu < ETHERMIN) {
- error = EINVAL;
- } else if (ifp->if_mtu != ifr->ifr_mtu) {
- ifp->if_mtu = ifr->ifr_mtu;
- }
- break;
-
  case SIOCSIFFLAGS:
  if ((ifp->if_flags & IFF_UP) == 0 &&
     (ifp->if_flags & IFF_RUNNING) != 0) {
@@ -1532,25 +1524,14 @@ epioctl(ifp, cmd, data)
  }
  break;
 
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (cmd == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_arpcom) :
-    ether_delmulti(ifr, &sc->sc_arpcom);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware filter
- * accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- epreset(sc);
- error = 0;
- }
- break;
-
  default:
  error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ epreset(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/ic/fxp.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/fxp.c,v
retrieving revision 1.93
diff -u -p -r1.93 fxp.c
--- dev/ic/fxp.c 2 Oct 2008 20:21:13 -0000 1.93
+++ dev/ic/fxp.c 3 Oct 2008 00:13:56 -0000
@@ -1644,13 +1644,6 @@ fxp_ioctl(struct ifnet *ifp, u_long comm
 #endif
  break;
 
- case SIOCSIFMTU:
- if (ifr->ifr_mtu > ETHERMTU || ifr->ifr_mtu < ETHERMIN)
- error = EINVAL;
- else if (ifp->if_mtu != ifr->ifr_mtu)
- ifp->if_mtu = ifr->ifr_mtu;
- break;
-
  case SIOCSIFFLAGS:
  /*
  * If interface is marked up and not running, then start it.
@@ -1664,22 +1657,6 @@ fxp_ioctl(struct ifnet *ifp, u_long comm
  fxp_stop(sc, 1);
  break;
 
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (command == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_arpcom) :
-    ether_delmulti(ifr, &sc->sc_arpcom);
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware
- * filter accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- fxp_init(sc);
- error = 0;
- }
- break;
-
  case SIOCSIFMEDIA:
  case SIOCGIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, command);
@@ -1687,6 +1664,12 @@ fxp_ioctl(struct ifnet *ifp, u_long comm
 
  default:
  error = ether_ioctl(ifp, &sc->sc_arpcom, command, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ fxp_init(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/ic/gem.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/gem.c,v
retrieving revision 1.82
diff -u -p -r1.82 gem.c
--- dev/ic/gem.c 7 Nov 2008 18:03:52 -0000 1.82
+++ dev/ic/gem.c 18 Nov 2008 22:45:49 -0000
@@ -1463,31 +1463,6 @@ gem_ioctl(struct ifnet *ifp, u_long cmd,
 #endif
  break;
 
- case SIOCSIFMTU:
- if (ifr->ifr_mtu > ETHERMTU || ifr->ifr_mtu < ETHERMIN) {
- error = EINVAL;
- } else if (ifp->if_mtu != ifr->ifr_mtu) {
- ifp->if_mtu = ifr->ifr_mtu;
- }
- break;
-
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (cmd == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_arpcom) :
-    ether_delmulti(ifr, &sc->sc_arpcom);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware filter
- * accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- gem_setladrf(sc);
- error = 0;
- }
- break;
-
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->sc_media, cmd);
@@ -1495,6 +1470,12 @@ gem_ioctl(struct ifnet *ifp, u_long cmd,
 
  default:
  error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ gem_setladrf(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/ic/hme.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/hme.c,v
retrieving revision 1.51
diff -u -p -r1.51 hme.c
--- dev/ic/hme.c 2 Oct 2008 20:21:13 -0000 1.51
+++ dev/ic/hme.c 3 Oct 2008 02:42:06 -0000
@@ -1269,23 +1269,6 @@ hme_ioctl(ifp, cmd, data)
 #endif
  break;
 
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (cmd == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_arpcom) :
-    ether_delmulti(ifr, &sc->sc_arpcom);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware filter
- * accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- hme_setladrf(sc);
- error = 0;
- }
- break;
-
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->sc_media, cmd);
@@ -1293,6 +1276,12 @@ hme_ioctl(ifp, cmd, data)
 
  default:
  error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ hme_setladrf(sc);
+ error = 0;
  }
 
  sc->sc_if_flags = ifp->if_flags;
Index: dev/ic/i82596.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/i82596.c,v
retrieving revision 1.31
diff -u -p -r1.31 i82596.c
--- dev/ic/i82596.c 3 Oct 2008 00:19:55 -0000 1.31
+++ dev/ic/i82596.c 3 Oct 2008 00:21:26 -0000
@@ -1920,23 +1920,6 @@ i82596_ioctl(ifp, cmd, data)
 #endif
  break;
 
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (cmd == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_arpcom):
-    ether_delmulti(ifr, &sc->sc_arpcom);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware filter
- * accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- ie_mc_reset(sc);
- error = 0;
- }
- break;
-
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->sc_media, cmd);
@@ -1944,6 +1927,12 @@ i82596_ioctl(ifp, cmd, data)
 
  default:
  error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ ie_mc_reset(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/ic/if_wi.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/if_wi.c,v
retrieving revision 1.142
diff -u -p -r1.142 if_wi.c
--- dev/ic/if_wi.c 15 Oct 2008 19:12:19 -0000 1.142
+++ dev/ic/if_wi.c 15 Oct 2008 23:45:50 -0000
@@ -1589,15 +1589,6 @@ wi_ioctl(struct ifnet *ifp, u_long comma
  break;
  }
  break;
-
- case SIOCSIFMTU:
- if (ifr->ifr_mtu > ETHERMTU || ifr->ifr_mtu < ETHERMIN) {
- error = EINVAL;
- } else if (ifp->if_mtu != ifr->ifr_mtu) {
- ifp->if_mtu = ifr->ifr_mtu;
- }
- break;
-
  case SIOCSIFFLAGS:
  if (ifp->if_flags & IFF_UP) {
  if (ifp->if_flags & IFF_RUNNING &&
@@ -1617,23 +1608,6 @@ wi_ioctl(struct ifnet *ifp, u_long comma
  sc->wi_if_flags = ifp->if_flags;
  error = 0;
  break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- /* Update our multicast list. */
- error = (command == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_ic.ic_ac) :
-    ether_delmulti(ifr, &sc->sc_ic.ic_ac);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware filter
- * accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- wi_setmulti(sc);
- error = 0;
- }
- break;
  case SIOCSIFMEDIA:
  case SIOCGIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->sc_media, command);
@@ -2049,6 +2023,12 @@ wi_ioctl(struct ifnet *ifp, u_long comma
  break;
  default:
  error = ether_ioctl(ifp, &sc->sc_ic.ic_ac, command, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ wi_setmulti(sc);
+ error = 0;
  }
 
  if (wreq)
Index: dev/ic/lemac.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/lemac.c,v
retrieving revision 1.11
diff -u -p -r1.11 lemac.c
--- dev/ic/lemac.c 2 Oct 2008 20:21:13 -0000 1.11
+++ dev/ic/lemac.c 3 Oct 2008 01:49:21 -0000
@@ -792,10 +792,9 @@ int
 lemac_ifioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
 {
  struct lemac_softc *const sc = LEMAC_IFP_TO_SOFTC(ifp);
- int s;
- int error = 0;
  struct ifaddr *ifa = (struct ifaddr *)data;
  struct ifreq *ifr = (struct ifreq *)data;
+ int s, error = 0;
 
  s = splnet();
 
@@ -819,39 +818,19 @@ lemac_ifioctl(struct ifnet *ifp, u_long
  lemac_init(sc);
  break;
 
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- /*
- * Update multicast listeners
- */
- error = (cmd == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_arpcom) :
-    ether_delmulti(ifr, &sc->sc_arpcom);
-
- if (error == ENETRESET) {
- /* Reset multicast filtering. */
- if (ifp->if_flags & IFF_RUNNING)
- lemac_init(sc);
- error = 0;
- }
- break;
-
  case SIOCSIFMEDIA:
  case SIOCGIFMEDIA:
- error = ifmedia_ioctl(ifp, (struct ifreq *)data,
-    &sc->sc_ifmedia, cmd);
- break;
-
- case SIOCSIFMTU:
- if (ifr->ifr_mtu > ETHERMTU || ifr->ifr_mtu < ETHERMIN) {
- error = EINVAL;
- } else if (ifp->if_mtu != ifr->ifr_mtu) {
- ifp->if_mtu = ifr->ifr_mtu;
- }
+ error = ifmedia_ioctl(ifp, ifr, &sc->sc_ifmedia, cmd);
  break;
 
  default:
  error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ lemac_init(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/ic/mtd8xx.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/mtd8xx.c,v
retrieving revision 1.15
diff -u -p -r1.15 mtd8xx.c
--- dev/ic/mtd8xx.c 14 Oct 2008 18:01:53 -0000 1.15
+++ dev/ic/mtd8xx.c 15 Oct 2008 23:45:51 -0000
@@ -578,8 +578,8 @@ static int
 mtd_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
 {
  struct mtd_softc *sc = ifp->if_softc;
- struct ifreq *ifr = (struct ifreq *)data;
  struct ifaddr *ifa = (struct ifaddr *)data;
+ struct ifreq *ifr = (struct ifreq *)data;
  int s, error = 0;
 
  s = splnet();
@@ -596,12 +596,6 @@ mtd_ioctl(struct ifnet *ifp, u_long comm
 #endif /* INET */
  }
  break;
- case SIOCSIFMTU:
- if (ifr->ifr_mtu >= ETHERMIN && ifr->ifr_mtu <= ETHERMTU)
- ifp->if_mtu = ifr->ifr_mtu;
- else
- error = EINVAL;
- break;
 
  case SIOCSIFFLAGS:
  if (ifp->if_flags & IFF_UP)
@@ -612,28 +606,19 @@ mtd_ioctl(struct ifnet *ifp, u_long comm
  }
  error = 0;
  break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (command == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_arpcom) :
-    ether_delmulti(ifr, &sc->sc_arpcom);
 
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware
- * filter accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- mtd_setmulti(sc);
- error = 0;
- }
- break;
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, command);
  break;
  default:
  error = ether_ioctl(ifp, &sc->sc_arpcom, command, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ mtd_setmulti(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/ic/re.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/re.c,v
retrieving revision 1.101
diff -u -p -r1.101 re.c
--- dev/ic/re.c 17 Nov 2008 01:25:31 -0000 1.101
+++ dev/ic/re.c 18 Nov 2008 22:45:52 -0000
@@ -2108,12 +2108,6 @@ re_ioctl(struct ifnet *ifp, u_long comma
  arp_ifinit(&sc->sc_arpcom, ifa);
 #endif /* INET */
  break;
- case SIOCSIFMTU:
- if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ifp->if_hardmtu)
- error = EINVAL;
- else if (ifp->if_mtu != ifr->ifr_mtu)
- ifp->if_mtu = ifr->ifr_mtu;
- break;
  case SIOCSIFFLAGS:
  if (ifp->if_flags & IFF_UP) {
  if (ifp->if_flags & IFF_RUNNING)
@@ -2126,27 +2120,18 @@ re_ioctl(struct ifnet *ifp, u_long comma
  }
  sc->if_flags = ifp->if_flags;
  break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (command == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_arpcom) :
-    ether_delmulti(ifr, &sc->sc_arpcom);
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware
- * filter accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- re_iff(sc);
- error = 0;
- }
- break;
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, command);
  break;
  default:
  error = ether_ioctl(ifp, &sc->sc_arpcom, command, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ re_iff(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/ic/rtl81x9.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/rtl81x9.c,v
retrieving revision 1.61
diff -u -p -r1.61 rtl81x9.c
--- dev/ic/rtl81x9.c 14 Oct 2008 18:01:53 -0000 1.61
+++ dev/ic/rtl81x9.c 15 Oct 2008 23:45:52 -0000
@@ -1083,7 +1083,7 @@ int rl_ioctl(ifp, command, data)
 {
  struct rl_softc *sc = ifp->if_softc;
  struct ifreq *ifr = (struct ifreq *) data;
- struct ifaddr *ifa = (struct ifaddr *)data;
+ struct ifaddr *ifa = (struct ifaddr *) data;
  int s, error = 0;
 
  s = splnet();
@@ -1103,13 +1103,6 @@ int rl_ioctl(ifp, command, data)
  break;
  }
  break;
- case SIOCSIFMTU:
- if (ifr->ifr_mtu > ETHERMTU || ifr->ifr_mtu < ETHERMIN) {
- error = EINVAL;
- } else if (ifp->if_mtu != ifr->ifr_mtu) {
- ifp->if_mtu = ifr->ifr_mtu;
- }
- break;
  case SIOCSIFFLAGS:
  if (ifp->if_flags & IFF_UP) {
  rl_init(sc);
@@ -1119,28 +1112,18 @@ int rl_ioctl(ifp, command, data)
  }
  error = 0;
  break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (command == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_arpcom) :
-    ether_delmulti(ifr, &sc->sc_arpcom);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware
- * filter accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- rl_setmulti(sc);
- error = 0;
- }
- break;
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, command);
  break;
  default:
  error = ether_ioctl(ifp, &sc->sc_arpcom, command, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ rl_setmulti(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/ic/rtw.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/rtw.c,v
retrieving revision 1.70
diff -u -p -r1.70 rtw.c
--- dev/ic/rtw.c 27 Aug 2008 10:29:53 -0000 1.70
+++ dev/ic/rtw.c 11 Oct 2008 18:15:39 -0000
@@ -2614,21 +2614,15 @@ rtw_led_attach(struct rtw_led_state *ls,
 int
 rtw_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
 {
- int rc = 0, s;
  struct rtw_softc *sc = ifp->if_softc;
  struct ieee80211com *ic = &sc->sc_ic;
- struct ifreq *ifr = (struct ifreq *)data;
  struct ifaddr *ifa = (struct ifaddr *)data;
+ struct ifreq *ifr = (struct ifreq *)data;
+ int rc = 0, s;
 
  s = splnet();
+
  switch (cmd) {
- case SIOCSIFMTU:
- if (ifr->ifr_mtu > ETHERMTU || ifr->ifr_mtu < ETHERMIN) {
- rc = EINVAL;
- } else if (ifp->if_mtu != ifr->ifr_mtu) {
- ifp->if_mtu = ifr->ifr_mtu;
- }
- break;
  case SIOCSIFADDR:
  ifp->if_flags |= IFF_UP;
 #ifdef INET
@@ -2647,6 +2641,7 @@ rtw_ioctl(struct ifnet *ifp, u_long cmd,
  } else if ((sc->sc_flags & RTW_F_ENABLED) != 0)
  rtw_stop(ifp, 1);
  break;
+
  case SIOCADDMULTI:
  case SIOCDELMULTI:
  if (cmd == SIOCADDMULTI)
@@ -2659,6 +2654,7 @@ rtw_ioctl(struct ifnet *ifp, u_long cmd,
  rtw_pktfilt_load(sc);
  rc = 0;
  break;
+
  default:
  if ((rc = ieee80211_ioctl(ifp, cmd, data)) == ENETRESET) {
  if ((sc->sc_flags & RTW_F_ENABLED) != 0)
@@ -2668,6 +2664,7 @@ rtw_ioctl(struct ifnet *ifp, u_long cmd,
  }
  break;
  }
+
  splx(s);
  return rc;
 }
Index: dev/ic/smc83c170.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/smc83c170.c,v
retrieving revision 1.12
diff -u -p -r1.12 smc83c170.c
--- dev/ic/smc83c170.c 2 Oct 2008 20:21:13 -0000 1.12
+++ dev/ic/smc83c170.c 3 Oct 2008 00:47:41 -0000
@@ -549,8 +549,8 @@ int
 epic_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
 {
  struct epic_softc *sc = ifp->if_softc;
- struct ifreq *ifr = (struct ifreq *)data;
  struct ifaddr *ifa = (struct ifaddr *)data;
+ struct ifreq *ifr = (struct ifreq *)data;
  int s, error = 0;
 
  s = splnet();
@@ -572,13 +572,6 @@ epic_ioctl(struct ifnet *ifp, u_long cmd
  }
  break;
 
-        case SIOCSIFMTU:
- if (ifr->ifr_mtu > ETHERMTU || ifr->ifr_mtu < ETHERMIN)
- error = EINVAL;
- else if (ifp->if_mtu != ifr->ifr_mtu)
- ifp->if_mtu = ifr->ifr_mtu;
- break;
-
  case SIOCSIFFLAGS:
  /*
  * If interface is marked up and not running, then start it.
@@ -592,25 +585,6 @@ epic_ioctl(struct ifnet *ifp, u_long cmd
  epic_stop(ifp, 1);
  break;
 
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (cmd == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_arpcom) :
-    ether_delmulti(ifr, &sc->sc_arpcom);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware
- * filter accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING) {
- mii_pollstat(&sc->sc_mii);
- epic_set_mchash(sc);
- }
- error = 0;
- }
- break;
-
  case SIOCSIFMEDIA:
  case SIOCGIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, cmd);
@@ -618,6 +592,14 @@ epic_ioctl(struct ifnet *ifp, u_long cmd
 
  default:
  error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING) {
+ mii_pollstat(&sc->sc_mii);
+ epic_set_mchash(sc);
+ }
+ error = 0;
  }
 
  splx(s);
Index: dev/ic/smc91cxx.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/smc91cxx.c,v
retrieving revision 1.29
diff -u -p -r1.29 smc91cxx.c
--- dev/ic/smc91cxx.c 3 Oct 2008 20:25:29 -0000 1.29
+++ dev/ic/smc91cxx.c 3 Oct 2008 20:27:18 -0000
@@ -1089,27 +1089,6 @@ smc91cxx_ioctl(ifp, cmd, data)
  }
  break;
 
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- if ((sc->sc_flags & SMC_FLAGS_ENABLED) == 0) {
- error = EIO;
- break;
- }
-
- error = (cmd == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_arpcom) :
-    ether_delmulti(ifr, &sc->sc_arpcom);
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware
- * filter accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- smc91cxx_reset(sc);
- error = 0;
- }
- break;
-
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, cmd);
@@ -1117,6 +1096,12 @@ smc91cxx_ioctl(ifp, cmd, data)
 
  default:
  error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ smc91cxx_reset(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/ic/xl.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/xl.c,v
retrieving revision 1.82
diff -u -p -r1.82 xl.c
--- dev/ic/xl.c 2 Oct 2008 20:21:13 -0000 1.82
+++ dev/ic/xl.c 3 Oct 2008 00:35:58 -0000
@@ -2282,13 +2282,6 @@ xl_ioctl(struct ifnet *ifp, u_long comma
 #endif /* INET */
  break;
 
- case SIOCSIFMTU:
- if (ifr->ifr_mtu > ETHERMTU || ifr->ifr_mtu < ETHERMIN)
- error = EINVAL;
- else if (ifp->if_mtu != ifr->ifr_mtu)
- ifp->if_mtu = ifr->ifr_mtu;
- break;
-
  case SIOCSIFFLAGS:
  XL_SEL_WIN(5);
  if (ifp->if_flags & IFF_UP) {
@@ -2307,26 +2300,6 @@ xl_ioctl(struct ifnet *ifp, u_long comma
  }
  sc->xl_if_flags = ifp->if_flags;
  break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (command == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_arpcom) :
-    ether_delmulti(ifr, &sc->sc_arpcom);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware
- * filter accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING) {
- if (sc->xl_type == XL_TYPE_905B)
- xl_setmulti_hash(sc);
- else
- xl_setmulti(sc);
- }
- error = 0;
- }
- break;
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  if (sc->xl_hasmii != 0)
@@ -2340,6 +2313,16 @@ xl_ioctl(struct ifnet *ifp, u_long comma
  break;
  default:
  error = ether_ioctl(ifp, &sc->sc_arpcom, command, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING) {
+ if (sc->xl_type == XL_TYPE_905B)
+ xl_setmulti_hash(sc);
+ else
+ xl_setmulti(sc);
+ }
+ error = 0;
  }
 
  splx(s);
Index: dev/isa/if_ef_isapnp.c
===================================================================
RCS file: /cvs/src/sys/dev/isa/if_ef_isapnp.c,v
retrieving revision 1.23
diff -u -p -r1.23 if_ef_isapnp.c
--- dev/isa/if_ef_isapnp.c 2 Oct 2008 20:21:13 -0000 1.23
+++ dev/isa/if_ef_isapnp.c 3 Oct 2008 00:33:39 -0000
@@ -377,21 +377,16 @@ efioctl(ifp, cmd, data)
  efsetmulti(sc);
  break;
 
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (cmd == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_arpcom) :
-    ether_delmulti(ifr, &sc->sc_arpcom);
-
- if (error == ENETRESET) {
- if (ifp->if_flags & IFF_RUNNING)
- efreset(sc);
- error = 0;
- }
- efsetmulti(sc);
- break;
  default:
  error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING) {
+ efreset(sc);
+ efsetmulti(sc);
+ }
+ error = 0;
  }
 
  splx(s);
Index: dev/isa/if_ex.c
===================================================================
RCS file: /cvs/src/sys/dev/isa/if_ex.c,v
retrieving revision 1.33
diff -u -p -r1.33 if_ex.c
--- dev/isa/if_ex.c 2 Oct 2008 20:21:13 -0000 1.33
+++ dev/isa/if_ex.c 3 Oct 2008 00:29:45 -0000
@@ -735,8 +735,8 @@ ex_rx_intr(struct ex_softc *sc)
 int
 ex_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
 {
- struct ifaddr *ifa = (struct ifaddr *) data;
  struct ex_softc *sc = ifp->if_softc;
+ struct ifaddr *ifa = (struct ifaddr *) data;
  struct ifreq *ifr = (struct ifreq *) data;
  int s, error = 0;
 
@@ -763,31 +763,18 @@ ex_ioctl(struct ifnet *ifp, u_long cmd,
  } else
  ex_init(sc);
  break;
- case SIOCSIFMTU:
- DODEBUG(Start_End, printf("SIOCSIFMTU"););
- if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ETHERMTU)
- error = EINVAL;
- else if (ifp->if_mtu != ifr->ifr_mtu)
- ifp->if_mtu = ifr->ifr_mtu;
- break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (cmd == SIOCADDMULTI)
- ? ether_addmulti(ifr, &sc->arpcom)
- : ether_delmulti(ifr, &sc->arpcom);
-
- if (error == ENETRESET) {
- if (ifp->if_flags & IFF_RUNNING)
- ex_init(sc);
- error = 0;
- }
- break;
  case SIOCSIFMEDIA:
  case SIOCGIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->ifmedia, cmd);
  break;
  default:
  error = ether_ioctl(ifp, &sc->arpcom, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ ex_init(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/isa/if_ie.c
===================================================================
RCS file: /cvs/src/sys/dev/isa/if_ie.c,v
retrieving revision 1.34
diff -u -p -r1.34 if_ie.c
--- dev/isa/if_ie.c 2 Oct 2008 20:21:13 -0000 1.34
+++ dev/isa/if_ie.c 3 Oct 2008 01:59:37 -0000
@@ -2121,7 +2121,6 @@ ieioctl(ifp, cmd, data)
 {
  struct ie_softc *sc = ifp->if_softc;
  struct ifaddr *ifa = (struct ifaddr *)data;
- struct ifreq *ifr = (struct ifreq *)data;
  int s, error = 0;
 
  s = splnet();
@@ -2176,25 +2175,14 @@ ieioctl(ifp, cmd, data)
 #endif
  break;
 
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (cmd == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_arpcom):
-    ether_delmulti(ifr, &sc->sc_arpcom);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware filter
- * accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- mc_reset(sc);
- error = 0;
- }
- break;
-
  default:
  error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ mc_reset(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/pci/if_bce.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_bce.c,v
retrieving revision 1.26
diff -u -p -r1.26 if_bce.c
--- dev/pci/if_bce.c 2 Oct 2008 20:21:13 -0000 1.26
+++ dev/pci/if_bce.c 3 Oct 2008 03:17:42 -0000
@@ -434,8 +434,8 @@ int
 bce_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
 {
  struct bce_softc *sc = ifp->if_softc;
+ struct ifaddr *ifa = (struct ifaddr *) data;
  struct ifreq   *ifr = (struct ifreq *) data;
- struct ifaddr *ifa = (struct ifaddr *)data;
  int             s, error = 0;
 
  s = splnet();
@@ -456,12 +456,7 @@ bce_ioctl(struct ifnet *ifp, u_long cmd,
  break;
  }
  break;
- case SIOCSIFMTU:
- if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ETHERMTU)
- error = EINVAL;
- else if (ifp->if_mtu != ifr->ifr_mtu)
- ifp->if_mtu = ifr->ifr_mtu;
- break;
+
  case SIOCSIFFLAGS:
  if(ifp->if_flags & IFF_UP)
  if(ifp->if_flags & IFF_RUNNING)
@@ -472,28 +467,20 @@ bce_ioctl(struct ifnet *ifp, u_long cmd,
  bce_stop(ifp, 0);
 
  break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (cmd == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->bce_ac) :
-    ether_delmulti(ifr, &sc->bce_ac);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware
- * filter accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- bce_set_filter(ifp);
- error = 0;
- }
- break;
+
  case SIOCSIFMEDIA:
  case SIOCGIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->bce_mii.mii_media, cmd);
  break;
+
  default:
  error = ether_ioctl(ifp, &sc->bce_ac, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ bce_set_filter(ifp);
+ error = 0;
  }
 
  if (error == 0) {
Index: dev/pci/if_bge.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_bge.c,v
retrieving revision 1.255
diff -u -p -r1.255 if_bge.c
--- dev/pci/if_bge.c 9 Nov 2008 15:08:26 -0000 1.255
+++ dev/pci/if_bge.c 18 Nov 2008 22:46:10 -0000
@@ -3276,8 +3276,8 @@ int
 bge_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
 {
  struct bge_softc *sc = ifp->if_softc;
+ struct ifaddr *ifa = (struct ifaddr *) data;
  struct ifreq *ifr = (struct ifreq *) data;
- struct ifaddr *ifa = (struct ifaddr *)data;
  int s, error = 0;
  struct mii_data *mii;
 
@@ -3293,12 +3293,7 @@ bge_ioctl(struct ifnet *ifp, u_long comm
  arp_ifinit(&sc->arpcom, ifa);
 #endif /* INET */
  break;
- case SIOCSIFMTU:
- if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ifp->if_hardmtu)
- error = EINVAL;
- else if (ifp->if_mtu != ifr->ifr_mtu)
- ifp->if_mtu = ifr->ifr_mtu;
- break;
+
  case SIOCSIFFLAGS:
  if (ifp->if_flags & IFF_UP) {
  if (ifp->if_flags & IFF_RUNNING)
@@ -3311,18 +3306,7 @@ bge_ioctl(struct ifnet *ifp, u_long comm
  }
  sc->bge_if_flags = ifp->if_flags;
  break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (command == SIOCADDMULTI)
- ? ether_addmulti(ifr, &sc->arpcom)
- : ether_delmulti(ifr, &sc->arpcom);
 
- if (error == ENETRESET) {
- if (ifp->if_flags & IFF_RUNNING)
- bge_iff(sc);
- error = 0;
- }
- break;
  case SIOCSIFMEDIA:
  /* XXX Flow control is not supported for 1000BASE-SX */
  if (sc->bge_flags & BGE_PHY_FIBER_TBI) {
@@ -3354,8 +3338,15 @@ bge_ioctl(struct ifnet *ifp, u_long comm
     command);
  }
  break;
+
  default:
  error = ether_ioctl(ifp, &sc->arpcom, command, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ bge_iff(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/pci/if_bnx.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_bnx.c,v
retrieving revision 1.70
diff -u -p -r1.70 if_bnx.c
--- dev/pci/if_bnx.c 9 Nov 2008 15:08:26 -0000 1.70
+++ dev/pci/if_bnx.c 18 Nov 2008 22:46:11 -0000
@@ -4586,8 +4586,8 @@ int
 bnx_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
 {
  struct bnx_softc *sc = ifp->if_softc;
+ struct ifaddr *ifa = (struct ifaddr *) data;
  struct ifreq *ifr = (struct ifreq *) data;
- struct ifaddr *ifa = (struct ifaddr *)data;
  struct mii_data *mii = &sc->bnx_mii;
  int s, error = 0;
 
@@ -4604,13 +4604,6 @@ bnx_ioctl(struct ifnet *ifp, u_long comm
 #endif /* INET */
  break;
 
- case SIOCSIFMTU:
- if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ifp->if_hardmtu)
- error = EINVAL;
- else if (ifp->if_mtu != ifr->ifr_mtu)
- ifp->if_mtu = ifr->ifr_mtu;
- break;
-
  case SIOCSIFFLAGS:
  if (ifp->if_flags & IFF_UP) {
  if ((ifp->if_flags & IFF_RUNNING) &&
@@ -4628,19 +4621,6 @@ bnx_ioctl(struct ifnet *ifp, u_long comm
  sc->bnx_if_flags = ifp->if_flags;
  break;
 
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (command == SIOCADDMULTI)
- ? ether_addmulti(ifr, &sc->arpcom)
- : ether_delmulti(ifr, &sc->arpcom);
-
- if (error == ENETRESET) {
- if (ifp->if_flags & IFF_RUNNING)
- bnx_set_rx_mode(sc);
- error = 0;
- }
- break;
-
  case SIOCSIFMEDIA:
  case SIOCGIFMEDIA:
  DBPRINT(sc, BNX_VERBOSE, "bnx_phy_flags = 0x%08X\n",
@@ -4651,6 +4631,12 @@ bnx_ioctl(struct ifnet *ifp, u_long comm
 
  default:
  error = ether_ioctl(ifp, &sc->arpcom, command, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ bnx_set_rx_mode(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/pci/if_cas.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_cas.c,v
retrieving revision 1.23
diff -u -p -r1.23 if_cas.c
--- dev/pci/if_cas.c 14 Oct 2008 18:01:53 -0000 1.23
+++ dev/pci/if_cas.c 15 Oct 2008 23:46:01 -0000
@@ -1718,31 +1718,6 @@ cas_ioctl(struct ifnet *ifp, u_long cmd,
 #endif
  break;
 
- case SIOCSIFMTU:
- if (ifr->ifr_mtu > ETHERMTU || ifr->ifr_mtu < ETHERMIN) {
- error = EINVAL;
- } else if (ifp->if_mtu != ifr->ifr_mtu) {
- ifp->if_mtu = ifr->ifr_mtu;
- }
- break;
-
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (cmd == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_arpcom) :
-    ether_delmulti(ifr, &sc->sc_arpcom);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware filter
- * accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- cas_setladrf(sc);
- error = 0;
- }
- break;
-
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->sc_media, cmd);
@@ -1750,6 +1725,12 @@ cas_ioctl(struct ifnet *ifp, u_long cmd,
 
  default:
  error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ cas_setladrf(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/pci/if_de.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_de.c,v
retrieving revision 1.100
diff -u -p -r1.100 if_de.c
--- dev/pci/if_de.c 2 Oct 2008 20:21:14 -0000 1.100
+++ dev/pci/if_de.c 3 Oct 2008 19:11:09 -0000
@@ -4182,38 +4182,16 @@ tulip_ifioctl(struct ifnet * ifp, u_long
  break;
     }
 
-    case SIOCADDMULTI:
-    case SIOCDELMULTI: {
- /*
- * Update multicast listeners
- */
- if (cmd == SIOCADDMULTI)
-    error = ether_addmulti(ifr, &sc->tulip_ac);
- else
-    error = ether_delmulti(ifr, &sc->tulip_ac);
+    default:
+ error = ether_ioctl(ifp, &sc->tulip_ac, cmd, data);
+    }
 
- if (error == ENETRESET) {
-    if (ifp->if_flags & IFF_RUNNING) {
+    if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING) {
  tulip_addr_filter(sc); /* reset multicast filtering */
  tulip_init(sc);
-    }
-    error = 0;
  }
- break;
-    }
-
-    case SIOCSIFMTU:
- /*
- * Set the interface MTU.
- */
- if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ETHERMTU)
-    error = EINVAL;
- else if (ifp->if_mtu != ifr->ifr_mtu)
-    ifp->if_mtu = ifr->ifr_mtu;
- break;
-
-    default:
- error = ether_ioctl(ifp, &sc->tulip_ac, cmd, data);
+ error = 0;
     }
 
     splx(s);
Index: dev/pci/if_em.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_em.c,v
retrieving revision 1.195
diff -u -p -r1.195 if_em.c
--- dev/pci/if_em.c 9 Nov 2008 15:08:26 -0000 1.195
+++ dev/pci/if_em.c 18 Nov 2008 22:46:11 -0000
@@ -549,13 +549,7 @@ em_ioctl(struct ifnet *ifp, u_long comma
  arp_ifinit(&sc->interface_data, ifa);
 #endif /* INET */
  break;
- case SIOCSIFMTU:
- IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFMTU (Set Interface MTU)");
- if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ifp->if_hardmtu)
- error = EINVAL;
- else if (ifp->if_mtu != ifr->ifr_mtu)
- ifp->if_mtu = ifr->ifr_mtu;
- break;
+
  case SIOCSIFFLAGS:
  IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFFLAGS (Set Interface Flags)");
  if (ifp->if_flags & IFF_UP) {
@@ -578,24 +572,7 @@ em_ioctl(struct ifnet *ifp, u_long comma
  }
  sc->if_flags = ifp->if_flags;
  break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- IOCTL_DEBUGOUT("ioctl rcv'd: SIOC(ADD|DEL)MULTI");
- error = (command == SIOCADDMULTI)
- ? ether_addmulti(ifr, &sc->interface_data)
- : ether_delmulti(ifr, &sc->interface_data);
 
- if (error == ENETRESET) {
- if (ifp->if_flags & IFF_RUNNING) {
- em_disable_intr(sc);
- em_set_multi(sc);
- if (sc->hw.mac_type == em_82542_rev2_0)
- em_initialize_receive_unit(sc);
- em_enable_intr(sc);
- }
- error = 0;
- }
- break;
  case SIOCSIFMEDIA:
  /* Check SOL/IDER usage */
  if (em_check_phy_reset_block(&sc->hw)) {
@@ -607,8 +584,20 @@ em_ioctl(struct ifnet *ifp, u_long comma
  IOCTL_DEBUGOUT("ioctl rcv'd: SIOCxIFMEDIA (Get/Set Interface Media)");
  error = ifmedia_ioctl(ifp, ifr, &sc->media, command);
  break;
+
  default:
  error = ether_ioctl(ifp, &sc->interface_data, command, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING) {
+ em_disable_intr(sc);
+ em_set_multi(sc);
+ if (sc->hw.mac_type == em_82542_rev2_0)
+ em_initialize_receive_unit(sc);
+ em_enable_intr(sc);
+ }
+ error = 0;
  }
 
  splx(s);
Index: dev/pci/if_et.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_et.c,v
retrieving revision 1.15
diff -u -p -r1.15 if_et.c
--- dev/pci/if_et.c 4 Nov 2008 19:20:22 -0000 1.15
+++ dev/pci/if_et.c 18 Nov 2008 22:46:11 -0000
@@ -1030,8 +1030,8 @@ int
 et_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
 {
  struct et_softc *sc = ifp->if_softc;
- struct ifreq *ifr = (struct ifreq *)data;
  struct ifaddr *ifa = (struct ifaddr *)data;
+ struct ifreq *ifr = (struct ifreq *)data;
  int s, error = 0;
 
  s = splnet();
@@ -1046,12 +1046,7 @@ et_ioctl(struct ifnet *ifp, u_long cmd,
  arp_ifinit(&sc->sc_arpcom, ifa);
 #endif
  break;
- case SIOCSIFMTU:
- if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ifp->if_hardmtu)
- error = EINVAL;
- else if (ifp->if_mtu != ifr->ifr_mtu)
- ifp->if_mtu = ifr->ifr_mtu;
- break;
+
  case SIOCSIFFLAGS:
  if (ifp->if_flags & IFF_UP) {
  /*
@@ -1073,24 +1068,20 @@ et_ioctl(struct ifnet *ifp, u_long cmd,
  }
  sc->sc_if_flags = ifp->if_flags;
  break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (cmd == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_arpcom) :
-    ether_delmulti(ifr, &sc->sc_arpcom);
 
- if (error == ENETRESET) {
- if (ifp->if_flags & IFF_RUNNING)
- et_setmulti(sc);
- error = 0;
- }
- break;
  case SIOCSIFMEDIA:
  case SIOCGIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->sc_miibus.mii_media, cmd);
  break;
+
  default:
  error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ et_setmulti(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/pci/if_ix.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_ix.c,v
retrieving revision 1.14
diff -u -p -r1.14 if_ix.c
--- dev/pci/if_ix.c 9 Nov 2008 15:08:26 -0000 1.14
+++ dev/pci/if_ix.c 18 Nov 2008 22:46:12 -0000
@@ -425,10 +425,10 @@ ixgbe_start(struct ifnet *ifp)
 int
 ixgbe_ioctl(struct ifnet * ifp, u_long command, caddr_t data)
 {
- int             s, error = 0;
- struct ifreq   *ifr = (struct ifreq *) data;
- struct ifaddr   *ifa = (struct ifaddr *) data;
- struct ix_softc *sc = ifp->if_softc;
+ struct ix_softc *sc = ifp->if_softc;
+ struct ifaddr *ifa = (struct ifaddr *) data;
+ struct ifreq *ifr = (struct ifreq *) data;
+ int s, error = 0;
 
  s = splnet();
 
@@ -443,6 +443,7 @@ ixgbe_ioctl(struct ifnet * ifp, u_long c
  arp_ifinit(&sc->arpcom, ifa);
 #endif
  break;
+
  case SIOCSIFMTU:
  IOCTL_DEBUGOUT("ioctl: SIOCSIFMTU (Set Interface MTU)");
  if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ifp->if_hardmtu)
@@ -454,6 +455,7 @@ ixgbe_ioctl(struct ifnet * ifp, u_long c
  ixgbe_init(sc);
  }
  break;
+
  case SIOCSIFFLAGS:
  IOCTL_DEBUGOUT("ioctl: SIOCSIFFLAGS (Set Interface Flags)");
  if (ifp->if_flags & IFF_UP) {
@@ -470,29 +472,24 @@ ixgbe_ioctl(struct ifnet * ifp, u_long c
  ixgbe_stop(sc);
  sc->if_flags = ifp->if_flags;
  break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- IOCTL_DEBUGOUT("ioctl: SIOC(ADD|DEL)MULTI");
- error = (command == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->arpcom) :
-    ether_delmulti(ifr, &sc->arpcom);
-
- if (error == ENETRESET) {
- if (ifp->if_flags & IFF_RUNNING) {
- ixgbe_disable_intr(sc);
- ixgbe_set_multi(sc);
- ixgbe_enable_intr(sc);
- }
- error = 0;
- }
- break;
+
  case SIOCSIFMEDIA:
  case SIOCGIFMEDIA:
  IOCTL_DEBUGOUT("ioctl: SIOCxIFMEDIA (Get/Set Interface Media)");
  error = ifmedia_ioctl(ifp, ifr, &sc->media, command);
  break;
+
  default:
  error = ether_ioctl(ifp, &sc->arpcom, command, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING) {
+ ixgbe_disable_intr(sc);
+ ixgbe_set_multi(sc);
+ ixgbe_enable_intr(sc);
+ }
+ error = 0;
  }
 
  splx(s);
Index: dev/pci/if_ixgb.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_ixgb.c,v
retrieving revision 1.51
diff -u -p -r1.51 if_ixgb.c
--- dev/pci/if_ixgb.c 9 Nov 2008 15:08:26 -0000 1.51
+++ dev/pci/if_ixgb.c 18 Nov 2008 22:46:12 -0000
@@ -364,10 +364,10 @@ ixgb_start(struct ifnet *ifp)
 int
 ixgb_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
 {
-        int s, error = 0;
- struct ifreq   *ifr = (struct ifreq *) data;
- struct ifaddr  *ifa = (struct ifaddr *)data;
  struct ixgb_softc *sc = ifp->if_softc;
+ struct ifaddr *ifa = (struct ifaddr *) data;
+ struct ifreq *ifr = (struct ifreq *) data;
+ int s, error = 0;
 
  s = splnet();
 
@@ -383,13 +383,7 @@ ixgb_ioctl(struct ifnet *ifp, u_long com
  arp_ifinit(&sc->interface_data, ifa);
 #endif /* INET */
  break;
- case SIOCSIFMTU:
- IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFMTU (Set Interface MTU)");
- if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ifp->if_hardmtu)
- error = EINVAL;
- else if (ifp->if_mtu != ifr->ifr_mtu)
- ifp->if_mtu = ifr->ifr_mtu;
- break;
+
  case SIOCSIFFLAGS:
  IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFFLAGS (Set Interface Flags)");
  if (ifp->if_flags & IFF_UP) {
@@ -412,29 +406,24 @@ ixgb_ioctl(struct ifnet *ifp, u_long com
  }
  sc->if_flags = ifp->if_flags;
  break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- IOCTL_DEBUGOUT("ioctl rcv'd: SIOC(ADD|DEL)MULTI");
- error = (command == SIOCADDMULTI)
- ? ether_addmulti(ifr, &sc->interface_data)
- : ether_delmulti(ifr, &sc->interface_data);
-
- if (error == ENETRESET) {
- if (ifp->if_flags & IFF_RUNNING) {
- ixgb_disable_intr(sc);
- ixgb_set_multi(sc);
- ixgb_enable_intr(sc);
- }
- error = 0;
- }
- break;
+
  case SIOCSIFMEDIA:
  case SIOCGIFMEDIA:
  IOCTL_DEBUGOUT("ioctl rcv'd: SIOCxIFMEDIA (Get/Set Interface Media)");
  error = ifmedia_ioctl(ifp, ifr, &sc->media, command);
  break;
+
  default:
  error = ether_ioctl(ifp, &sc->interface_data, command, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING) {
+ ixgb_disable_intr(sc);
+ ixgb_set_multi(sc);
+ ixgb_enable_intr(sc);
+ }
+ error = 0;
  }
 
  splx(s);
Index: dev/pci/if_lge.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_lge.c,v
retrieving revision 1.49
diff -u -p -r1.49 if_lge.c
--- dev/pci/if_lge.c 22 Oct 2008 00:01:59 -0000 1.49
+++ dev/pci/if_lge.c 24 Oct 2008 05:01:44 -0000
@@ -1366,8 +1366,8 @@ int
 lge_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
 {
  struct lge_softc *sc = ifp->if_softc;
+ struct ifaddr *ifa = (struct ifaddr *) data;
  struct ifreq *ifr = (struct ifreq *) data;
- struct ifaddr *ifa = (struct ifaddr *)data;
  struct mii_data *mii;
  int s, error = 0;
 
@@ -1383,12 +1383,7 @@ lge_ioctl(struct ifnet *ifp, u_long comm
  arp_ifinit(&sc->arpcom, ifa);
 #endif /* INET */
  break;
- case SIOCSIFMTU:
- if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ifp->if_hardmtu)
- error = EINVAL;
- else if (ifp->if_mtu != ifr->ifr_mtu)
- ifp->if_mtu = ifr->ifr_mtu;
- break;
+
  case SIOCSIFFLAGS:
  if (ifp->if_flags & IFF_UP) {
  if (ifp->if_flags & IFF_RUNNING &&
@@ -1417,30 +1412,24 @@ lge_ioctl(struct ifnet *ifp, u_long comm
  }
  sc->lge_if_flags = ifp->if_flags;
  break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (command == SIOCADDMULTI)
- ? ether_addmulti(ifr, &sc->arpcom)
- : ether_delmulti(ifr, &sc->arpcom);
 
- if (error == ENETRESET) {
- if (ifp->if_flags & IFF_RUNNING)
- lge_setmulti(sc);
- error = 0;
- }
- break;
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  mii = &sc->lge_mii;
  error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command);
  break;
+
  default:
- error = ENOTTY;
- break;
+ error = ether_ioctl(ifp, &sc->arpcom, command, data);
  }
 
- splx(s);
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ lge_setmulti(sc);
+ error = 0;
+ }
 
+ splx(s);
  return (error);
 }
 
Index: dev/pci/if_lii.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_lii.c,v
retrieving revision 1.20
diff -u -p -r1.20 if_lii.c
--- dev/pci/if_lii.c 7 Oct 2008 16:03:37 -0000 1.20
+++ dev/pci/if_lii.c 9 Oct 2008 01:30:38 -0000
@@ -1044,8 +1044,8 @@ int
 lii_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr)
 {
  struct lii_softc *sc = ifp->if_softc;
+ struct ifaddr *ifa = (struct ifaddr *)addr;
  struct ifreq *ifr = (struct ifreq *)addr;
- struct ifaddr *ifa;
  int s, error = 0;
 
  s = splnet();
@@ -1054,11 +1054,11 @@ lii_ioctl(struct ifnet *ifp, u_long cmd,
  case SIOCSIFADDR:
  SET(ifp->if_flags, IFF_UP);
 #ifdef INET
- ifa = (struct ifaddr *)addr;
  if (ifa->ifa_addr->sa_family == AF_INET)
  arp_ifinit(&sc->sc_ac, ifa);
 #endif
  /* FALLTHROUGH */
+
  case SIOCSIFFLAGS:
  if (ISSET(ifp->if_flags, IFF_UP)) {
  if (ISSET(ifp->if_flags, IFF_RUNNING))
@@ -1071,17 +1071,11 @@ lii_ioctl(struct ifnet *ifp, u_long cmd,
  }
  break;
 
- case SIOCADDMULTI:
- error = ether_addmulti(ifr, &sc->sc_ac);
- break;
- case SIOCDELMULTI:
- error = ether_delmulti(ifr, &sc->sc_ac);
- break;
-
  case SIOCSIFMEDIA:
  case SIOCGIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, cmd);
  break;
+
  default:
  error = ether_ioctl(ifp, &sc->sc_ac, cmd, addr);
  }
Index: dev/pci/if_msk.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_msk.c,v
retrieving revision 1.67
diff -u -p -r1.67 if_msk.c
--- dev/pci/if_msk.c 14 Oct 2008 18:01:53 -0000 1.67
+++ dev/pci/if_msk.c 15 Oct 2008 23:46:05 -0000
@@ -727,8 +727,8 @@ int
 msk_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
 {
  struct sk_if_softc *sc_if = ifp->if_softc;
- struct ifreq *ifr = (struct ifreq *) data;
  struct ifaddr *ifa = (struct ifaddr *) data;
+ struct ifreq *ifr = (struct ifreq *) data;
  struct mii_data *mii;
  int s, error = 0;
 
@@ -744,12 +744,7 @@ msk_ioctl(struct ifnet *ifp, u_long comm
  arp_ifinit(&sc_if->arpcom, ifa);
 #endif /* INET */
  break;
- case SIOCSIFMTU:
- if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ifp->if_hardmtu)
- error = EINVAL;
- else if (ifp->if_mtu != ifr->ifr_mtu)
- ifp->if_mtu = ifr->ifr_mtu;
- break;
+
  case SIOCSIFFLAGS:
  if (ifp->if_flags & IFF_UP) {
  if (ifp->if_flags & IFF_RUNNING &&
@@ -767,29 +762,21 @@ msk_ioctl(struct ifnet *ifp, u_long comm
  }
  sc_if->sk_if_flags = ifp->if_flags;
  break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (command == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc_if->arpcom) :
-    ether_delmulti(ifr, &sc_if->arpcom);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware
- * filter accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- msk_setmulti(sc_if);
- error = 0;
- }
- break;
+
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  mii = &sc_if->sk_mii;
  error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command);
  break;
+
  default:
  error = ether_ioctl(ifp, &sc_if->arpcom, command, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ msk_setmulti(sc_if);
+ error = 0;
  }
 
  splx(s);
Index: dev/pci/if_myx.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_myx.c,v
retrieving revision 1.9
diff -u -p -r1.9 if_myx.c
--- dev/pci/if_myx.c 2 Oct 2008 20:21:14 -0000 1.9
+++ dev/pci/if_myx.c 3 Oct 2008 19:39:34 -0000
@@ -831,6 +831,7 @@ myx_ioctl(struct ifnet *ifp, u_long cmd,
  arp_ifinit(&sc->sc_ac, ifa);
 #endif
  /* FALLTHROUGH */
+
  case SIOCSIFFLAGS:
  if (ifp->if_flags & IFF_UP) {
  if (ifp->if_flags & IFF_RUNNING)
@@ -841,21 +842,6 @@ myx_ioctl(struct ifnet *ifp, u_long cmd,
  if (ifp->if_flags & IFF_RUNNING)
  myx_stop(ifp);
  }
- break;
-
- case SIOCSIFMTU:
- if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ifp->if_hardmtu)
- error = EINVAL;
- else if (ifp->if_mtu != ifr->ifr_mtu)
- ifp->if_mtu = ifr->ifr_mtu;
- break;
-
- case SIOCADDMULTI:
- error = ether_addmulti(ifr, &sc->sc_ac);
- break;
-
- case SIOCDELMULTI:
- error = ether_delmulti(ifr, &sc->sc_ac);
  break;
 
  case SIOCGIFMEDIA:
Index: dev/pci/if_nfe.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_nfe.c,v
retrieving revision 1.86
diff -u -p -r1.86 if_nfe.c
--- dev/pci/if_nfe.c 9 Nov 2008 15:08:26 -0000 1.86
+++ dev/pci/if_nfe.c 18 Nov 2008 22:46:13 -0000
@@ -522,8 +522,8 @@ int
 nfe_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
 {
  struct nfe_softc *sc = ifp->if_softc;
- struct ifreq *ifr = (struct ifreq *)data;
  struct ifaddr *ifa = (struct ifaddr *)data;
+ struct ifreq *ifr = (struct ifreq *)data;
  int s, error = 0;
 
  s = splnet();
@@ -538,12 +538,7 @@ nfe_ioctl(struct ifnet *ifp, u_long cmd,
  arp_ifinit(&sc->sc_arpcom, ifa);
 #endif
  break;
- case SIOCSIFMTU:
- if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ifp->if_hardmtu)
- error = EINVAL;
- else if (ifp->if_mtu != ifr->ifr_mtu)
- ifp->if_mtu = ifr->ifr_mtu;
- break;
+
  case SIOCSIFFLAGS:
  if (ifp->if_flags & IFF_UP) {
  /*
@@ -565,24 +560,20 @@ nfe_ioctl(struct ifnet *ifp, u_long cmd,
  }
  sc->sc_if_flags = ifp->if_flags;
  break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (cmd == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_arpcom) :
-    ether_delmulti(ifr, &sc->sc_arpcom);
 
- if (error == ENETRESET) {
- if (ifp->if_flags & IFF_RUNNING)
- nfe_setmulti(sc);
- error = 0;
- }
- break;
  case SIOCSIFMEDIA:
  case SIOCGIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, cmd);
  break;
+
  default:
  error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ nfe_setmulti(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/pci/if_nge.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_nge.c,v
retrieving revision 1.66
diff -u -p -r1.66 if_nge.c
--- dev/pci/if_nge.c 9 Nov 2008 15:08:26 -0000 1.66
+++ dev/pci/if_nge.c 18 Nov 2008 22:46:13 -0000
@@ -2061,20 +2061,14 @@ nge_ioctl(ifp, command, data)
  caddr_t data;
 {
  struct nge_softc *sc = ifp->if_softc;
+ struct ifaddr *ifa = (struct ifaddr *) data;
  struct ifreq *ifr = (struct ifreq *) data;
- struct ifaddr *ifa = (struct ifaddr *)data;
  struct mii_data *mii;
  int s, error = 0;
 
  s = splnet();
 
  switch(command) {
- case SIOCSIFMTU:
- if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ifp->if_hardmtu)
- error = EINVAL;
- else if (ifp->if_mtu != ifr->ifr_mtu)
- ifp->if_mtu = ifr->ifr_mtu;
- break;
  case SIOCSIFADDR:
  ifp->if_flags |= IFF_UP;
  switch (ifa->ifa_addr->sa_family) {
@@ -2089,6 +2083,7 @@ nge_ioctl(ifp, command, data)
  break;
                 }
  break;
+
  case SIOCSIFFLAGS:
  if (ifp->if_flags & IFF_UP) {
  if (ifp->if_flags & IFF_RUNNING &&
@@ -2116,18 +2111,7 @@ nge_ioctl(ifp, command, data)
  sc->nge_if_flags = ifp->if_flags;
  error = 0;
  break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (command == SIOCADDMULTI)
- ? ether_addmulti(ifr, &sc->arpcom)
- : ether_delmulti(ifr, &sc->arpcom);
 
- if (error == ENETRESET) {
- if (ifp->if_flags & IFF_RUNNING)
- nge_setmulti(sc);
- error = 0;
- }
- break;
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  if (sc->nge_tbi) {
@@ -2139,8 +2123,15 @@ nge_ioctl(ifp, command, data)
       command);
  }
  break;
+
  default:
  error = ether_ioctl(ifp, &sc->arpcom, command, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ nge_setmulti(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/pci/if_nxe.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_nxe.c,v
retrieving revision 1.57
diff -u -p -r1.57 if_nxe.c
--- dev/pci/if_nxe.c 29 Oct 2008 01:14:47 -0000 1.57
+++ dev/pci/if_nxe.c 18 Nov 2008 22:46:13 -0000
@@ -1018,10 +1018,9 @@ int
 nxe_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr)
 {
  struct nxe_softc *sc = ifp->if_softc;
+ struct ifaddr *ifa = (struct ifaddr *)addr;
  struct ifreq *ifr = (struct ifreq *)addr;
- struct ifaddr *ifa;
- int error = 0;
- int s;
+ int s, error = 0;
 
  rw_enter_write(&sc->sc_lock);
  s = splnet();
@@ -1032,11 +1031,11 @@ nxe_ioctl(struct ifnet *ifp, u_long cmd,
  case SIOCSIFADDR:
  SET(ifp->if_flags, IFF_UP);
 #ifdef INET
- ifa = (struct ifaddr *)addr;
  if (ifa->ifa_addr->sa_family == AF_INET)
  arp_ifinit(&sc->sc_ac, ifa);
 #endif
  /* FALLTHROUGH */
+
  case SIOCSIFFLAGS:
  if (ISSET(ifp->if_flags, IFF_UP)) {
  if (ISSET(ifp->if_flags, IFF_RUNNING))
@@ -1052,13 +1051,6 @@ nxe_ioctl(struct ifnet *ifp, u_long cmd,
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->sc_media, cmd);
- break;
-
- case SIOCADDMULTI:
- error = ether_addmulti(ifr, &sc->sc_ac);
- break;
- case SIOCDELMULTI:
- error = ether_delmulti(ifr, &sc->sc_ac);
  break;
 
  default:
Index: dev/pci/if_pcn.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_pcn.c,v
retrieving revision 1.20
diff -u -p -r1.20 if_pcn.c
--- dev/pci/if_pcn.c 2 Oct 2008 20:21:14 -0000 1.20
+++ dev/pci/if_pcn.c 3 Oct 2008 18:43:55 -0000
@@ -1082,8 +1082,8 @@ int
 pcn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
 {
  struct pcn_softc *sc = ifp->if_softc;
+ struct ifaddr *ifa = (struct ifaddr *) data;
  struct ifreq *ifr = (struct ifreq *) data;
- struct ifaddr *ifa = (struct ifaddr *)data;
  int s, error = 0;
 
  s = splnet();
@@ -1105,13 +1105,6 @@ pcn_ioctl(struct ifnet *ifp, u_long cmd,
  }
  break;
 
- case SIOCSIFMTU:
- if (ifr->ifr_mtu > ETHERMTU || ifr->ifr_mtu < ETHERMIN)
- error = EINVAL;
- else if (ifp->if_mtu != ifr->ifr_mtu)
- ifp->if_mtu = ifr->ifr_mtu;
- break;
-
  case SIOCSIFFLAGS:
  /*
  * If interface is marked up and not running, then start it.
@@ -1125,24 +1118,6 @@ pcn_ioctl(struct ifnet *ifp, u_long cmd,
  pcn_stop(ifp, 1);
  break;
 
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (cmd == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_arpcom) :
-    ether_delmulti(ifr, &sc->sc_arpcom);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware
- * filter accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- error = pcn_init(ifp);
- else
- error = 0;
- }
- break;
-
  case SIOCSIFMEDIA:
  case SIOCGIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, cmd);
@@ -1150,6 +1125,13 @@ pcn_ioctl(struct ifnet *ifp, u_long cmd,
 
  default:
  error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ error = pcn_init(ifp);
+ else
+ error = 0;
  }
 
  /* Try to get more packets going. */
Index: dev/pci/if_sis.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_sis.c,v
retrieving revision 1.84
diff -u -p -r1.84 if_sis.c
--- dev/pci/if_sis.c 10 Nov 2008 07:23:43 -0000 1.84
+++ dev/pci/if_sis.c 18 Nov 2008 22:46:14 -0000
@@ -1887,8 +1887,8 @@ int
 sis_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
 {
  struct sis_softc *sc = ifp->if_softc;
+ struct ifaddr *ifa = (struct ifaddr *) data;
  struct ifreq *ifr = (struct ifreq *) data;
- struct ifaddr *ifa = (struct ifaddr *)data;
  struct mii_data *mii;
  int s, error = 0;
 
@@ -1904,6 +1904,7 @@ sis_ioctl(struct ifnet *ifp, u_long comm
  arp_ifinit(&sc->arpcom, ifa);
 #endif
  break;
+
  case SIOCSIFFLAGS:
  if (ifp->if_flags & IFF_UP) {
  if (ifp->if_flags & IFF_RUNNING &&
@@ -1925,35 +1926,21 @@ sis_ioctl(struct ifnet *ifp, u_long comm
  }
  sc->sc_if_flags = ifp->if_flags;
  break;
- case SIOCSIFMTU:
- if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ETHERMTU)
- error = EINVAL;
- else if (ifp->if_mtu != ifr->ifr_mtu)
- ifp->if_mtu = ifr->ifr_mtu;
- break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (command == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->arpcom) :
-    ether_delmulti(ifr, &sc->arpcom);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware
- * filter accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- sis_setmulti(sc);
- error = 0;
- }
- break;
+
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  mii = &sc->sc_mii;
  error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command);
  break;
+
  default:
  error = ether_ioctl(ifp, &sc->arpcom, command, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ sis_setmulti(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/pci/if_sk.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_sk.c,v
retrieving revision 1.149
diff -u -p -r1.149 if_sk.c
--- dev/pci/if_sk.c 14 Oct 2008 18:01:53 -0000 1.149
+++ dev/pci/if_sk.c 15 Oct 2008 23:46:06 -0000
@@ -859,8 +859,8 @@ int
 sk_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
 {
  struct sk_if_softc *sc_if = ifp->if_softc;
- struct ifreq *ifr = (struct ifreq *) data;
  struct ifaddr *ifa = (struct ifaddr *) data;
+ struct ifreq *ifr = (struct ifreq *) data;
  struct mii_data *mii;
  int s, error = 0;
 
@@ -876,12 +876,7 @@ sk_ioctl(struct ifnet *ifp, u_long comma
  arp_ifinit(&sc_if->arpcom, ifa);
 #endif /* INET */
  break;
- case SIOCSIFMTU:
- if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ifp->if_hardmtu)
- error = EINVAL;
- else if (ifp->if_mtu != ifr->ifr_mtu)
- ifp->if_mtu = ifr->ifr_mtu;
- break;
+
  case SIOCSIFFLAGS:
  if (ifp->if_flags & IFF_UP) {
  if (ifp->if_flags & IFF_RUNNING &&
@@ -899,29 +894,21 @@ sk_ioctl(struct ifnet *ifp, u_long comma
  }
  sc_if->sk_if_flags = ifp->if_flags;
  break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (command == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc_if->arpcom) :
-    ether_delmulti(ifr, &sc_if->arpcom);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware
- * filter accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- sk_setmulti(sc_if);
- error = 0;
- }
- break;
+
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  mii = &sc_if->sk_mii;
  error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command);
  break;
+
  default:
  error = ether_ioctl(ifp, &sc_if->arpcom, command, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ sk_setmulti(sc_if);
+ error = 0;
  }
 
  splx(s);
Index: dev/pci/if_ste.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_ste.c,v
retrieving revision 1.42
diff -u -p -r1.42 if_ste.c
--- dev/pci/if_ste.c 2 Oct 2008 20:21:14 -0000 1.42
+++ dev/pci/if_ste.c 3 Oct 2008 03:55:03 -0000
@@ -1275,8 +1275,8 @@ int
 ste_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
 {
  struct ste_softc *sc = ifp->if_softc;
+ struct ifaddr *ifa = (struct ifaddr *) data;
  struct ifreq *ifr = (struct ifreq *) data;
- struct ifaddr *ifa = (struct ifaddr *)data;
  struct mii_data *mii;
  int s, error = 0;
 
@@ -1295,6 +1295,7 @@ ste_ioctl(struct ifnet *ifp, u_long comm
  break;
  }
  break;
+
  case SIOCSIFFLAGS:
  if (ifp->if_flags & IFF_UP) {
  if (ifp->if_flags & IFF_RUNNING &&
@@ -1322,29 +1323,21 @@ ste_ioctl(struct ifnet *ifp, u_long comm
  sc->ste_if_flags = ifp->if_flags;
  error = 0;
  break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (command == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->arpcom) :
-    ether_delmulti(ifr, &sc->arpcom);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware
- * filter accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- ste_setmulti(sc);
- error = 0;
- }
- break;
+
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  mii = &sc->sc_mii;
  error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command);
  break;
+
  default:
  error = ether_ioctl(ifp, &sc->arpcom, command, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ ste_setmulti(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/pci/if_stge.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_stge.c,v
retrieving revision 1.44
diff -u -p -r1.44 if_stge.c
--- dev/pci/if_stge.c 9 Nov 2008 15:08:26 -0000 1.44
+++ dev/pci/if_stge.c 18 Nov 2008 22:46:14 -0000
@@ -700,8 +700,8 @@ int
 stge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
 {
  struct stge_softc *sc = ifp->if_softc;
- struct ifreq *ifr = (struct ifreq *)data;
  struct ifaddr *ifa = (struct ifaddr *)data;
+ struct ifreq *ifr = (struct ifreq *)data;
  int s, error = 0;
 
  s = splnet();
@@ -718,13 +718,6 @@ stge_ioctl(struct ifnet *ifp, u_long cmd
 #endif
  break;
 
- case SIOCSIFMTU:
- if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ifp->if_hardmtu)
- error = EINVAL;
- else if (ifp->if_mtu != ifr->ifr_mtu)
- ifp->if_mtu = ifr->ifr_mtu;
- break;
-
  case SIOCSIFFLAGS:
  if (ifp->if_flags & IFF_UP) {
  if (ifp->if_flags & IFF_RUNNING &&
@@ -742,23 +735,6 @@ stge_ioctl(struct ifnet *ifp, u_long cmd
  sc->stge_if_flags = ifp->if_flags;
  break;
 
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (cmd == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_arpcom) :
-    ether_delmulti(ifr, &sc->sc_arpcom);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware
- * filter accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- stge_set_filter(sc);
- error = 0;
- }
- break;
-
  case SIOCSIFMEDIA:
  case SIOCGIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, cmd);
@@ -766,6 +742,12 @@ stge_ioctl(struct ifnet *ifp, u_long cmd
 
  default:
  error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ stge_set_filter(sc);
+ error = 0;
  }
 
  /* Try to get more packets going. */
Index: dev/pci/if_tht.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_tht.c,v
retrieving revision 1.119
diff -u -p -r1.119 if_tht.c
--- dev/pci/if_tht.c 2 Oct 2008 20:21:14 -0000 1.119
+++ dev/pci/if_tht.c 20 Oct 2008 22:26:10 -0000
@@ -864,25 +864,23 @@ int
 tht_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr)
 {
  struct tht_softc *sc = ifp->if_softc;
+ struct ifaddr *ifa = (struct ifaddr *)addr;
  struct ifreq *ifr = (struct ifreq *)addr;
- struct ifaddr *ifa;
- int error = 0;
- int s;
+ int s, error = 0;
 
  rw_enter_write(&sc->sc_lock);
  s = splnet();
 
  switch (cmd) {
  case SIOCSIFADDR:
- ifa = (struct ifaddr *)addr;
+ ifp->if_flags |= IFF_UP;
 
 #ifdef INET
  if (ifa->ifa_addr->sa_family == AF_INET)
  arp_ifinit(&sc->sc_ac, ifa);
 #endif
-
- ifp->if_flags |= IFF_UP;
  /* FALLTHROUGH */
+
  case SIOCSIFFLAGS:
  if (ifp->if_flags & IFF_UP) {
  if (ifp->if_flags & IFF_RUNNING)
@@ -893,20 +891,6 @@ tht_ioctl(struct ifnet *ifp, u_long cmd,
  if (ifp->if_flags & IFF_RUNNING)
  tht_down(sc);
  }
- break;
-
- case SIOCSIFMTU:
- if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ifp->if_hardmtu)
- error = EINVAL;
- else
- ifp->if_mtu = ifr->ifr_mtu;
- break;
-
- case SIOCADDMULTI:
- error = ether_addmulti(ifr, &sc->sc_ac);
- break;
- case SIOCDELMULTI:
- error = ether_delmulti(ifr, &sc->sc_ac);
  break;
 
  case SIOCGIFMEDIA:
Index: dev/pci/if_ti.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_ti.c,v
retrieving revision 1.93
diff -u -p -r1.93 if_ti.c
--- dev/pci/if_ti.c 9 Nov 2008 15:08:26 -0000 1.93
+++ dev/pci/if_ti.c 18 Nov 2008 22:46:14 -0000
@@ -2485,8 +2485,8 @@ int
 ti_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
 {
  struct ti_softc *sc = ifp->if_softc;
- struct ifreq *ifr = (struct ifreq *)data;
  struct ifaddr *ifa = (struct ifaddr *)data;
+ struct ifreq *ifr = (struct ifreq *)data;
  int s, error = 0;
  struct ti_cmd_desc cmd;
 
@@ -2502,12 +2502,7 @@ ti_ioctl(struct ifnet *ifp, u_long comma
  arp_ifinit(&sc->arpcom, ifa);
 #endif /* INET */
  break;
- case SIOCSIFMTU:
- if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ifp->if_hardmtu)
- error = EINVAL;
- else if (ifp->if_mtu != ifr->ifr_mtu)
- ifp->if_mtu = ifr->ifr_mtu;
- break;
+
  case SIOCSIFFLAGS:
  if (ifp->if_flags & IFF_UP) {
  /*
@@ -2538,24 +2533,20 @@ ti_ioctl(struct ifnet *ifp, u_long comma
  }
  sc->ti_if_flags = ifp->if_flags;
  break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (command == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->arpcom) :
-    ether_delmulti(ifr, &sc->arpcom);
 
- if (error == ENETRESET) {
- if (ifp->if_flags & IFF_RUNNING)
- ti_setmulti(sc);
- error = 0;
- }
- break;
  case SIOCSIFMEDIA:
  case SIOCGIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->ifmedia, command);
  break;
+
  default:
  error = ether_ioctl(ifp, &sc->arpcom, command, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ ti_setmulti(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/pci/if_tl.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_tl.c,v
retrieving revision 1.45
diff -u -p -r1.45 if_tl.c
--- dev/pci/if_tl.c 2 Oct 2008 20:21:14 -0000 1.45
+++ dev/pci/if_tl.c 3 Oct 2008 19:16:19 -0000
@@ -1782,8 +1782,8 @@ int tl_ioctl(ifp, command, data)
  caddr_t data;
 {
  struct tl_softc *sc = ifp->if_softc;
+ struct ifaddr *ifa = (struct ifaddr *) data;
  struct ifreq *ifr = (struct ifreq *) data;
- struct ifaddr *ifa = (struct ifaddr *)data;
  int s, error = 0;
 
  s = splnet();
@@ -1803,6 +1803,7 @@ int tl_ioctl(ifp, command, data)
  break;
  }
  break;
+
  case SIOCSIFFLAGS:
  if (ifp->if_flags & IFF_UP) {
  if (ifp->if_flags & IFF_RUNNING &&
@@ -1825,21 +1826,7 @@ int tl_ioctl(ifp, command, data)
  sc->tl_if_flags = ifp->if_flags;
  error = 0;
  break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (command == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->arpcom) :
-    ether_delmulti(ifr, &sc->arpcom);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware
- * filter accordingly.
- */
- tl_setmulti(sc);
- error = 0;
- }
- break;
+
  case SIOCSIFMEDIA:
  case SIOCGIFMEDIA:
  if (sc->tl_bitrate)
@@ -1848,8 +1835,15 @@ int tl_ioctl(ifp, command, data)
  error = ifmedia_ioctl(ifp, ifr,
     &sc->sc_mii.mii_media, command);
  break;
+
  default:
  error = ether_ioctl(ifp, &sc->arpcom, command, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ tl_setmulti(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/pci/if_txp.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_txp.c,v
retrieving revision 1.98
diff -u -p -r1.98 if_txp.c
--- dev/pci/if_txp.c 9 Nov 2008 15:08:26 -0000 1.98
+++ dev/pci/if_txp.c 18 Nov 2008 22:46:15 -0000
@@ -1190,8 +1190,8 @@ int
 txp_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
 {
  struct txp_softc *sc = ifp->if_softc;
- struct ifreq *ifr = (struct ifreq *)data;
- struct ifaddr *ifa = (struct ifaddr *)data;
+ struct ifaddr *ifa = (struct ifaddr *) data;
+ struct ifreq *ifr = (struct ifreq *) data;
  int s, error = 0;
 
  s = splnet();
@@ -1211,6 +1211,7 @@ txp_ioctl(struct ifnet *ifp, u_long comm
  break;
  }
  break;
+
  case SIOCSIFFLAGS:
  if (ifp->if_flags & IFF_UP) {
  txp_init(sc);
@@ -1219,28 +1220,20 @@ txp_ioctl(struct ifnet *ifp, u_long comm
  txp_stop(sc);
  }
  break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (command == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_arpcom) :
-    ether_delmulti(ifr, &sc->sc_arpcom);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware
- * filter accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- txp_set_filter(sc);
- error = 0;
- }
- break;
+
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->sc_ifmedia, command);
  break;
+
  default:
  error = ether_ioctl(ifp, &sc->sc_arpcom, command, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ txp_set_filter(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/pci/if_vge.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_vge.c,v
retrieving revision 1.42
diff -u -p -r1.42 if_vge.c
--- dev/pci/if_vge.c 9 Nov 2008 15:08:26 -0000 1.42
+++ dev/pci/if_vge.c 18 Nov 2008 22:46:15 -0000
@@ -1733,8 +1733,8 @@ int
 vge_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
 {
  struct vge_softc *sc = ifp->if_softc;
- struct ifreq *ifr = (struct ifreq *) data;
  struct ifaddr *ifa = (struct ifaddr *) data;
+ struct ifreq *ifr = (struct ifreq *) data;
  int s, error = 0;
 
  s = splnet();
@@ -1754,12 +1754,7 @@ vge_ioctl(struct ifnet *ifp, u_long comm
  break;
  }
  break;
- case SIOCSIFMTU:
- if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ifp->if_hardmtu)
- error = EINVAL;
- else if (ifp->if_mtu != ifr->ifr_mtu)
- ifp->if_mtu = ifr->ifr_mtu;
- break;
+
  case SIOCSIFFLAGS:
  if (ifp->if_flags & IFF_UP) {
  if (ifp->if_flags & IFF_RUNNING &&
@@ -1782,24 +1777,20 @@ vge_ioctl(struct ifnet *ifp, u_long comm
  }
  sc->vge_if_flags = ifp->if_flags;
  break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (command == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->arpcom) :
-    ether_delmulti(ifr, &sc->arpcom);
 
- if (error == ENETRESET) {
- if (ifp->if_flags & IFF_RUNNING)
- vge_setmulti(sc);
- error = 0;
- }
- break;
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, command);
  break;
+
  default:
  error = ether_ioctl(ifp, &sc->arpcom, command, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ vge_setmulti(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/pci/if_vic.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_vic.c,v
retrieving revision 1.56
diff -u -p -r1.56 if_vic.c
--- dev/pci/if_vic.c 29 Oct 2008 01:14:47 -0000 1.56
+++ dev/pci/if_vic.c 18 Nov 2008 22:46:15 -0000
@@ -1175,15 +1175,14 @@ int
 vic_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
 {
  struct vic_softc *sc = (struct vic_softc *)ifp->if_softc;
+ struct ifaddr *ifa = (struct ifaddr *)data;
  struct ifreq *ifr = (struct ifreq *)data;
- struct ifaddr *ifa;
  int s, error = 0;
 
  s = splnet();
 
  switch (cmd) {
  case SIOCSIFADDR:
- ifa = (struct ifaddr *)data;
  ifp->if_flags |= IFF_UP;
 #ifdef INET
  if (ifa->ifa_addr->sa_family == AF_INET)
@@ -1202,27 +1201,6 @@ vic_ioctl(struct ifnet *ifp, u_long cmd,
  }
  break;
 
- case SIOCSIFMTU:
- if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ifp->if_hardmtu)
- error = EINVAL;
- else if (ifp->if_mtu != ifr->ifr_mtu)
- ifp->if_mtu = ifr->ifr_mtu;
- break;
-
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- ifr = (struct ifreq *)data;
- error = (cmd == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_ac) :
-    ether_delmulti(ifr, &sc->sc_ac);
-
- if (error == ENETRESET) {
- if (ifp->if_flags & IFF_RUNNING)
- vic_iff(sc);
- error = 0;
- }
- break;
-
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->sc_media, cmd);
@@ -1233,9 +1211,8 @@ vic_ioctl(struct ifnet *ifp, u_long cmd,
  }
 
  if (error == ENETRESET) {
- if ((ifp->if_flags & (IFF_UP | IFF_RUNNING)) ==
-    (IFF_UP | IFF_RUNNING))
- vic_iff(ifp->if_softc);
+ if (ifp->if_flags & IFF_RUNNING)
+ vic_iff(sc);
  error = 0;
  }
 
Index: dev/pci/if_vr.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_vr.c,v
retrieving revision 1.79
diff -u -p -r1.79 if_vr.c
--- dev/pci/if_vr.c 14 Oct 2008 18:01:53 -0000 1.79
+++ dev/pci/if_vr.c 15 Oct 2008 23:46:07 -0000
@@ -1326,9 +1326,9 @@ int
 vr_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
 {
  struct vr_softc *sc = ifp->if_softc;
+ struct ifaddr *ifa = (struct ifaddr *) data;
  struct ifreq *ifr = (struct ifreq *) data;
  int s, error = 0;
- struct ifaddr *ifa = (struct ifaddr *)data;
 
  s = splnet();
 
@@ -1342,6 +1342,7 @@ vr_ioctl(struct ifnet *ifp, u_long comma
  arp_ifinit(&sc->arpcom, ifa);
 #endif
  break;
+
  case SIOCSIFFLAGS:
  if (ifp->if_flags & IFF_UP) {
  if (ifp->if_flags & IFF_RUNNING &&
@@ -1369,34 +1370,20 @@ vr_ioctl(struct ifnet *ifp, u_long comma
  }
  sc->sc_if_flags = ifp->if_flags;
  break;
- case SIOCSIFMTU:
- if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ifp->if_hardmtu)
- error = EINVAL;
- else
- ifp->if_mtu = ifr->ifr_mtu;
- break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (command == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->arpcom) :
-    ether_delmulti(ifr, &sc->arpcom);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware
- * filter accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- vr_setmulti(sc);
- error = 0;
- }
- break;
+
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, command);
  break;
+
  default:
  error = ether_ioctl(ifp, &sc->arpcom, command, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ vr_setmulti(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/pci/if_wb.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_wb.c,v
retrieving revision 1.41
diff -u -p -r1.41 if_wb.c
--- dev/pci/if_wb.c 14 Oct 2008 18:01:53 -0000 1.41
+++ dev/pci/if_wb.c 15 Oct 2008 23:46:07 -0000
@@ -1612,8 +1612,8 @@ int wb_ioctl(ifp, command, data)
  caddr_t data;
 {
  struct wb_softc *sc = ifp->if_softc;
+ struct ifaddr *ifa = (struct ifaddr *) data;
  struct ifreq *ifr = (struct ifreq *) data;
- struct ifaddr *ifa = (struct ifaddr *)data;
  int s, error = 0;
 
  s = splnet();
@@ -1632,6 +1632,7 @@ int wb_ioctl(ifp, command, data)
  wb_init(sc);
  }
  break;
+
  case SIOCSIFFLAGS:
  if (ifp->if_flags & IFF_UP) {
  wb_init(sc);
@@ -1641,28 +1642,20 @@ int wb_ioctl(ifp, command, data)
  }
  error = 0;
  break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (command == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->arpcom) :
-    ether_delmulti(ifr, &sc->arpcom);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware
- * filter accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- wb_setmulti(sc);
- error = 0;
- }
- break;
+
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, command);
  break;
+
  default:
  error = ether_ioctl(ifp, &sc->arpcom, command, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ wb_setmulti(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/pci/if_xge.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_xge.c,v
retrieving revision 1.48
diff -u -p -r1.48 if_xge.c
--- dev/pci/if_xge.c 9 Nov 2008 15:08:26 -0000 1.48
+++ dev/pci/if_xge.c 18 Nov 2008 22:46:16 -0000
@@ -968,8 +968,8 @@ int
 xge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
 {
  struct xge_softc *sc = ifp->if_softc;
+ struct ifaddr *ifa = (struct ifaddr *) data;
  struct ifreq *ifr = (struct ifreq *) data;
- struct ifaddr *ifa = (struct ifaddr *)data;
  int s, error = 0;
 
  s = splnet();
@@ -984,12 +984,7 @@ xge_ioctl(struct ifnet *ifp, u_long cmd,
  arp_ifinit(&sc->sc_arpcom, ifa);
 #endif /* INET */
  break;
- case SIOCSIFMTU:
- if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ifp->if_hardmtu)
- error = EINVAL;
- else if (ifp->if_mtu != ifr->ifr_mtu)
- ifp->if_mtu = ifr->ifr_mtu;
- break;
+
  case SIOCSIFFLAGS:
  if (ifp->if_flags & IFF_UP) {
  if (ifp->if_flags & IFF_RUNNING &&
@@ -1006,24 +1001,20 @@ xge_ioctl(struct ifnet *ifp, u_long cmd,
  }
  sc->xge_if_flags = ifp->if_flags;
  break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (cmd == SIOCADDMULTI)
- ? ether_addmulti(ifr, &sc->sc_arpcom)
- : ether_delmulti(ifr, &sc->sc_arpcom);
-
-                if (error == ENETRESET) {
-                        if (ifp->if_flags & IFF_RUNNING)
- xge_setmulti(sc);
- error = 0;
- }
- break;
+
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->xena_media, cmd);
  break;
+
  default:
  error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ xge_setmulti(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/pcmcia/if_ray.c
===================================================================
RCS file: /cvs/src/sys/dev/pcmcia/if_ray.c,v
retrieving revision 1.35
diff -u -p -r1.35 if_ray.c
--- dev/pcmcia/if_ray.c 2 Oct 2008 20:21:14 -0000 1.35
+++ dev/pcmcia/if_ray.c 3 Oct 2008 01:40:55 -0000
@@ -983,22 +983,6 @@ ray_ioctl(struct ifnet *ifp, u_long cmd,
  } else if (ifp->if_flags & IFF_RUNNING)
  ray_disable(sc);
  break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- if (cmd == SIOCADDMULTI) {
- RAY_DPRINTF(("%s: ioctl: cmd SIOCADDMULTI\n",
-    ifp->if_xname));
- error = ether_addmulti(ifr, &sc->sc_ec);
- } else {
- RAY_DPRINTF(("%s: ioctl: cmd SIOCDELMULTI\n",
-    ifp->if_xname));
- error = ether_delmulti(ifr, &sc->sc_ec);
- }
- if (error == ENETRESET) {
- error = 0;
- ray_update_mcast(sc);
- }
- break;
  case SIOCSIFMEDIA:
  RAY_DPRINTF(("%s: ioctl: cmd SIOCSIFMEDIA\n", ifp->if_xname));
  case SIOCGIFMEDIA:
@@ -1071,6 +1055,12 @@ ray_ioctl(struct ifnet *ifp, u_long cmd,
 #endif
  default:
  error = ether_ioctl(ifp, &sc->sc_ec, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ ray_update_mcast(sc);
+ error = 0;
  }
 
  RAY_DPRINTF(("%s: ioctl: returns %d\n", ifp->if_xname, error));
Index: dev/sbus/be.c
===================================================================
RCS file: /cvs/src/sys/dev/sbus/be.c,v
retrieving revision 1.22
diff -u -p -r1.22 be.c
--- dev/sbus/be.c 2 Oct 2008 20:21:14 -0000 1.22
+++ dev/sbus/be.c 3 Oct 2008 01:06:06 -0000
@@ -981,28 +981,19 @@ beioctl(struct ifnet *ifp, u_long cmd, c
 #endif
  break;
 
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (cmd == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_arpcom):
-    ether_delmulti(ifr, &sc->sc_arpcom);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware filter
- * accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- be_mcreset(sc);
- error = 0;
- }
- break;
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->sc_media, cmd);
  break;
+
  default:
  error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ be_mcreset(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/sbus/qe.c
===================================================================
RCS file: /cvs/src/sys/dev/sbus/qe.c,v
retrieving revision 1.22
diff -u -p -r1.22 qe.c
--- dev/sbus/qe.c 2 Oct 2008 20:21:14 -0000 1.22
+++ dev/sbus/qe.c 3 Oct 2008 01:07:18 -0000
@@ -950,23 +950,6 @@ qeioctl(ifp, cmd, data)
 #endif
  break;
 
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (cmd == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_arpcom):
-    ether_delmulti(ifr, &sc->sc_arpcom);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware filter
- * accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- qe_mcreset(sc);
- error = 0;
- }
- break;
-
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  error = ifmedia_ioctl(ifp, ifr, &sc->sc_ifmedia, cmd);
@@ -974,6 +957,12 @@ qeioctl(ifp, cmd, data)
 
  default:
  error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ qe_mcreset(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/usb/if_aue.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_aue.c,v
retrieving revision 1.74
diff -u -p -r1.74 if_aue.c
--- dev/usb/if_aue.c 6 Nov 2008 02:32:28 -0000 1.74
+++ dev/usb/if_aue.c 18 Nov 2008 22:46:24 -0000
@@ -1537,13 +1537,6 @@ aue_ioctl(struct ifnet *ifp, u_long comm
  }
  break;
 
- case SIOCSIFMTU:
- if (ifr->ifr_mtu > ETHERMTU)
- error = EINVAL;
- else
- ifp->if_mtu = ifr->ifr_mtu;
- break;
-
  case SIOCSIFFLAGS:
  if (ifp->if_flags & IFF_UP) {
  if (ifp->if_flags & IFF_RUNNING &&
@@ -1563,25 +1556,21 @@ aue_ioctl(struct ifnet *ifp, u_long comm
  sc->aue_if_flags = ifp->if_flags;
  error = 0;
  break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (command == SIOCADDMULTI) ?
- ether_addmulti(ifr, &sc->arpcom) :
- ether_delmulti(ifr, &sc->arpcom);
 
- if (error == ENETRESET) {
- if (ifp->if_flags & IFF_RUNNING)
- aue_setmulti(sc);
- error = 0;
- }
- break;
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  mii = GET_MII(sc);
  error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command);
  break;
+
  default:
  error = ether_ioctl(ifp, &sc->arpcom, command, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ aue_setmulti(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/usb/if_axe.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_axe.c,v
retrieving revision 1.90
diff -u -p -r1.90 if_axe.c
--- dev/usb/if_axe.c 6 Nov 2008 02:32:28 -0000 1.90
+++ dev/usb/if_axe.c 18 Nov 2008 22:46:24 -0000
@@ -1352,13 +1352,6 @@ axe_ioctl(struct ifnet *ifp, u_long cmd,
 #endif
  break;
 
- case SIOCSIFMTU:
- if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ifp->if_hardmtu)
- error = EINVAL;
- else if (ifp->if_mtu != ifr->ifr_mtu)
- ifp->if_mtu = ifr->ifr_mtu;
- break;
-
  case SIOCSIFFLAGS:
  if (ifp->if_flags & IFF_UP) {
  if (ifp->if_flags & IFF_RUNNING &&
@@ -1385,22 +1378,7 @@ axe_ioctl(struct ifnet *ifp, u_long cmd,
  }
  sc->axe_if_flags = ifp->if_flags;
  break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (cmd == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->arpcom) :
-    ether_delmulti(ifr, &sc->arpcom);
 
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware
- * filter accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- axe_setmulti(sc);
- error = 0;
- }
- break;
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  mii = GET_MII(sc);
@@ -1409,6 +1387,12 @@ axe_ioctl(struct ifnet *ifp, u_long cmd,
 
  default:
  error = ether_ioctl(ifp, &sc->arpcom, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ axe_setmulti(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/usb/if_cdce.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_cdce.c,v
retrieving revision 1.42
diff -u -p -r1.42 if_cdce.c
--- dev/usb/if_cdce.c 2 Oct 2008 20:21:14 -0000 1.42
+++ dev/usb/if_cdce.c 3 Oct 2008 02:23:31 -0000
@@ -531,7 +531,6 @@ cdce_ioctl(struct ifnet *ifp, u_long com
 {
  struct cdce_softc *sc = ifp->if_softc;
  struct ifaddr *ifa = (struct ifaddr *)data;
- struct ifreq *ifr = (struct ifreq *)data;
  int s, error = 0;
 
  if (sc->cdce_dying)
@@ -550,13 +549,6 @@ cdce_ioctl(struct ifnet *ifp, u_long com
  }
  break;
 
- case SIOCSIFMTU:
- if (ifr->ifr_mtu > ETHERMTU)
- error = EINVAL;
- else
- ifp->if_mtu = ifr->ifr_mtu;
- break;
-
  case SIOCSIFFLAGS:
  if (ifp->if_flags & IFF_UP) {
  if (!(ifp->if_flags & IFF_RUNNING))
@@ -568,20 +560,13 @@ cdce_ioctl(struct ifnet *ifp, u_long com
  error = 0;
  break;
 
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (command == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->cdce_arpcom) :
-    ether_delmulti(ifr, &sc->cdce_arpcom);
-
- if (error == ENETRESET)
- error = 0;
- break;
-
  default:
  error = ether_ioctl(ifp, &sc->cdce_arpcom, command, data);
  break;
  }
+
+ if (error == ENETRESET)
+ error = 0;
 
  splx(s);
  return (error);
Index: dev/usb/if_cdcef.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_cdcef.c,v
retrieving revision 1.21
diff -u -p -r1.21 if_cdcef.c
--- dev/usb/if_cdcef.c 2 Oct 2008 20:21:14 -0000 1.21
+++ dev/usb/if_cdcef.c 3 Oct 2008 02:21:59 -0000
@@ -489,13 +489,6 @@ cdcef_ioctl(struct ifnet *ifp, u_long co
  }
  break;
 
- case SIOCSIFMTU:
- if (ifr->ifr_mtu > ETHERMTU)
- error = EINVAL;
- else
- ifp->if_mtu = ifr->ifr_mtu;
- break;
-
  case SIOCSIFFLAGS:
  if (ifp->if_flags & IFF_UP) {
  if (!(ifp->if_flags & IFF_RUNNING))
@@ -507,19 +500,12 @@ cdcef_ioctl(struct ifnet *ifp, u_long co
  error = 0;
  break;
 
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (command == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_arpcom) :
-    ether_delmulti(ifr, &sc->sc_arpcom);
-
- if (error == ENETRESET)
- error = 0;
- break;
-
  default:
  error = ether_ioctl(ifp, &sc->sc_arpcom, command, data);
  }
+
+ if (error = ENETRESET)
+ error = 0;
 
  splx(s);
  return (error);
Index: dev/usb/if_cue.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_cue.c,v
retrieving revision 1.50
diff -u -p -r1.50 if_cue.c
--- dev/usb/if_cue.c 2 Oct 2008 20:21:14 -0000 1.50
+++ dev/usb/if_cue.c 3 Oct 2008 02:23:14 -0000
@@ -1100,7 +1100,6 @@ cue_ioctl(struct ifnet *ifp, u_long comm
 {
  struct cue_softc *sc = ifp->if_softc;
  struct ifaddr *ifa = (struct ifaddr *)data;
- struct ifreq *ifr = (struct ifreq *)data;
  int s, error = 0;
 
  if (sc->cue_dying)
@@ -1122,13 +1121,6 @@ cue_ioctl(struct ifnet *ifp, u_long comm
  }
  break;
 
- case SIOCSIFMTU:
- if (ifr->ifr_mtu > ETHERMTU)
- error = EINVAL;
- else
- ifp->if_mtu = ifr->ifr_mtu;
- break;
-
  case SIOCSIFFLAGS:
  if (ifp->if_flags & IFF_UP) {
  if (ifp->if_flags & IFF_RUNNING &&
@@ -1150,24 +1142,15 @@ cue_ioctl(struct ifnet *ifp, u_long comm
  sc->cue_if_flags = ifp->if_flags;
  error = 0;
  break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (command == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->arpcom) :
-    ether_delmulti(ifr, &sc->arpcom);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware
- * filter accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- cue_setmulti(sc);
- error = 0;
- }
- break;
+
  default:
  error = ether_ioctl(ifp, &sc->arpcom, command, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ cue_setmulti(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/usb/if_kue.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_kue.c,v
retrieving revision 1.57
diff -u -p -r1.57 if_kue.c
--- dev/usb/if_kue.c 2 Oct 2008 20:21:14 -0000 1.57
+++ dev/usb/if_kue.c 3 Oct 2008 02:23:05 -0000
@@ -1052,7 +1052,6 @@ kue_ioctl(struct ifnet *ifp, u_long comm
 {
  struct kue_softc *sc = ifp->if_softc;
  struct ifaddr *ifa = (struct ifaddr *)data;
- struct ifreq *ifr = (struct ifreq *)data;
  int s, error = 0;
 
  DPRINTFN(5,("%s: %s: enter\n", sc->kue_dev.dv_xname,__func__));
@@ -1083,13 +1082,6 @@ kue_ioctl(struct ifnet *ifp, u_long comm
  }
  break;
 
- case SIOCSIFMTU:
- if (ifr->ifr_mtu > ETHERMTU)
- error = EINVAL;
- else
- ifp->if_mtu = ifr->ifr_mtu;
- break;
-
  case SIOCSIFFLAGS:
  if (ifp->if_flags & IFF_UP) {
  if (ifp->if_flags & IFF_RUNNING &&
@@ -1113,24 +1105,15 @@ kue_ioctl(struct ifnet *ifp, u_long comm
  sc->kue_if_flags = ifp->if_flags;
  error = 0;
  break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (command == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->arpcom) :
-    ether_delmulti(ifr, &sc->arpcom);
-
- if (error == ENETRESET) {
- /*
- * Multicast list has changed; set the hardware
- * filter accordingly.
- */
- if (ifp->if_flags & IFF_RUNNING)
- kue_setmulti(sc);
- error = 0;
- }
- break;
+
  default:
  error = ether_ioctl(ifp, &sc->arpcom, command, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ kue_setmulti(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/usb/if_udav.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_udav.c,v
retrieving revision 1.42
diff -u -p -r1.42 if_udav.c
--- dev/usb/if_udav.c 2 Oct 2008 20:21:14 -0000 1.42
+++ dev/usb/if_udav.c 3 Oct 2008 02:35:10 -0000
@@ -1223,6 +1223,7 @@ udav_ioctl(struct ifnet *ifp, u_long cmd
  mii = GET_MII(sc);
  error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, cmd);
  break;
+
  case SIOCSIFADDR:
  ifp->if_flags |= IFF_UP;
  udav_init(ifp);
@@ -1236,12 +1237,6 @@ udav_ioctl(struct ifnet *ifp, u_long cmd
  }
  break;
 
- case SIOCSIFMTU:
- if (ifr->ifr_mtu > ETHERMTU)
- error = EINVAL;
- else
- ifp->if_mtu = ifr->ifr_mtu;
- break;
  case SIOCSIFFLAGS:
  if (ifp->if_flags & IFF_UP) {
  if (ifp->if_flags & IFF_RUNNING &&
@@ -1260,20 +1255,15 @@ udav_ioctl(struct ifnet *ifp, u_long cmd
  }
  error = 0;
  break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (cmd == SIOCADDMULTI) ?
-    ether_addmulti(ifr, &sc->sc_ac) :
-    ether_delmulti(ifr, &sc->sc_ac);
 
- if (error == ENETRESET) {
- if (ifp->if_flags & IFF_RUNNING)
- udav_setmulti(sc);
- error = 0;
- }
- break;
  default:
  error = ether_ioctl(ifp, &sc->sc_ac, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ udav_setmulti(sc);
+ error = 0;
  }
 
  splx(s);
Index: dev/usb/if_url.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_url.c,v
retrieving revision 1.53
diff -u -p -r1.53 if_url.c
--- dev/usb/if_url.c 6 Nov 2008 02:32:29 -0000 1.53
+++ dev/usb/if_url.c 18 Nov 2008 22:46:25 -0000
@@ -1116,13 +1116,6 @@ url_ioctl(struct ifnet *ifp, u_long cmd,
  }
  break;
 
- case SIOCSIFMTU:
- if (ifr->ifr_mtu > ETHERMTU)
- error = EINVAL;
- else
- ifp->if_mtu = ifr->ifr_mtu;
- break;
-
  case SIOCSIFFLAGS:
  if (ifp->if_flags & IFF_UP) {
  if (ifp->if_flags & IFF_RUNNING &&
@@ -1141,25 +1134,21 @@ url_ioctl(struct ifnet *ifp, u_long cmd,
  }
  error = 0;
  break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- error = (cmd == SIOCADDMULTI) ?
- ether_addmulti(ifr, &sc->sc_ac) :
- ether_delmulti(ifr, &sc->sc_ac);
 
- if (error == ENETRESET) {
- if (ifp->if_flags & IFF_RUNNING)
- url_setmulti(sc);
- error = 0;
- }
- break;
  case SIOCGIFMEDIA:
  case SIOCSIFMEDIA:
  mii = GET_MII(sc);
  error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, cmd);
  break;
+
  default:
  error = ether_ioctl(ifp, &sc->sc_ac, cmd, data);
+ }
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ url_setmulti(sc);
+ error = 0;
  }
 
  splx(s);
Index: net/if_trunk.c
===================================================================
RCS file: /cvs/src/sys/net/if_trunk.c,v
retrieving revision 1.60
diff -u -p -r1.60 if_trunk.c
--- net/if_trunk.c 16 Nov 2008 03:42:13 -0000 1.60
+++ net/if_trunk.c 18 Nov 2008 22:46:35 -0000
@@ -742,13 +742,6 @@ trunk_ioctl(struct ifnet *ifp, u_long cm
 #endif /* INET */
  error = ENETRESET;
  break;
- case SIOCSIFMTU:
- if (ifr->ifr_mtu > ETHERMTU) {
- error = EINVAL;
- break;
- }
- ifp->if_mtu = ifr->ifr_mtu;
- break;
  case SIOCSIFFLAGS:
  error = ENETRESET;
  break;

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Reply | Threaded
Open this post in threaded view
|

Re: diff for additional Ethernet driver ioctl cleaning needs testing.

Thomas Pfaff-2
On Thu, 20 Nov 2008 01:26:16 -0500
Brad <[hidden email]> wrote:

> This needs testing with pretty much every NIC supported. Please
> send me a dmesg with whatever you are able to test.
[...]

Tested on i386 with sis(4) and amd64 with re(4) doing usual stuff and
running tcpbench for a while.  No problems encountered so far.

$ dmesg | grep sis0
sis0 at pci0 dev 3 function 0 "SiS 900 10/100BaseTX" rev 0x90: irq 11, address 00:07:95:54:c9:9c
rlphy0 at sis0 phy 1: RTL8201L 10/100 PHY, rev. 1

$ dmesg
OpenBSD 4.4-current (GENERIC) #4: Thu Nov 20 16:59:21 CET 2008
    [hidden email]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: AMD Athlon(tm) XP 1800+ ("AuthenticAMD" 686-class, 256KB L2 cache) 1.53 GHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE
real mem  = 267939840 (255MB)
avail mem = 250654720 (239MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 04/29/02, BIOS32 rev. 0 @ 0xfdae0, SMBIOS rev. 2.3 @ 0xf0630 (23 entries)
bios0: vendor American Megatrends Inc. version "07.00T" date 04/02/01
bios0: ECS K7S5A
apm0 at bios0: Power Management spec V1.2
apm0: AC on, no battery
acpi at bios0 function 0x0 not configured
pcibios0 at bios0: rev 2.1 @ 0xf0000/0x10000
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xf7950/160 (8 entries)
pcibios0: PCI Interrupt Router at 000:02:0 ("SiS 85C503 System" rev 0x00)
pcibios0: PCI bus #1 is the last bus
bios0: ROM list: 0xc0000/0xfc00 0xd0000/0x8000
cpu0 at mainbus0: (uniprocessor)
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "SiS 735 PCI" rev 0x01
sisagp0 at pchb0
agp0 at sisagp0: aperture at 0xd0000000, size 0x2000000
ppb0 at pci0 dev 1 function 0 "SiS 86C201 AGP" rev 0x00
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "NVIDIA GeForce4 MX 440" rev 0xa3
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
pcib0 at pci0 dev 2 function 0 "SiS 85C503 System" rev 0x00
ohci0 at pci0 dev 2 function 2 "SiS 5597/5598 USB" rev 0x07: irq 11, version 1.0, legacy support
ohci1 at pci0 dev 2 function 3 "SiS 5597/5598 USB" rev 0x07: irq 12, version 1.0, legacy support
pciide0 at pci0 dev 2 function 5 "SiS 5513 EIDE" rev 0xd0: 735: DMA, channel 0 wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: <Maxtor 91024U3>
wd0: 16-sector PIO, LBA, 9541MB, 19541088 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
atapiscsi0 at pciide0 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets, initiator 7
cd0 at scsibus0 targ 0 lun 0: <, RW-321248, 1.00> ATAPI 5/cdrom removable
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2
auich0 at pci0 dev 2 function 7 "SiS 7012 AC97" rev 0xa0: irq 11, SiS7012 AC97
ac97: codec id 0x414c4710 (Avance Logic ALC200)
ac97: codec features headphone, 18 bit DAC, 18 bit ADC, Realtek 3D
audio0 at auich0
sis0 at pci0 dev 3 function 0 "SiS 900 10/100BaseTX" rev 0x90: irq 11, address 00:07:95:54:c9:9c
rlphy0 at sis0 phy 1: RTL8201L 10/100 PHY, rev. 1
eap0 at pci0 dev 13 function 0 "Ensoniq AudioPCI" rev 0x01: irq 11
audio1 at eap0
midi0 at eap0: <AudioPCI MIDI UART>
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
midi1 at pcppi0: <PC speaker>
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
it0 at isa0 port 0x2e/2: IT8705F rev 2, EC port 0x290
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
usb0 at ohci0: USB revision 1.0
uhub0 at usb0 "SiS OHCI root hub" rev 1.00/1.00 addr 1
usb1 at ohci1: USB revision 1.0
uhub1 at usb1 "SiS OHCI root hub" rev 1.00/1.00 addr 1
biomask ff65 netmask ff65 ttymask ffff
mtrr: Pentium Pro MTRR support
softraid0 at root
root on wd0a swap on wd0b dump on wd0b

$ dmesg | grep re0
re0 at pci4 dev 1 function 0 "D-Link Systems DGE-528T" rev 0x10: RTL8169/8110SB (0x1000), apic 2 int 22 (irq 3), address 00:21:91:11:dd:5e
rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 3

$ dmesg
OpenBSD 4.4-current (GENERIC.MP) #8: Thu Nov 20 15:02:24 CET 2008
    [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 3140317184 (2994MB)
avail mem = 3045060608 (2903MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf06b0 (76 entries)
bios0: vendor American Megatrends Inc. version "1704" date 11/27/2007
bios0: ASUSTeK Computer INC. P5B-E
acpi0 at bios0: rev 2
acpi0: tables DSDT FACP APIC MCFG OEMB HPET
acpi0: wakeup devices P0P2(S4) P0P1(S4) UAR1(S4) PS2K(S4) PS2M(S4) EUSB(S4) USBE(S4) P0P4(S4) P0P5(S4) P0P6(S4) P0P7(S4) P0P8(S4) P0P9(S4) USB0(S4) USB1(S4) USB2(S4) USB3(S4) USB4(S4) USB5(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 CPU 6400 @ 2.13GHz, 2562.37 MHz
cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,CX16,xTPR,NXE,LONG
cpu0: 2MB 64b/line 8-way L2 cache
cpu0: apic clock running at 266MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 CPU 6400 @ 2.13GHz, 2135.04 MHz
cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,CX16,xTPR,NXE,LONG
cpu1: 2MB 64b/line 8-way L2 cache
ioapic0 at mainbus0 apid 2 pa 0xfec00000, version 20, 24 pins
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (P0P2)
acpiprt2 at acpi0: bus 4 (P0P1)
acpiprt3 at acpi0: bus 3 (P0P4)
acpiprt4 at acpi0: bus -1 (P0P5)
acpiprt5 at acpi0: bus -1 (P0P6)
acpiprt6 at acpi0: bus -1 (P0P7)
acpiprt7 at acpi0: bus 2 (P0P8)
acpicpu0 at acpi0
acpicpu1 at acpi0
acpibtn0 at acpi0: PWRB
pci0 at mainbus0 bus 0: configuration mode 1
pchb0 at pci0 dev 0 function 0 "Intel 82G965 Host" rev 0x02
ppb0 at pci0 dev 1 function 0 "Intel 82G965 PCIE" rev 0x02: apic 2 int 16 (irq 11)
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "NVIDIA GeForce 7600 GT" rev 0xa1
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
uhci0 at pci0 dev 26 function 0 "Intel 82801H USB" rev 0x02: apic 2 int 16 (irq 11)
uhci1 at pci0 dev 26 function 1 "Intel 82801H USB" rev 0x02: apic 2 int 17 (irq 5)
ehci0 at pci0 dev 26 function 7 "Intel 82801H USB" rev 0x02: apic 2 int 18 (irq 15)
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
azalia0 at pci0 dev 27 function 0 "Intel 82801H HD Audio" rev 0x02: apic 2 int 22 (irq 3)
azalia0: codecs: Analog Devices AD1988A
audio0 at azalia0
ppb1 at pci0 dev 28 function 0 "Intel 82801H PCIE" rev 0x02: apic 2 int 16 (irq 11)
pci2 at ppb1 bus 3
ppb2 at pci0 dev 28 function 4 "Intel 82801H PCIE" rev 0x02: apic 2 int 16 (irq 11)
pci3 at ppb2 bus 2
jmb0 at pci3 dev 0 function 0 "JMicron JMB363 IDE/SATA" rev 0x02
ahci0 at jmb0: apic 2 int 16 (irq 11), AHCI 1.0
scsibus0 at ahci0: 32 targets, initiator 32
pciide0 at jmb0: DMA, channel 0 wired to native-PCI, channel 1 wired to native-PCI
pciide0: using apic 2 int 16 (irq 11) for native-PCI interrupt
atapiscsi0 at pciide0 channel 0 drive 0
scsibus1 at atapiscsi0: 2 targets, initiator 7
cd0 at scsibus1 targ 0 lun 0: <PLEXTOR, DVDR PX-740A, 1.00> ATAPI 5/cdrom removable
cd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
pciide0: channel 1 disabled (no drives)
uhci2 at pci0 dev 29 function 0 "Intel 82801H USB" rev 0x02: apic 2 int 23 (irq 7)
uhci3 at pci0 dev 29 function 1 "Intel 82801H USB" rev 0x02: apic 2 int 19 (irq 10)
uhci4 at pci0 dev 29 function 2 "Intel 82801H USB" rev 0x02: apic 2 int 18 (irq 15)
ehci1 at pci0 dev 29 function 7 "Intel 82801H USB" rev 0x02: apic 2 int 23 (irq 7)
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb3 at pci0 dev 30 function 0 "Intel 82801BA Hub-to-PCI" rev 0xf2
pci4 at ppb3 bus 4
re0 at pci4 dev 1 function 0 "D-Link Systems DGE-528T" rev 0x10: RTL8169/8110SB (0x1000), apic 2 int 22 (irq 3), address 00:21:91:11:dd:5e
rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 3
pcib0 at pci0 dev 31 function 0 "Intel 82801H LPC" rev 0x02
pciide1 at pci0 dev 31 function 2 "Intel 82801H SATA" rev 0x02: DMA, channel 0 configured to native-PCI, channel 1 configured to native-PCI
pciide1: using apic 2 int 19 (irq 10) for native-PCI interrupt
wd0 at pciide1 channel 0 drive 0: <SAMSUNG HD321KJ>
wd0: 16-sector PIO, LBA48, 305245MB, 625142448 sectors
wd0(pciide1:0:0): using PIO mode 4, Ultra-DMA mode 5
ichiic0 at pci0 dev 31 function 3 "Intel 82801H SMBus" rev 0x02: apic 2 int 18 (irq 10)
iic0 at ichiic0
spdmem0 at iic0 addr 0x50: 1GB DDR2 SDRAM non-parity PC2-5300CL5
spdmem1 at iic0 addr 0x51: 1GB DDR2 SDRAM non-parity PC2-5300CL5
spdmem2 at iic0 addr 0x52: 1GB DDR2 SDRAM non-parity PC2-5300CL5
spdmem3 at iic0 addr 0x53: 1GB DDR2 SDRAM non-parity PC2-5300CL5
pciide2 at pci0 dev 31 function 5 "Intel 82801H SATA" rev 0x02: DMA, channel 0 wired to native-PCI, channel 1 wired to native-PCI
pciide2: using apic 2 int 19 (irq 10) for native-PCI interrupt
usb2 at uhci0: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci1: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb4 at uhci2: USB revision 1.0
uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb5 at uhci3: USB revision 1.0
uhub5 at usb5 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb6 at uhci4: USB revision 1.0
uhub6 at usb6 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
wbsio0 at isa0 port 0x2e/2: W83627DHG rev 0x23
lm1 at wbsio0 port 0x290/8: W83627DHG
mtrr: Pentium Pro MTRR support
uvideo0 at uhub1 port 5 configuration 1 interface 0 "Logitech QuickCam E 3500 Plus" rev 2.00/0.06 addr 2
video0 at uvideo0
uaudio0 at uhub1 port 5 configuration 1 interface 2 "Logitech QuickCam E 3500 Plus" rev 2.00/0.06 addr 2
uaudio0: audio rev 1.00, 2 mixer controls
audio1 at uaudio0
uhidev0 at uhub5 port 1 configuration 1 interface 0 "Logitech USB-PS/2 Optical Mouse" rev 2.00/20.00 addr 2
uhidev0: iclass 3/1
ums0 at uhidev0: 3 buttons, Z dir
wsmouse0 at ums0 mux 0
ugen0 at uhub5 port 2 "American Power Conversion Back-UPS CS 650 FW:817.v4.I USB FW:v4" rev 1.10/0.06 addr 3
softraid0 at root
root on wd0a swap on wd0b dump on wd0b

Reply | Threaded
Open this post in threaded view
|

Re: diff for additional Ethernet driver ioctl cleaning needs testing.

Alexey Suslikov
In reply to this post by Brad Smith-14
Brad wrote:

> The following diff is the next step of some further cleaning
> of the Ethernet ioctl handling code in the Ethernet drivers.
> This takes advantage of the addition of MTU and multicast
> handling to ether_ioctl() so some some duplicate code can be
> removed from the individual drivers and simplifies things
> a bit.
>
> This needs testing with pretty much every NIC supported. Please
> send me a dmesg with whatever you are able to test.
>
> This mainly affects multicast handling which is used by things
> such as IPv6, CARP and OSPF.

Ok for me but lightly tested (regular network activity like radio,
gmail, browsing etc).

mskc0 at pci1 dev 0 function 0 "Marvell Yukon 88E8055" rev 0x12, Yukon-2 EC Ultra rev. A1 (0x2): apic 1 int 16 (irq 11)
msk0 at mskc0 port A: address 00:0a:e4:bb:7d:58
eephy0 at msk0 phy 0: 88E1149 Gigabit PHY, rev. 1

--
Alexey

OpenBSD 4.4-current (GENERIC.MP) #1: Sun Nov 23 17:27:55 EET 2008
    root@amilo:/usr/src/sys/arch/i386/compile/GENERIC.MP
cpu0: Intel(R) Core(TM)2 CPU T5500 @ 1.66GHz ("GenuineIntel" 686-class) 1.67 GHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,EST,TM2,CX16,xTPR
real mem  = 1063415808 (1014MB)
avail mem = 1020030976 (972MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 04/27/07, BIOS32 rev. 0 @ 0xfd440, SMBIOS rev. 2.4 @ 0xdc010 (38 entries)
bios0: vendor Phoenix Technologies LTD version "R01-B0G" date 04/27/2007
bios0: FUJITSU SIEMENS AMILO Pro Edition V3505
acpi0 at bios0: rev 0
acpi0: tables DSDT FACP APIC HPET MCFG SLIC APIC BOOT SSDT SSDT
acpi0: wakeup devices LID0(S3) SLPB(S3) HDEF(S3) PXS1(S4) PXS2(S4) PXS3(S4) PXS4(S4) PXS5(S4) PXS6(S4) MODM(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: apic clock running at 166MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 CPU T5500 @ 1.66GHz ("GenuineIntel" 686-class) 1.67 GHz
cpu1: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,EST,TM2,CX16,xTPR
ioapic0 at mainbus0: apid 1 pa 0xfec00000, version 20, 24 pins
ioapic0: misconfigured as apic 2, remapped to apid 1
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 2 (RP01)
acpiprt2 at acpi0: bus 4 (RP02)
acpiprt3 at acpi0: bus -1 (RP03)
acpiprt4 at acpi0: bus -1 (RP04)
acpiprt5 at acpi0: bus -1 (RP05)
acpiprt6 at acpi0: bus -1 (RP06)
acpiprt7 at acpi0: bus 10 (PCIB)
acpiec0 at acpi0
acpicpu0 at acpi0: C3, C2
acpicpu1 at acpi0: C3, C2
acpitz0 at acpi0: critical temperature 96 degC
acpitz1 at acpi0: critical temperature 111 degC
acpibtn0 at acpi0: LID0
acpibtn1 at acpi0: SLPB
acpibat0 at acpi0: BAT0 model "BTP-B4K8" serial  1852 type LION oem "323241502d504d53"
acpiac0 at acpi0: AC unit online
acpivideo at acpi0 not configured
bios0: ROM list: 0xc0000/0xea00! 0xcf000/0x1000 0xdc000/0x4000! 0xe0000/0x1800!
cpu0: unknown Enhanced SpeedStep CPU, msr 0x06130a2b06000a2b
cpu0: using only highest and lowest power states
cpu0: Enhanced SpeedStep 1667 MHz (1388 mV): speeds: 1667, 1000 MHz
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 "Intel 82945GM Host" rev 0x03
vga1 at pci0 dev 2 function 0 "Intel 82945GM Video" rev 0x03
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
intagp0 at vga1
agp0 at intagp0: aperture at 0xc0000000, size 0x10000000
inteldrm0 at vga1
drm0 at inteldrm0
"Intel 82945GM Video" rev 0x03 at pci0 dev 2 function 1 not configured
azalia0 at pci0 dev 27 function 0 "Intel 82801GB HD Audio" rev 0x02: apic 1 int 21 (irq 10)
azalia0: host: High Definition Audio rev. 1.0
azalia0: host: 4 output, 4 input, and 0 bidi streams
azalia_attach: resetting
azalia_attach: reset counter = 5000
azalia_attach: reset counter = 4985
azalia0: found a codec at #0
azalia0: found a codec at #1
azalia_init_corb: CORB allocation succeeded.
azalia_init_corb: CORBWP=0; size=256
azalia_init_rirb: RIRB allocation succeeded.
azalia_init_rirb: RIRBRP=0, size=256
azalia0: codec[0] vid 0x10ec0861, subid 0x10c11734, rev. 3.0, HDA version 1.0
azalia_codec_init: nidstart=1 #functions=1
azalia_codec_init: FTYPE result = 0x00000001
azalia_codec_init: There are 33 widgets in the audio function.
        encodings=1<PCM>
        PCM formats=e0140<24bit,20bit,16bit,96kHz,48kHz>
        inamp: mute=0 size=0 steps=0 offset=0
        outamp: mute=1 size=0 steps=0 offset=0
        gpio: wake=0 unsol=0 gpis=0 gpos=0 gpios=0
azalia0: dac03 wcap=405<POWER,OUTAMP,STEREO>
azalia0: dac04 wcap=405<POWER,OUTAMP,STEREO>
azalia0: dac05 wcap=405<POWER,OUTAMP,STEREO>
azalia0: dac06 wcap=405<POWER,OUTAMP,STEREO>
azalia0: dac07 wcap=605<POWER,DIGITAL,OUTAMP,STEREO>
azalia0: adc08 wcap=10051b<POWER,CONNLIST,FORMATOV,AMPOV,INAMP,STEREO>
        encodings=1<PCM>
        PCM formats=20140<16bit,96kHz,48kHz>
        inamp: mute=1 size=11 steps=13 offset=2
        connections=0xd,0xc,0xf,0x10,0x11,0x15; selected=0xd
azalia0: vendor09 wcap=f00000
azalia0: vendor0a wcap=f00000
azalia0: green0b wcap=400581<POWER,CONNLIST,UNSOL,STEREO>
        cap=1f<OUTPUT,HEADPHONE,PRESENCE,TRIGGER,IMPEDANCE>
        [01/00] color=green device=line conn=jack conntype=1/8
        location=rear chassis=external special=none
        connections=0x16; selected=0x16
azalia0: black0c wcap=400581<POWER,CONNLIST,UNSOL,STEREO>
        cap=37<INPUT,OUTPUT,PRESENCE,TRIGGER,IMPEDANCE>
        [15/00] color=black device=spkr conn=none conntype=1/8
        location=rear chassis=external special=none
        connections=0x19; selected=0x19
azalia0: pink0d wcap=400581<POWER,CONNLIST,UNSOL,STEREO>
        cap=337<VREF50,VREFHIZ,INPUT,OUTPUT,PRESENCE,TRIGGER,IMPEDANCE>
        [02/14] color=pink device=mic conn=jack conntype=1/8
        location=rear chassis=external special=none
        connections=0x18; selected=0x18
azalia0: black0e wcap=400581<POWER,CONNLIST,UNSOL,STEREO>
        cap=17<OUTPUT,PRESENCE,TRIGGER,IMPEDANCE>
        [15/00] color=black device=spkr conn=none conntype=1/8
        location=rear chassis=external special=none
        connections=0x19; selected=0x19
azalia0: black0f wcap=400581<POWER,CONNLIST,UNSOL,STEREO>
        cap=33f<VREF50,VREFHIZ,INPUT,OUTPUT,HEADPHONE,PRESENCE,TRIGGER,IMPEDANCE>
        [15/00] color=black device=spkr conn=none conntype=1/8
        location=rear chassis=external special=none
        connections=0x1a; selected=0x1a
azalia0: unknown10 wcap=400581<POWER,CONNLIST,UNSOL,STEREO>
        cap=33f<VREF50,VREFHIZ,INPUT,OUTPUT,HEADPHONE,PRESENCE,TRIGGER,IMPEDANCE>
        [02/00] color=unknown device=mic conn=fixed conntype=atapi
        location=spec2 chassis=internal special=atapi
        connections=0x1b; selected=0x1b
azalia0: black11 wcap=400001<STEREO>
        cap=63<BALANCE,INPUT,TRIGGER,IMPEDANCE>
        [15/00] color=black device=spkr conn=none conntype=1/8
        location=rear chassis=external special=none
azalia0: black12 wcap=400301<DIGITAL,CONNLIST,STEREO>
        cap=10<OUTPUT>
        [15/00] color=black device=spkr conn=none conntype=1/8
        location=rear chassis=external special=none
        connections=0x7; selected=0x7
azalia0: vendor13 wcap=f00000
azalia0: mix14 wcap=20010b<CONNLIST,AMPOV,INAMP,STEREO>
        inamp: mute=1 size=0 steps=0 offset=0
        connections=0xd,0x10; selected=0xd
azalia0: mix15 wcap=20050f<POWER,CONNLIST,AMPOV,OUTAMP,INAMP,STEREO>
        inamp: mute=1 size=11 steps=23 offset=12
        outamp: mute=1 size=11 steps=12 offset=12
        connections=0x11,0x14,0x1c; selected=0x11
azalia0: mix16 wcap=20010b<CONNLIST,AMPOV,INAMP,STEREO>
        inamp: mute=1 size=0 steps=0 offset=0
        connections=0x3,0x15; selected=0x3
azalia0: mix17 wcap=20010b<CONNLIST,AMPOV,INAMP,STEREO>
        inamp: mute=1 size=0 steps=0 offset=0
        connections=0x4,0x15; selected=0x4
azalia0: mix18 wcap=20010b<CONNLIST,AMPOV,INAMP,STEREO>
        inamp: mute=1 size=0 steps=0 offset=0
        connections=0x5,0x15; selected=0x5
azalia0: mix19 wcap=20010b<CONNLIST,AMPOV,INAMP,STEREO>
        inamp: mute=1 size=0 steps=0 offset=0
        connections=0x6,0x15; selected=0x6
azalia0: mix1a wcap=20010b<CONNLIST,AMPOV,INAMP,STEREO>
        inamp: mute=1 size=0 steps=0 offset=0
        connections=0x4,0x6,0x15,0x3; selected=0x4
azalia0: mix1b wcap=20010b<CONNLIST,AMPOV,INAMP,STEREO>
        inamp: mute=1 size=0 steps=0 offset=0
        connections=0x4,0x6,0x15,0x3; selected=0x4
azalia0: mix1c wcap=20010b<CONNLIST,AMPOV,INAMP,STEREO>
        inamp: mute=1 size=0 steps=0 offset=0
        connections=0xc,0xf; selected=0xc
azalia0: vendor1d wcap=f00000
azalia0: vendor1e wcap=f00000
azalia0: black1f wcap=400581<POWER,CONNLIST,UNSOL,STEREO>
        cap=17<OUTPUT,PRESENCE,TRIGGER,IMPEDANCE>
        [15/00] color=black device=spkr conn=none conntype=1/8
        location=rear chassis=external special=none
        connections=0x18; selected=0x18
azalia0: black20 wcap=400581<POWER,CONNLIST,UNSOL,STEREO>
        cap=17<OUTPUT,PRESENCE,TRIGGER,IMPEDANCE>
        [15/00] color=black device=spkr conn=none conntype=1/8
        location=rear chassis=external special=none
        connections=0x17; selected=0x17
azalia0: vendor21 wcap=f00000
azalia0: vendor22 wcap=f00000
azalia0: beep23 wcap=70000c<AMPOV,OUTAMP>
        outamp: mute=1 size=11 steps=15 offset=15
azalia_codec_init: dacgroup[0]: 03 04 05 06
azalia_codec_init: adcgroup[0]: 08
azalia0: codec[1] vid 0x10573055, subid 0x10c11734, rev. 7.0, HDA version 1.0
azalia_codec_init: nidstart=1 #functions=1
azalia_codec_init: FTYPE result = 0x00000102
azalia0: codec[1]: No audio function groups
azalia0: codecs: Realtek ALC861, Motorola/0x3055, using Realtek ALC861
audio0 at azalia0
azalia_round_blocksize: resultant block size = 9600
azalia_round_blocksize: resultant block size = 9600
ppb0 at pci0 dev 28 function 0 "Intel 82801GB PCIE" rev 0x02: apic 1 int 17 (irq 11)
pci1 at ppb0 bus 2
mskc0 at pci1 dev 0 function 0 "Marvell Yukon 88E8055" rev 0x12, Yukon-2 EC Ultra rev. A1 (0x2): apic 1 int 16 (irq 11)
msk0 at mskc0 port A: address 00:0a:e4:bb:7d:58
eephy0 at msk0 phy 0: 88E1149 Gigabit PHY, rev. 1
ppb1 at pci0 dev 28 function 1 "Intel 82801GB PCIE" rev 0x02: apic 1 int 16 (irq 11)
pci2 at ppb1 bus 4
wpi0 at pci2 dev 0 function 0 "Intel PRO/Wireless 3945ABG" rev 0x02: apic 1 int 17 (irq 11), MoW2, address 00:18:de:48:7d:a2
uhci0 at pci0 dev 29 function 0 "Intel 82801GB USB" rev 0x02: apic 1 int 23 (irq 5)
uhci1 at pci0 dev 29 function 1 "Intel 82801GB USB" rev 0x02: apic 1 int 17 (irq 11)
uhci2 at pci0 dev 29 function 2 "Intel 82801GB USB" rev 0x02: apic 1 int 18 (irq 10)
uhci3 at pci0 dev 29 function 3 "Intel 82801GB USB" rev 0x02: apic 1 int 19 (irq 10)
ehci0 at pci0 dev 29 function 7 "Intel 82801GB USB" rev 0x02: apic 1 int 23 (irq 5)
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb2 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xe2
pci3 at ppb2 bus 10
cbb0 at pci3 dev 6 function 0 "ENE CB-712 CardBus" rev 0x10: apic 1 int 22 (irq 11)
"ENE Memory Stick" rev 0x01 at pci3 dev 6 function 1 not configured
sdhc0 at pci3 dev 6 function 2 "ENE SD Controller" rev 0x01: apic 1 int 20 (irq 10)
sdmmc0 at sdhc0
"ENE SD/MMC" rev 0x01 at pci3 dev 6 function 4 not configured
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 11 device 0 cacheline 0x10, lattimer 0x20
pcmcia0 at cardslot0
ichpcib0 at pci0 dev 31 function 0 "Intel 82801GBM LPC" rev 0x02: PM disabled
pciide0 at pci0 dev 31 function 1 "Intel 82801GB IDE" rev 0x02: DMA, channel 0 configured to compatibility, channel 1 configured to compatibility
atapiscsi0 at pciide0 channel 0 drive 0
scsibus0 at atapiscsi0: 2 targets, initiator 7
cd0 at scsibus0 targ 0 lun 0: <HL-DT-ST, DVDRAM GSA-T10N, PW03> ATAPI 5/cdrom removable
cd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
pciide0: channel 1 ignored (disabled)
ahci0 at pci0 dev 31 function 2 "Intel 82801GBM AHCI" rev 0x02: apic 1 int 19 (irq 10), AHCI 1.1
ahci0: PHY offline on port 2
scsibus1 at ahci0: 32 targets, initiator 32
sd0 at scsibus1 targ 0 lun 0: <ATA, WDC WD1600BEVS-2, 04.0> SCSI3 0/direct fixed
sd0: 152627MB, 512 bytes/sec, 312581808 sec total
ichiic0 at pci0 dev 31 function 3 "Intel 82801GB SMBus" rev 0x02: apic 1 int 19 (irq 10)
iic0 at ichiic0
spdmem0 at iic0 addr 0x52: 1GB DDR2 SDRAM non-parity PC2-4200CL5 SO-DIMM
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb4 at uhci3: USB revision 1.0
uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at ichpcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
mtrr: Pentium Pro MTRR support
uhidev0 at uhub2 port 1 configuration 1 interface 0 "KYE Genius USB Wheel Mouse" rev 1.00/0.00 addr 2
uhidev0: iclass 3/1
ums0 at uhidev0: 3 buttons, Z dir
wsmouse1 at ums0 mux 0
ugen0 at uhub1 port 2 "Cambridge Silicon Radio Bluetooth" rev 2.00/16.57 addr 2
softraid0 at root
root on sd0a swap on sd0b dump on sd0b

Reply | Threaded
Open this post in threaded view
|

Re: diff for additional Ethernet driver ioctl cleaning needs testing.

Sevan / Venture37-2
In reply to this post by Brad Smith-14
Brad wrote:

> The following diff is the next step of some further cleaning
> of the Ethernet ioctl handling code in the Ethernet drivers.
> This takes advantage of the addition of MTU and multicast
> handling to ether_ioctl() so some some duplicate code can be
> removed from the individual drivers and simplifies things
> a bit.
>
> This needs testing with pretty much every NIC supported. Please
> send me a dmesg with whatever you are able to test.
>
> This mainly affects multicast handling which is used by things
> such as IPv6, CARP and OSPF.

tested on amd64 & sparc64 snapshot, both hosts had ipv4 & ipv6
connectivity, no problems found.


OpenBSD 4.4-current (GENERIC.MP) #0: Thu Nov 20 21:26:53 GMT 2008
     [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 2132901888 (2034MB)
avail mem = 2071060480 (1975MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xdc010 (38 entries)
bios0: vendor Dell Inc. version "A13" date 10/09/2008
bios0: Dell Inc. Vostro1310
acpi0 at bios0: rev 2
acpi0: tables DSDT FACP APIC HPET MCFG TCPA TMOR OSFR APIC BOOT SLIC
SSDT SSDT SSDT SSDT
acpi0: wakeup devices LID0(S3) HDEF(S3) PXSX(S3) PXSX(S5) USB1(S0)
USB2(S0) USB3(S0) USB4(S0) USB5(S0) EHC1(S0) EHC2(S0)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 Duo CPU T5670 @ 1.80GHz, 1795.80 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,EST,TM2,CX16,xTPR,NXE,LONG
cpu0: 2MB 64b/line 8-way L2 cache
cpu0: apic clock running at 199MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 Duo CPU T5670 @ 1.80GHz, 1795.50 MHz
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,EST,TM2,CX16,xTPR,NXE,LONG
cpu1: 2MB 64b/line 8-way L2 cache
ioapic0 at mainbus0 apid 1 pa 0xfec00000, version 20, 24 pins
ioapic0: misconfigured as apic 2, remapped to apid 1
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (PEGP)
acpiprt2 at acpi0: bus 2 (RP01)
acpiprt3 at acpi0: bus 3 (RP02)
acpiprt4 at acpi0: bus -1 (RP03)
acpiprt5 at acpi0: bus -1 (RP04)
acpiprt6 at acpi0: bus 7 (RP05)
acpiprt7 at acpi0: bus -1 (RP06)
acpiprt8 at acpi0: bus 8 (PCIB)
acpiec0 at acpi0
acpicpu0 at acpi0: C3, C2
acpicpu1 at acpi0: C3, C2
acpibtn0 at acpi0: LID0
acpibtn1 at acpi0: PWRB
acpibtn2 at acpi0: SLPB
acpiac0 at acpi0: AC unit offline
acpibat0 at acpi0: BAT1 serial 11 type Lion oem "Dell"
acpivideo at acpi0 not configured
acpivideo at acpi0 not configured
cpu0: unknown Enhanced SpeedStep CPU, msr 0x0612092506000925
cpu0: using only highest and lowest power states
cpu0: Enhanced SpeedStep 1800 MHz (1292 mV): speeds: 1800, 1200 MHz
pci0 at mainbus0 bus 0: configuration mode 1
pchb0 at pci0 dev 0 function 0 "Intel GM965 Host" rev 0x0c
ppb0 at pci0 dev 1 function 0 "Intel GM965 PCIE" rev 0x0c: apic 1 int 16
(irq 5)
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "NVIDIA GeForce 8400M GS" rev 0xa1
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
uhci0 at pci0 dev 26 function 0 "Intel 82801H USB" rev 0x03: apic 1 int
16 (irq 5)
uhci1 at pci0 dev 26 function 1 "Intel 82801H USB" rev 0x03: apic 1 int
21 (irq 11)
ehci0 at pci0 dev 26 function 7 "Intel 82801H USB" rev 0x03: apic 1 int
18 (irq 10)
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
azalia0 at pci0 dev 27 function 0 "Intel 82801H HD Audio" rev 0x03: apic
1 int 22 (irq 10)
azalia0: codecs: Realtek ALC268
audio0 at azalia0
ppb1 at pci0 dev 28 function 0 "Intel 82801H PCIE" rev 0x03: apic 1 int
17 (irq 11)
pci2 at ppb1 bus 2
ppb2 at pci0 dev 28 function 1 "Intel 82801H PCIE" rev 0x03: apic 1 int
16 (irq 5)
pci3 at ppb2 bus 3
ppb3 at pci0 dev 28 function 4 "Intel 82801H PCIE" rev 0x03: apic 1 int
17 (irq 11)
pci4 at ppb3 bus 7
re0 at pci4 dev 0 function 0 "Realtek 8168" rev 0x02: RTL8168C/8111C
(0x3c00), apic 1 int 16 (irq 5), address 00:1c:23:
rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 2
uhci2 at pci0 dev 29 function 0 "Intel 82801H USB" rev 0x03: apic 1 int
23 (irq 10)
uhci3 at pci0 dev 29 function 1 "Intel 82801H USB" rev 0x03: apic 1 int
19 (irq 11)
uhci4 at pci0 dev 29 function 2 "Intel 82801H USB" rev 0x03: apic 1 int
18 (irq 10)
ehci1 at pci0 dev 29 function 7 "Intel 82801H USB" rev 0x03: apic 1 int
23 (irq 10)
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb4 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xf3
pci5 at ppb4 bus 8
"O2 Micro Firewire" rev 0x02 at pci5 dev 5 function 0 not configured
sdhc0 at pci5 dev 5 function 2 "O2 Micro OZ711MP1 SDHC" rev 0x02: apic 1
int 22 (irq 10)
sdmmc0 at sdhc0
"O2 Micro OZ711MP1 XDHC" rev 0x01 at pci5 dev 5 function 3 not configured
pcib0 at pci0 dev 31 function 0 "Intel 82801HBM LPC" rev 0x03
pciide0 at pci0 dev 31 function 1 "Intel 82801HBM IDE" rev 0x03: DMA,
channel 0 configured to compatibility, channel 1 configured to compatibility
atapiscsi0 at pciide0 channel 0 drive 0
scsibus0 at atapiscsi0: 2 targets, initiator 7
cd0 at scsibus0 targ 0 lun 0: <TEAC, DVD+-RW DVW28SLC, A.06> ATAPI
5/cdrom removable
cd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
pciide0: channel 1 disabled (no drives)
ahci0 at pci0 dev 31 function 2 "Intel 82801HBM AHCI" rev 0x03: apic 1
int 18 (irq 10), AHCI 1.1
ahci0: PHY offline on port 1
ahci0: PHY offline on port 2
scsibus1 at ahci0: 32 targets, initiator 32
sd0 at scsibus1 targ 0 lun 0: <ATA, SAMSUNG HM160HI, HH10> SCSI3
0/direct fixed
sd0: 152627MB, 512 bytes/sec, 312581808 sec total
ichiic0 at pci0 dev 31 function 3 "Intel 82801H SMBus" rev 0x03: apic 1
int 18 (irq 10)
iic0 at ichiic0
spdmem0 at iic0 addr 0x50: 1GB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM
spdmem1 at iic0 addr 0x52: 1GB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM
usb2 at uhci0: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci1: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb4 at uhci2: USB revision 1.0
uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb5 at uhci3: USB revision 1.0
uhub5 at usb5 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb6 at uhci4: USB revision 1.0
uhub6 at usb6 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
mtrr: Pentium Pro MTRR support
uvideo0 at uhub0 port 3 configuration 1 interface 0 "SONiX Technology
Inc Integrated Webcam" rev 2.00/83.04 addr 2
video0 at uvideo0
rum0 at uhub1 port 5 "Ralink 802.11 bg WLAN" rev 2.00/0.01 addr 2
rum0: MAC/BBP RT2573 (rev 0x2573a), RF RT2528, address 00:16:e6:
softraid0 at root
root on sd0a swap on sd0b dump on sd0b




console is /pci@1f,0/isa@7/serial@0,3f8
Copyright (c) 1982, 1986, 1989, 1991, 1993
         The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2008 OpenBSD. All rights reserved.
http://www.OpenBSD.org

OpenBSD 4.4-current (GENERIC) #0: Fri Nov 21 04:39:23 GMT 2008
     [hidden email]:/usr/src/sys/arch/sparc64/compile/GENERIC
real mem = 268435456 (256MB)
avail mem = 247955456 (236MB)
mainbus0 at root: Sun Blade 100 (UltraSPARC-IIe)
cpu0 at mainbus0: SUNW,UltraSPARC-IIe (rev 1.4) @ 502 MHz
cpu0: physical 16K instruction (32 b/l), 16K data (32 b/l), 256K
external (64 b/l)
psycho0 at mainbus0: pci108e,a001, impl 0, version 0, ign 7c0
psycho0: bus range 0-1, PCI bus 0
psycho0: dvma map c0000000-dfffffff,
pci0 at psycho0
ebus0 at pci0 dev 12 function 0 "Sun RIO EBus" rev 0x01
"flashprom" at ebus0 addr 0-fffff not configured
clock1 at ebus0 addr 0-1fff: mk48t59
ebus1 at pci0 dev 7 function 0 "Acer Labs M1533 ISA" rev 0x00
"dma" at ebus1 addr 0-ffff ivec 0x2a not configured
power0 at ebus1 addr 800-82f ivec 0x20
com0 at ebus1 addr 3f8-3ff ivec 0x2b: ns16550a, 16 byte fifo
com0: console
com1 at ebus1 addr 2e8-2ef ivec 0x2b: ns16550a, 16 byte fifo
alipm0 at pci0 dev 3 function 0 "Acer Labs M7101 Power" rev 0x00: 223KHz
clock
iic0 at alipm0
"max1617" at alipm0 addr 0x18 skipped due to alipm0 bugs
"scm001" at alipm0 addr 0x20 skipped due to alipm0 bugs
spdmem0 at iic0 addr 0x50: 128MB SDRAM ECC PC100CL2
spdmem1 at iic0 addr 0x51: 128MB SDRAM ECC PC100CL2
gem0 at pci0 dev 12 function 1 "Sun ERI Ether" rev 0x01: ivec 0x7c6,
address 00:03:ba:
ukphy0 at gem0 phy 1: Generic IEEE 802.3u media interface, rev. 1: OUI
0x0010dd, model 0x0002
"Sun FireWire" rev 0x01 at pci0 dev 12 function 2 not configured
ohci0 at pci0 dev 12 function 3 "Sun USB" rev 0x01: ivec 0x7e4, version
1.0, legacy support
autri0 at pci0 dev 8 function 0 "Acer Labs M5451 Audio" rev 0x01: ivec 0x7e3
ac97: codec id 0x41445348 (Analog Devices AD1881A)
ac97: codec features headphone, Analog Devices Phat Stereo
audio0 at autri0
midi0 at autri0: <4DWAVE MIDI UART>
pciide0 at pci0 dev 13 function 0 "Acer Labs M5229 UDMA IDE" rev 0xc3:
DMA, channel 0 configured to native-PCI, channel 1 configured to native-PCI
pciide0: using ivec 0x7cc for native-PCI interrupt
wd0 at pciide0 channel 0 drive 0: <WDC WD400BB-00DEA0>
wd0: 16-sector PIO, LBA, 38166MB, 78165360 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
atapiscsi0 at pciide0 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets, initiator 7
cd0 at scsibus0 targ 0 lun 0: <ATAPI, 48X CDROM, 3.10> ATAPI 5/cdrom
removable
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2
ppb0 at pci0 dev 5 function 0 "DEC 21152 PCI-PCI" rev 0x03
pci1 at ppb0 bus 1
xl0 at pci1 dev 1 function 0 "3Com 3c905B 100Base-TX" rev 0x24: ivec
0x7ca, address 00:10:4b:
exphy0 at xl0 phy 24: 3Com internal media interface
wi0 at pci1 dev 2 function 0 "Intersil PRISM2.5" rev 0x01: ivec 0x7d5
wi0: PRISM2.5 ISL3874A(Mini-PCI) (0x8013), Firmware 1.0.7 (primary),
1.3.6 (station), address 00:09:5b:
"ATI Rage XL" rev 0x27 at pci0 dev 19 function 0 not configured
usb0 at ohci0: USB revision 1.0
uhub0 at usb0 "Sun OHCI root hub" rev 1.00/1.00 addr 1
softraid0 at root
bootpath: /pci@1f,0/ide@d,0/disk@0,0
root on wd0a swap on wd0b dump on wd0b