Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src/sys/dev/ic Pull up following revision(s) (requested by th...
details: https://anonhg.NetBSD.org/src/rev/22d86303590b
branches: netbsd-9
changeset: 1002318:22d86303590b
user: martin <martin%NetBSD.org@localhost>
date: Sat Jul 03 10:18:16 2021 +0000
description:
Pull up following revision(s) (requested by thorpej in ticket #1311):
sys/dev/ic/dp8390.c: revision 1.99
sys/dev/ic/dl10019.c: revision 1.17
sys/dev/ic/ax88190.c: revision 1.18
Make sure the media / mii members in struct ethercom are initialized
so that the media-related ioctls work. Problem reported by Björn Johannesson
on current-users@.
XXX pullup-9
diffstat:
sys/dev/ic/ax88190.c | 6 ++++--
sys/dev/ic/dl10019.c | 6 ++++--
sys/dev/ic/dp8390.c | 13 +++++++++----
3 files changed, 17 insertions(+), 8 deletions(-)
diffs (95 lines):
diff -r 34075f54e30c -r 22d86303590b sys/dev/ic/ax88190.c
--- a/sys/dev/ic/ax88190.c Fri Jun 25 19:09:53 2021 +0000
+++ b/sys/dev/ic/ax88190.c Sat Jul 03 10:18:16 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ax88190.c,v 1.15 2019/05/29 06:17:28 msaitoh Exp $ */
+/* $NetBSD: ax88190.c,v 1.15.2.1 2021/07/03 10:18:16 martin Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ax88190.c,v 1.15 2019/05/29 06:17:28 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ax88190.c,v 1.15.2.1 2021/07/03 10:18:16 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -86,6 +86,8 @@
struct ifnet *ifp = &sc->sc_ec.ec_if;
struct mii_data *mii = &sc->sc_mii;
+ sc->sc_ec.ec_mii = mii;
+
mii->mii_ifp = ifp;
mii->mii_readreg = ax88190_mii_readreg;
mii->mii_writereg = ax88190_mii_writereg;
diff -r 34075f54e30c -r 22d86303590b sys/dev/ic/dl10019.c
--- a/sys/dev/ic/dl10019.c Fri Jun 25 19:09:53 2021 +0000
+++ b/sys/dev/ic/dl10019.c Sat Jul 03 10:18:16 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dl10019.c,v 1.14 2019/05/29 06:17:28 msaitoh Exp $ */
+/* $NetBSD: dl10019.c,v 1.14.2.1 2021/07/03 10:18:16 martin Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dl10019.c,v 1.14 2019/05/29 06:17:28 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dl10019.c,v 1.14.2.1 2021/07/03 10:18:16 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -119,6 +119,8 @@
struct ifnet *ifp = &sc->sc_ec.ec_if;
struct mii_data *mii = &sc->sc_mii;
+ sc->sc_ec.ec_mii = mii;
+
mii->mii_ifp = ifp;
mii->mii_readreg = dl10019_mii_readreg;
mii->mii_writereg = dl10019_mii_writereg;
diff -r 34075f54e30c -r 22d86303590b sys/dev/ic/dp8390.c
--- a/sys/dev/ic/dp8390.c Fri Jun 25 19:09:53 2021 +0000
+++ b/sys/dev/ic/dp8390.c Sat Jul 03 10:18:16 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dp8390.c,v 1.95 2019/05/29 10:07:29 msaitoh Exp $ */
+/* $NetBSD: dp8390.c,v 1.95.2.1 2021/07/03 10:18:16 martin Exp $ */
/*
* Device driver for National Semiconductor DS8390/WD83C690 based ethernet
@@ -14,7 +14,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dp8390.c,v 1.95 2019/05/29 10:07:29 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dp8390.c,v 1.95.2.1 2021/07/03 10:18:16 martin Exp $");
#include "opt_inet.h"
@@ -66,7 +66,6 @@
dp8390_media_init(struct dp8390_softc *sc)
{
- sc->sc_ec.ec_ifmedia = &sc->sc_media;
ifmedia_init(&sc->sc_media, 0, dp8390_mediachange, dp8390_mediastatus);
ifmedia_add(&sc->sc_media, IFM_ETHER | IFM_MANUAL, 0, NULL);
ifmedia_set(&sc->sc_media, IFM_ETHER | IFM_MANUAL);
@@ -131,7 +130,13 @@
aprint_normal_dev(sc->sc_dev, "Ethernet address %s\n",
ether_sprintf(sc->sc_enaddr));
- /* Initialize media goo. */
+ /*
+ * Initialize media structures. We'll default to pointing ec_ifmedia
+ * at our embedded media structure. A card front-end can initialize
+ * ec_mii if it has an MII interface. (Note that sc_media is an
+ * alias of sc_mii.mii_media in dp8390_softc.)
+ */
+ sc->sc_ec.ec_ifmedia = &sc->sc_media;
(*sc->sc_media_init)(sc);
/* We can support 802.1Q VLAN-sized frames. */
Home |
Main Index |
Thread Index |
Old Index