Module Name:    src
Committed By:   thorpej
Date:           Sat Mar 28 18:37:18 UTC 2020

Modified Files:
        src/sys/arch/arm/amlogic: gxlphy.c
        src/sys/dev/mii: brgphy.c ihphy.c micphy.c nsphyter.c ukphy.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/amlogic/gxlphy.c
cvs rdiff -u -r1.88 -r1.89 src/sys/dev/mii/brgphy.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/mii/ihphy.c
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/mii/micphy.c
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/mii/nsphyter.c
cvs rdiff -u -r1.53 -r1.54 src/sys/dev/mii/ukphy.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/amlogic/gxlphy.c
diff -u src/sys/arch/arm/amlogic/gxlphy.c:1.3 src/sys/arch/arm/amlogic/gxlphy.c:1.4
--- src/sys/arch/arm/amlogic/gxlphy.c:1.3	Sun Mar 15 23:04:50 2020
+++ src/sys/arch/arm/amlogic/gxlphy.c	Sat Mar 28 18:37:18 2020
@@ -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 <[email protected]>
@@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: gxlphy.c,v 1
 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 *);

Index: src/sys/dev/mii/brgphy.c
diff -u src/sys/dev/mii/brgphy.c:1.88 src/sys/dev/mii/brgphy.c:1.89
--- src/sys/dev/mii/brgphy.c:1.88	Sun Mar 15 23:04:50 2020
+++ src/sys/dev/mii/brgphy.c	Sat Mar 28 18:37:18 2020
@@ -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 @@ struct brgphy_softc {
 	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 *);

Index: src/sys/dev/mii/ihphy.c
diff -u src/sys/dev/mii/ihphy.c:1.17 src/sys/dev/mii/ihphy.c:1.18
--- src/sys/dev/mii/ihphy.c:1.17	Sun Mar 15 23:04:50 2020
+++ src/sys/dev/mii/ihphy.c	Sat Mar 28 18:37:18 2020
@@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: ihphy.c,v 1.
 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 *);

Index: src/sys/dev/mii/micphy.c
diff -u src/sys/dev/mii/micphy.c:1.13 src/sys/dev/mii/micphy.c:1.14
--- src/sys/dev/mii/micphy.c:1.13	Sun Mar 15 23:04:50 2020
+++ src/sys/dev/mii/micphy.c	Sat Mar 28 18:37:18 2020
@@ -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	micphyattach(device_t, devic
 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 *);

Index: src/sys/dev/mii/nsphyter.c
diff -u src/sys/dev/mii/nsphyter.c:1.45 src/sys/dev/mii/nsphyter.c:1.46
--- src/sys/dev/mii/nsphyter.c:1.45	Sun Mar 15 23:04:50 2020
+++ src/sys/dev/mii/nsphyter.c	Sat Mar 28 18:37:18 2020
@@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: nsphyter.c,v
 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 *);

Index: src/sys/dev/mii/ukphy.c
diff -u src/sys/dev/mii/ukphy.c:1.53 src/sys/dev/mii/ukphy.c:1.54
--- src/sys/dev/mii/ukphy.c:1.53	Sun Mar 15 23:04:50 2020
+++ src/sys/dev/mii/ukphy.c	Sat Mar 28 18:37:18 2020
@@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: ukphy.c,v 1.
 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);
 

Reply via email to