Module Name: src
Committed By: martin
Date: Tue May 14 11:43:23 UTC 2019
Modified Files:
src/sys/dev/pci [netbsd-8]: if_alc.c
Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1268):
sys/dev/pci/if_alc.c: revision 1.33
sys/dev/pci/if_alc.c: revision 1.34
Fix a wrong and extra ether_ioctl() call in alc_ioctl(). _IOWR types call
broke ifreq by the first ether_ioct() and the second ether_ioctl() caused
unexpected behavior. One of bug example is that SIOCGIFMEDIA always failed.
This bug was added in if_alc.c rev. 1.16.
XXX pullup-8
-
Add ether_ioctl() call for SIOCSIFADDR and SIOCSIFFLAGS to make behavior
the same as before.
XXX need cleanup.
To generate a diff of this commit:
cvs rdiff -u -r1.24.8.2 -r1.24.8.3 src/sys/dev/pci/if_alc.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/if_alc.c
diff -u src/sys/dev/pci/if_alc.c:1.24.8.2 src/sys/dev/pci/if_alc.c:1.24.8.3
--- src/sys/dev/pci/if_alc.c:1.24.8.2 Thu Jul 26 23:55:30 2018
+++ src/sys/dev/pci/if_alc.c Tue May 14 11:43:23 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: if_alc.c,v 1.24.8.2 2018/07/26 23:55:30 snj Exp $ */
+/* $NetBSD: if_alc.c,v 1.24.8.3 2019/05/14 11:43:23 martin Exp $ */
/* $OpenBSD: if_alc.c,v 1.1 2009/08/08 09:31:13 kevlo Exp $ */
/*-
* Copyright (c) 2009, Pyun YongHyeon <[email protected]>
@@ -2036,15 +2036,16 @@ alc_ioctl(struct ifnet *ifp, u_long cmd,
s = splnet();
- error = ether_ioctl(ifp, cmd, data);
switch (cmd) {
case SIOCSIFADDR:
+ error = ether_ioctl(ifp, cmd, data);
ifp->if_flags |= IFF_UP;
if (!(ifp->if_flags & IFF_RUNNING))
alc_init(ifp);
break;
-
+
case SIOCSIFFLAGS:
+ error = ether_ioctl(ifp, cmd, data);
if (ifp->if_flags & IFF_UP) {
if (ifp->if_flags & IFF_RUNNING)
error = ENETRESET;
@@ -2060,7 +2061,7 @@ alc_ioctl(struct ifnet *ifp, u_long cmd,
case SIOCGIFMEDIA:
error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, cmd);
break;
-
+
default:
error = ether_ioctl(ifp, cmd, data);
break;