Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic This driver uses MII(4) and have hook SIOC[GS]IFM...
details: https://anonhg.NetBSD.org/src/rev/3abad0c76c1d
branches: trunk
changeset: 456086:3abad0c76c1d
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Mon Apr 22 09:00:12 2019 +0000
description:
This driver uses MII(4) and have hook SIOC[GS]IFMEDIA which just pass to
ifmedia_ioctl(), the hook is not required because ether_ioctl has it
(if_ethersubr.c rev. 1.160). These drivers don't return ENETRESET in
ifmedia_ioctl(), so no functional change.
diffstat:
sys/dev/ic/smc91cxx.c | 17 +++++------------
1 files changed, 5 insertions(+), 12 deletions(-)
diffs (59 lines):
diff -r bc04a5d27372 -r 3abad0c76c1d sys/dev/ic/smc91cxx.c
--- a/sys/dev/ic/smc91cxx.c Mon Apr 22 08:39:10 2019 +0000
+++ b/sys/dev/ic/smc91cxx.c Mon Apr 22 09:00:12 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: smc91cxx.c,v 1.99 2019/02/05 06:17:02 msaitoh Exp $ */
+/* $NetBSD: smc91cxx.c,v 1.100 2019/04/22 09:00:12 msaitoh Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: smc91cxx.c,v 1.99 2019/02/05 06:17:02 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: smc91cxx.c,v 1.100 2019/04/22 09:00:12 msaitoh Exp $");
#include "opt_inet.h"
@@ -316,6 +316,7 @@
sc->sc_mii.mii_readreg = smc91cxx_mii_readreg;
sc->sc_mii.mii_writereg = smc91cxx_mii_writereg;
sc->sc_mii.mii_statchg = smc91cxx_statchg;
+ sc->sc_ec.ec_mii = &sc->sc_mii;
ifmedia_init(ifm, IFM_IMASK, smc91cxx_mediachange,
smc91cxx_mediastatus);
@@ -1259,7 +1260,6 @@
{
struct smc91cxx_softc *sc = ifp->if_softc;
struct ifaddr *ifa = (struct ifaddr *)data;
- struct ifreq *ifr = (struct ifreq *)data;
int s, error = 0;
s = splnet();
@@ -1324,6 +1324,8 @@
break;
}
+ /* FALLTHROUGH */
+ default:
if ((error = ether_ioctl(ifp, cmd, data)) == ENETRESET) {
/*
* Multicast list has changed; set the hardware
@@ -1334,15 +1336,6 @@
error = 0;
}
break;
-
- case SIOCGIFMEDIA:
- case SIOCSIFMEDIA:
- error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, cmd);
- break;
-
- default:
- error = ether_ioctl(ifp, cmd, data);
- break;
}
splx(s);
Home |
Main Index |
Thread Index |
Old Index