Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/mii Don't set DVF_DETACH_SHUTDOWN. The MII layer wa...



details:   https://anonhg.NetBSD.org/src/rev/d572e83fa88c
branches:  trunk
changeset: 970578:d572e83fa88c
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Mar 28 18:37:18 2020 +0000

description:
Don't set DVF_DETACH_SHUTDOWN.  The MII layer wants to manage the lifecycle
of the PHY devices, and if a NIC driver chooses not to detach its PHYs
at shutdown, that's the driver's business.

PR kern/55121.

diffstat:

 sys/arch/arm/amlogic/gxlphy.c |  9 ++++-----
 sys/dev/mii/brgphy.c          |  9 ++++-----
 sys/dev/mii/ihphy.c           |  9 ++++-----
 sys/dev/mii/micphy.c          |  9 ++++-----
 sys/dev/mii/nsphyter.c        |  9 ++++-----
 sys/dev/mii/ukphy.c           |  9 ++++-----
 6 files changed, 24 insertions(+), 30 deletions(-)

diffs (180 lines):

diff -r 2485e7a59605 -r d572e83fa88c sys/arch/arm/amlogic/gxlphy.c
--- a/sys/arch/arm/amlogic/gxlphy.c     Sat Mar 28 17:29:56 2020 +0000
+++ b/sys/arch/arm/amlogic/gxlphy.c     Sat Mar 28 18:37:18 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gxlphy.c,v 1.3 2020/03/15 23:04:50 thorpej Exp $ */
+/* $NetBSD: gxlphy.c,v 1.4 2020/03/28 18:37:18 thorpej Exp $ */
 
 /*
  * Copyright (c) 2019 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gxlphy.c,v 1.3 2020/03/15 23:04:50 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gxlphy.c,v 1.4 2020/03/28 18:37:18 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -70,9 +70,8 @@
 static int     gxlphymatch(device_t, cfdata_t, void *);
 static void    gxlphyattach(device_t, device_t, void *);
 
-CFATTACH_DECL3_NEW(gxlphy, sizeof(struct mii_softc),
-    gxlphymatch, gxlphyattach, mii_phy_detach, mii_phy_activate, NULL, NULL,
-    DVF_DETACH_SHUTDOWN);
+CFATTACH_DECL_NEW(gxlphy, sizeof(struct mii_softc),
+    gxlphymatch, gxlphyattach, mii_phy_detach, mii_phy_activate);
 
 static int     gxlphy_service(struct mii_softc *, struct mii_data *, int);
 static void    gxlphy_status(struct mii_softc *);
diff -r 2485e7a59605 -r d572e83fa88c sys/dev/mii/brgphy.c
--- a/sys/dev/mii/brgphy.c      Sat Mar 28 17:29:56 2020 +0000
+++ b/sys/dev/mii/brgphy.c      Sat Mar 28 18:37:18 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: brgphy.c,v 1.88 2020/03/15 23:04:50 thorpej Exp $      */
+/*     $NetBSD: brgphy.c,v 1.89 2020/03/28 18:37:18 thorpej Exp $      */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.88 2020/03/15 23:04:50 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.89 2020/03/28 18:37:18 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -96,9 +96,8 @@
        uint32_t sc_port_hwcfg; /* port specific hw config */
 };
 
-CFATTACH_DECL3_NEW(brgphy, sizeof(struct brgphy_softc),
-    brgphymatch, brgphyattach, mii_phy_detach, mii_phy_activate, NULL, NULL,
-    DVF_DETACH_SHUTDOWN);
+CFATTACH_DECL_NEW(brgphy, sizeof(struct brgphy_softc),
+    brgphymatch, brgphyattach, mii_phy_detach, mii_phy_activate);
 
 static int     brgphy_service(struct mii_softc *, struct mii_data *, int);
 static void    brgphy_copper_status(struct mii_softc *);
diff -r 2485e7a59605 -r d572e83fa88c sys/dev/mii/ihphy.c
--- a/sys/dev/mii/ihphy.c       Sat Mar 28 17:29:56 2020 +0000
+++ b/sys/dev/mii/ihphy.c       Sat Mar 28 18:37:18 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ihphy.c,v 1.17 2020/03/15 23:04:50 thorpej Exp $       */
+/*     $NetBSD: ihphy.c,v 1.18 2020/03/28 18:37:18 thorpej Exp $       */
 
 /*-
  * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ihphy.c,v 1.17 2020/03/15 23:04:50 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ihphy.c,v 1.18 2020/03/28 18:37:18 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -81,9 +81,8 @@
 static int     ihphymatch(device_t, cfdata_t, void *);
 static void    ihphyattach(device_t, device_t, void *);
 
-CFATTACH_DECL3_NEW(ihphy, sizeof(struct mii_softc),
-    ihphymatch, ihphyattach, mii_phy_detach, mii_phy_activate, NULL, NULL,
-    DVF_DETACH_SHUTDOWN);
+CFATTACH_DECL_NEW(ihphy, sizeof(struct mii_softc),
+    ihphymatch, ihphyattach, mii_phy_detach, mii_phy_activate);
 
 static int     ihphy_service(struct mii_softc *, struct mii_data *, int);
 static void    ihphy_status(struct mii_softc *);
diff -r 2485e7a59605 -r d572e83fa88c sys/dev/mii/micphy.c
--- a/sys/dev/mii/micphy.c      Sat Mar 28 17:29:56 2020 +0000
+++ b/sys/dev/mii/micphy.c      Sat Mar 28 18:37:18 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: micphy.c,v 1.13 2020/03/15 23:04:50 thorpej Exp $      */
+/*     $NetBSD: micphy.c,v 1.14 2020/03/28 18:37:18 thorpej Exp $      */
 
 /*-
  * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: micphy.c,v 1.13 2020/03/15 23:04:50 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: micphy.c,v 1.14 2020/03/28 18:37:18 thorpej Exp $");
 
 #include "opt_mii.h"
 
@@ -82,9 +82,8 @@
 static void    micphy_reset(struct mii_softc *);
 static int     micphy_service(struct mii_softc *, struct mii_data *, int);
 
-CFATTACH_DECL3_NEW(micphy, sizeof(struct mii_softc),
-    micphymatch, micphyattach, mii_phy_detach, mii_phy_activate, NULL, NULL,
-    DVF_DETACH_SHUTDOWN);
+CFATTACH_DECL_NEW(micphy, sizeof(struct mii_softc),
+    micphymatch, micphyattach, mii_phy_detach, mii_phy_activate);
 
 static int     micphy_service(struct mii_softc *, struct mii_data *, int);
 static void    micphy_status(struct mii_softc *);
diff -r 2485e7a59605 -r d572e83fa88c sys/dev/mii/nsphyter.c
--- a/sys/dev/mii/nsphyter.c    Sat Mar 28 17:29:56 2020 +0000
+++ b/sys/dev/mii/nsphyter.c    Sat Mar 28 18:37:18 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nsphyter.c,v 1.45 2020/03/15 23:04:50 thorpej Exp $    */
+/*     $NetBSD: nsphyter.c,v 1.46 2020/03/28 18:37:18 thorpej Exp $    */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nsphyter.c,v 1.45 2020/03/15 23:04:50 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nsphyter.c,v 1.46 2020/03/28 18:37:18 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -84,9 +84,8 @@
 static int     nsphytermatch(device_t, cfdata_t, void *);
 static void    nsphyterattach(device_t, device_t, void *);
 
-CFATTACH_DECL3_NEW(nsphyter, sizeof(struct mii_softc),
-    nsphytermatch, nsphyterattach, mii_phy_detach, mii_phy_activate, NULL,
-    NULL, DVF_DETACH_SHUTDOWN);
+CFATTACH_DECL_NEW(nsphyter, sizeof(struct mii_softc),
+    nsphytermatch, nsphyterattach, mii_phy_detach, mii_phy_activate);
 
 static int     nsphyter_service(struct mii_softc *, struct mii_data *, int);
 static void    nsphyter_status(struct mii_softc *);
diff -r 2485e7a59605 -r d572e83fa88c sys/dev/mii/ukphy.c
--- a/sys/dev/mii/ukphy.c       Sat Mar 28 17:29:56 2020 +0000
+++ b/sys/dev/mii/ukphy.c       Sat Mar 28 18:37:18 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ukphy.c,v 1.53 2020/03/15 23:04:50 thorpej Exp $       */
+/*     $NetBSD: ukphy.c,v 1.54 2020/03/28 18:37:18 thorpej Exp $       */
 
 /*-
  * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ukphy.c,v 1.53 2020/03/15 23:04:50 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ukphy.c,v 1.54 2020/03/28 18:37:18 thorpej Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_mii.h"
@@ -81,9 +81,8 @@
 static int     ukphymatch(device_t, cfdata_t, void *);
 static void    ukphyattach(device_t, device_t, void *);
 
-CFATTACH_DECL3_NEW(ukphy, sizeof(struct mii_softc),
-    ukphymatch, ukphyattach, mii_phy_detach, mii_phy_activate, NULL, NULL,
-    DVF_DETACH_SHUTDOWN);
+CFATTACH_DECL_NEW(ukphy, sizeof(struct mii_softc),
+    ukphymatch, ukphyattach, mii_phy_detach, mii_phy_activate);
 
 static int     ukphy_service(struct mii_softc *, struct mii_data *, int);
 



Home | Main Index | Thread Index | Old Index