Module Name:    src
Committed By:   msaitoh
Date:           Wed Apr 24 11:18:21 UTC 2019

Modified Files:
        src/sys/arch/arm/imx: if_enet.c
        src/sys/dev/pci: if_wm.c

Log Message:
SIOCS is 'S'et function and the ioctl argument is ifreq.
SIOCG is 'G'et function and the ioctl armument is ifmediareq.
Before this change, SIOCG modify sc->sc_flowflags unexpectedly.
Don't hook SIOCGIFMEDIA becauise this driver uses MII(4) and ether_ioctl has
the hook(if_ethersubr.c rev. 1.160).
real bug because the modification is overriden in ifmedia_ioctl().
 This driver might require some additional fixes for SIOCSIFMTU and other
ioctl()s.

XXX pullup-[78].


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/imx/if_enet.c
cvs rdiff -u -r1.633 -r1.634 src/sys/dev/pci/if_wm.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/arch/arm/imx/if_enet.c
diff -u src/sys/arch/arm/imx/if_enet.c:1.18 src/sys/arch/arm/imx/if_enet.c:1.19
--- src/sys/arch/arm/imx/if_enet.c:1.18	Thu Apr 11 08:50:59 2019
+++ src/sys/arch/arm/imx/if_enet.c	Wed Apr 24 11:18:20 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_enet.c,v 1.18 2019/04/11 08:50:59 msaitoh Exp $	*/
+/*	$NetBSD: if_enet.c,v 1.19 2019/04/24 11:18:20 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2014 Ryo Shimizu <r...@nerv.org>
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_enet.c,v 1.18 2019/04/11 08:50:59 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_enet.c,v 1.19 2019/04/24 11:18:20 msaitoh Exp $");
 
 #include "vlan.h"
 
@@ -1041,7 +1041,6 @@ enet_ioctl(struct ifnet *ifp, u_long com
 		}
 		break;
 	case SIOCSIFMEDIA:
-	case SIOCGIFMEDIA:
 		/* Flow control requires full-duplex mode. */
 		if (IFM_SUBTYPE(ifr->ifr_media) == IFM_AUTO ||
 		    (ifr->ifr_media & IFM_FDX) == 0)

Index: src/sys/dev/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.633 src/sys/dev/pci/if_wm.c:1.634
--- src/sys/dev/pci/if_wm.c:1.633	Wed Apr 24 10:21:22 2019
+++ src/sys/dev/pci/if_wm.c	Wed Apr 24 11:18:20 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.633 2019/04/24 10:21:22 msaitoh Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.634 2019/04/24 11:18:20 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.633 2019/04/24 10:21:22 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.634 2019/04/24 11:18:20 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -3366,7 +3366,6 @@ wm_ioctl(struct ifnet *ifp, u_long cmd, 
 #endif
 	switch (cmd) {
 	case SIOCSIFMEDIA:
-	case SIOCGIFMEDIA:
 		WM_CORE_LOCK(sc);
 		/* Flow control requires full-duplex mode. */
 		if (IFM_SUBTYPE(ifr->ifr_media) == IFM_AUTO ||

Reply via email to