Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys/dev/pci Pull up following revision(s) (requested by m...



details:   https://anonhg.NetBSD.org/src/rev/18a95e63bc79
branches:  netbsd-8
changeset: 852388:18a95e63bc79
user:      martin <martin%NetBSD.org@localhost>
date:      Tue May 14 11:43:23 2019 +0000

description:
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.

diffstat:

 sys/dev/pci/if_alc.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (37 lines):

diff -r 01c3ede4a11b -r 18a95e63bc79 sys/dev/pci/if_alc.c
--- a/sys/dev/pci/if_alc.c      Tue May 14 11:40:41 2019 +0000
+++ b/sys/dev/pci/if_alc.c      Tue May 14 11:43:23 2019 +0000
@@ -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 <yongari%FreeBSD.org@localhost>
@@ -2036,15 +2036,16 @@
 
        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 @@
        case SIOCGIFMEDIA:
                error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, cmd);
                break;
- 
+
        default:
                error = ether_ioctl(ifp, cmd, data);
                break;



Home | Main Index | Thread Index | Old Index