From df08d16d506121e048774515e86c7580a85b122c Mon Sep 17 00:00:00 2001 From: deraadt Date: Sat, 28 Dec 2013 03:34:53 +0000 Subject: [PATCH] The few network drivers that called their children's (ie. mii PHY drivers) activate functions at DVACT_RESUME time do not need to do so, since their PHYs are repaired by IFF_UP. --- sys/dev/ic/dc.c | 3 +-- sys/dev/ic/fxp.c | 3 +-- sys/dev/ic/rtl81x9.c | 3 +-- sys/dev/ic/xl.c | 3 +-- sys/dev/pci/if_alc.c | 3 +-- sys/dev/pci/if_ale.c | 3 +-- sys/dev/pci/if_bge.c | 3 +-- sys/dev/pci/if_em.c | 3 +-- sys/dev/pci/if_lii.c | 3 +-- sys/dev/pci/if_nfe.c | 3 +-- sys/dev/pci/if_se.c | 3 +-- sys/dev/pci/if_sis.c | 3 +-- sys/dev/pci/if_vr.c | 3 +-- 13 files changed, 13 insertions(+), 26 deletions(-) diff --git a/sys/dev/ic/dc.c b/sys/dev/ic/dc.c index 4c69bd04b43..e6d20896daa 100644 --- a/sys/dev/ic/dc.c +++ b/sys/dev/ic/dc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dc.c,v 1.130 2013/12/06 21:03:03 deraadt Exp $ */ +/* $OpenBSD: dc.c,v 1.131 2013/12/28 03:34:59 deraadt Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -3110,7 +3110,6 @@ dc_activate(struct device *self, int act) rv = config_activate_children(self, act); break; case DVACT_RESUME: - rv = config_activate_children(self, act); if (ifp->if_flags & IFF_UP) dc_init(sc); break; diff --git a/sys/dev/ic/fxp.c b/sys/dev/ic/fxp.c index 6c1d9965b14..183b4dbc917 100644 --- a/sys/dev/ic/fxp.c +++ b/sys/dev/ic/fxp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fxp.c,v 1.114 2013/12/06 21:03:03 deraadt Exp $ */ +/* $OpenBSD: fxp.c,v 1.115 2013/12/28 03:34:59 deraadt Exp $ */ /* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */ /* @@ -299,7 +299,6 @@ fxp_activate(struct device *self, int act) rv = config_activate_children(self, act); break; case DVACT_WAKEUP: - rv = config_activate_children(self, act); if (ifp->if_flags & IFF_UP) fxp_wakeup(sc); break; diff --git a/sys/dev/ic/rtl81x9.c b/sys/dev/ic/rtl81x9.c index 0f1b8420316..7557c6174df 100644 --- a/sys/dev/ic/rtl81x9.c +++ b/sys/dev/ic/rtl81x9.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtl81x9.c,v 1.80 2013/12/06 21:03:03 deraadt Exp $ */ +/* $OpenBSD: rtl81x9.c,v 1.81 2013/12/28 03:35:00 deraadt Exp $ */ /* * Copyright (c) 1997, 1998 @@ -1246,7 +1246,6 @@ rl_activate(struct device *self, int act) rv = config_activate_children(self, act); break; case DVACT_RESUME: - rv = config_activate_children(self, act); if (ifp->if_flags & IFF_UP) rl_init(sc); break; diff --git a/sys/dev/ic/xl.c b/sys/dev/ic/xl.c index de8d9b42cde..e3863d7a580 100644 --- a/sys/dev/ic/xl.c +++ b/sys/dev/ic/xl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xl.c,v 1.111 2013/12/06 21:03:03 deraadt Exp $ */ +/* $OpenBSD: xl.c,v 1.112 2013/12/28 03:35:01 deraadt Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -212,7 +212,6 @@ xl_activate(struct device *self, int act) break; case DVACT_RESUME: xl_reset(sc); - rv = config_activate_children(self, act); if (ifp->if_flags & IFF_UP) xl_init(sc); break; diff --git a/sys/dev/pci/if_alc.c b/sys/dev/pci/if_alc.c index 6fcd6363dd3..efb1c17afce 100644 --- a/sys/dev/pci/if_alc.c +++ b/sys/dev/pci/if_alc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_alc.c,v 1.25 2013/12/06 21:03:03 deraadt Exp $ */ +/* $OpenBSD: if_alc.c,v 1.26 2013/12/28 03:34:53 deraadt Exp $ */ /*- * Copyright (c) 2009, Pyun YongHyeon * All rights reserved. @@ -939,7 +939,6 @@ alc_activate(struct device *self, int act) rv = config_activate_children(self, act); break; case DVACT_RESUME: - rv = config_activate_children(self, act); if (ifp->if_flags & IFF_UP) alc_init(ifp); break; diff --git a/sys/dev/pci/if_ale.c b/sys/dev/pci/if_ale.c index 8fc86777566..748410ccc85 100644 --- a/sys/dev/pci/if_ale.c +++ b/sys/dev/pci/if_ale.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ale.c,v 1.29 2013/12/06 21:03:03 deraadt Exp $ */ +/* $OpenBSD: if_ale.c,v 1.30 2013/12/28 03:34:54 deraadt Exp $ */ /*- * Copyright (c) 2008, Pyun YongHyeon * All rights reserved. @@ -604,7 +604,6 @@ ale_activate(struct device *self, int act) rv = config_activate_children(self, act); break; case DVACT_RESUME: - rv = config_activate_children(self, act); if (ifp->if_flags & IFF_UP) ale_init(ifp); break; diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c index 9ede5ac40d8..199f30f2356 100644 --- a/sys/dev/pci/if_bge.c +++ b/sys/dev/pci/if_bge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bge.c,v 1.344 2013/12/22 20:39:23 kettenis Exp $ */ +/* $OpenBSD: if_bge.c,v 1.345 2013/12/28 03:34:54 deraadt Exp $ */ /* * Copyright (c) 2001 Wind River Systems @@ -3051,7 +3051,6 @@ bge_activate(struct device *self, int act) case DVACT_RESUME: if (ifp->if_flags & IFF_UP) bge_init(sc); - rv = config_activate_children(self, act); break; default: rv = config_activate_children(self, act); diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c index a1514417db4..5ebaaaa1a2c 100644 --- a/sys/dev/pci/if_em.c +++ b/sys/dev/pci/if_em.c @@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ -/* $OpenBSD: if_em.c,v 1.274 2013/12/06 21:03:04 deraadt Exp $ */ +/* $OpenBSD: if_em.c,v 1.275 2013/12/28 03:34:54 deraadt Exp $ */ /* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */ #include @@ -1921,7 +1921,6 @@ em_activate(struct device *self, int act) rv = config_activate_children(self, act); break; case DVACT_RESUME: - rv = config_activate_children(self, act); if (ifp->if_flags & IFF_UP) em_init(sc); break; diff --git a/sys/dev/pci/if_lii.c b/sys/dev/pci/if_lii.c index 311f9d8e89b..8ef621796d9 100644 --- a/sys/dev/pci/if_lii.c +++ b/sys/dev/pci/if_lii.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_lii.c,v 1.31 2013/12/06 21:03:04 deraadt Exp $ */ +/* $OpenBSD: if_lii.c,v 1.32 2013/12/28 03:34:54 deraadt Exp $ */ /* * Copyright (c) 2007 The NetBSD Foundation. @@ -299,7 +299,6 @@ lii_activate(struct device *self, int act) rv = config_activate_children(self, act); break; case DVACT_RESUME: - rv = config_activate_children(self, act); if (ifp->if_flags & IFF_UP) lii_init(ifp); break; diff --git a/sys/dev/pci/if_nfe.c b/sys/dev/pci/if_nfe.c index aa77349fd03..40a33a0af11 100644 --- a/sys/dev/pci/if_nfe.c +++ b/sys/dev/pci/if_nfe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_nfe.c,v 1.103 2013/12/06 21:03:04 deraadt Exp $ */ +/* $OpenBSD: if_nfe.c,v 1.104 2013/12/28 03:34:54 deraadt Exp $ */ /*- * Copyright (c) 2006, 2007 Damien Bergamini @@ -189,7 +189,6 @@ nfe_activate(struct device *self, int act) rv = config_activate_children(self, act); break; case DVACT_RESUME: - rv = config_activate_children(self, act); if (ifp->if_flags & IFF_UP) nfe_init(ifp); break; diff --git a/sys/dev/pci/if_se.c b/sys/dev/pci/if_se.c index 660fdaa7f24..31dd95617e9 100644 --- a/sys/dev/pci/if_se.c +++ b/sys/dev/pci/if_se.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_se.c,v 1.8 2013/12/06 21:03:04 deraadt Exp $ */ +/* $OpenBSD: if_se.c,v 1.9 2013/12/28 03:34:54 deraadt Exp $ */ /*- * Copyright (c) 2009, 2010 Christopher Zimmermann @@ -748,7 +748,6 @@ se_activate(struct device *self, int act) rv = config_activate_children(self, act); break; case DVACT_RESUME: - rv = config_activate_children(self, act); if (ifp->if_flags & IFF_UP) (void)se_init(ifp); break; diff --git a/sys/dev/pci/if_sis.c b/sys/dev/pci/if_sis.c index 6674734ca51..6588ebade1e 100644 --- a/sys/dev/pci/if_sis.c +++ b/sys/dev/pci/if_sis.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sis.c,v 1.114 2013/12/06 21:03:04 deraadt Exp $ */ +/* $OpenBSD: if_sis.c,v 1.115 2013/12/28 03:34:54 deraadt Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. @@ -1217,7 +1217,6 @@ sis_activate(struct device *self, int act) rv = config_activate_children(self, act); break; case DVACT_RESUME: - rv = config_activate_children(self, act); if (ifp->if_flags & IFF_UP) sis_init(sc); break; diff --git a/sys/dev/pci/if_vr.c b/sys/dev/pci/if_vr.c index 075563a75f2..b2ed7661bfb 100644 --- a/sys/dev/pci/if_vr.c +++ b/sys/dev/pci/if_vr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vr.c,v 1.131 2013/12/06 21:03:04 deraadt Exp $ */ +/* $OpenBSD: if_vr.c,v 1.132 2013/12/28 03:34:54 deraadt Exp $ */ /* * Copyright (c) 1997, 1998 @@ -705,7 +705,6 @@ vr_activate(struct device *self, int act) rv = config_activate_children(self, act); break; case DVACT_RESUME: - rv = config_activate_children(self, act); if (ifp->if_flags & IFF_UP) vr_init(sc); break; -- 2.20.1