Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Apply deferred if_start to more drivers
details: https://anonhg.NetBSD.org/src/rev/1c129aac7ba5
branches: trunk
changeset: 351626:1c129aac7ba5
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Mon Feb 20 07:43:29 2017 +0000
description:
Apply deferred if_start to more drivers
diffstat:
sys/dev/ic/dwc_gmac.c | 7 ++++---
sys/dev/ic/elinkxl.c | 9 +++++----
sys/dev/ic/gem.c | 7 ++++---
sys/dev/ic/hd64570.c | 7 ++++---
sys/dev/ic/i82557.c | 7 ++++---
sys/dev/ic/i82586.c | 7 ++++---
sys/dev/ic/i82596.c | 7 ++++---
sys/dev/ic/lan9118.c | 8 ++++----
sys/dev/ic/mb86950.c | 7 ++++---
sys/dev/ic/rtl81x9.c | 8 ++++----
sys/dev/ic/smc83c170.c | 7 ++++---
11 files changed, 45 insertions(+), 36 deletions(-)
diffs (truncated from 389 to 300 lines):
diff -r 4b2392e438e5 -r 1c129aac7ba5 sys/dev/ic/dwc_gmac.c
--- a/sys/dev/ic/dwc_gmac.c Mon Feb 20 06:48:49 2017 +0000
+++ b/sys/dev/ic/dwc_gmac.c Mon Feb 20 07:43:29 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc_gmac.c,v 1.39 2017/01/23 08:36:23 skrll Exp $ */
+/* $NetBSD: dwc_gmac.c,v 1.40 2017/02/20 07:43:29 ozaki-r Exp $ */
/*-
* Copyright (c) 2013, 2014 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.39 2017/01/23 08:36:23 skrll Exp $");
+__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.40 2017/02/20 07:43:29 ozaki-r Exp $");
/* #define DWC_GMAC_DEBUG 1 */
@@ -261,6 +261,7 @@
/* Attach the interface. */
if_initialize(ifp);
sc->sc_ipq = if_percpuq_create(&sc->sc_ec.ec_if);
+ if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, enaddr);
ether_set_ifflags_cb(&sc->sc_ec, dwc_gmac_ifflags_cb);
if_register(ifp);
@@ -1368,7 +1369,7 @@
* Get more packets
*/
if (rv)
- sc->sc_ec.ec_if.if_start(&sc->sc_ec.ec_if);
+ if_schedule_deferred_start(&sc->sc_ec.ec_if);
return rv;
}
diff -r 4b2392e438e5 -r 1c129aac7ba5 sys/dev/ic/elinkxl.c
--- a/sys/dev/ic/elinkxl.c Mon Feb 20 06:48:49 2017 +0000
+++ b/sys/dev/ic/elinkxl.c Mon Feb 20 07:43:29 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: elinkxl.c,v 1.120 2016/12/15 09:28:05 ozaki-r Exp $ */
+/* $NetBSD: elinkxl.c,v 1.121 2017/02/20 07:43:29 ozaki-r Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: elinkxl.c,v 1.120 2016/12/15 09:28:05 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: elinkxl.c,v 1.121 2017/02/20 07:43:29 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -426,6 +426,7 @@
IFCAP_CSUM_UDPv4_Tx | IFCAP_CSUM_UDPv4_Rx;
if_attach(ifp);
+ if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, macaddr);
ether_set_ifflags_cb(&sc->sc_ethercom, ex_ifflags_cb);
@@ -1418,8 +1419,8 @@
}
/* no more interrupts */
- if (ret && IFQ_IS_EMPTY(&ifp->if_snd) == 0)
- ex_start(ifp);
+ if (ret)
+ if_schedule_deferred_start(ifp);
return ret;
}
diff -r 4b2392e438e5 -r 1c129aac7ba5 sys/dev/ic/gem.c
--- a/sys/dev/ic/gem.c Mon Feb 20 06:48:49 2017 +0000
+++ b/sys/dev/ic/gem.c Mon Feb 20 07:43:29 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gem.c,v 1.107 2016/12/15 09:28:05 ozaki-r Exp $ */
+/* $NetBSD: gem.c,v 1.108 2017/02/20 07:43:29 ozaki-r Exp $ */
/*
*
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.107 2016/12/15 09:28:05 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.108 2017/02/20 07:43:29 ozaki-r Exp $");
#include "opt_inet.h"
@@ -577,6 +577,7 @@
/* Attach the interface. */
if_attach(ifp);
+ if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, enaddr);
ether_set_ifflags_cb(&sc->sc_ethercom, gem_ifflags_cb);
@@ -1740,7 +1741,7 @@
ifp->if_flags &= ~IFF_OACTIVE;
sc->sc_if_flags = ifp->if_flags;
ifp->if_timer = SIMPLEQ_EMPTY(&sc->sc_txdirtyq) ? 0 : 5;
- gem_start(ifp);
+ if_schedule_deferred_start(ifp);
}
DPRINTF(sc, ("%s: gem_tint: watchdog %d\n",
device_xname(sc->sc_dev), ifp->if_timer));
diff -r 4b2392e438e5 -r 1c129aac7ba5 sys/dev/ic/hd64570.c
--- a/sys/dev/ic/hd64570.c Mon Feb 20 06:48:49 2017 +0000
+++ b/sys/dev/ic/hd64570.c Mon Feb 20 07:43:29 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hd64570.c,v 1.52 2017/01/24 09:05:28 ozaki-r Exp $ */
+/* $NetBSD: hd64570.c,v 1.53 2017/02/20 07:43:29 ozaki-r Exp $ */
/*
* Copyright (c) 1999 Christian E. Hopps
@@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hd64570.c,v 1.52 2017/01/24 09:05:28 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hd64570.c,v 1.53 2017/02/20 07:43:29 ozaki-r Exp $");
#include "opt_inet.h"
@@ -455,6 +455,7 @@
#endif
IFQ_SET_READY(&ifp->if_snd);
if_attach(ifp);
+ if_deferred_start_init(ifp, NULL);
if_alloc_sadl(ifp);
bpf_attach(ifp, DLT_HDLC, HDLC_HDRLEN);
bpf_mtap_softint_init(ifp);
@@ -1304,7 +1305,7 @@
/*
* check for more packets
*/
- sca_start(&scp->sp_if);
+ if_schedule_deferred_start(&scp->sp_if);
}
}
}
diff -r 4b2392e438e5 -r 1c129aac7ba5 sys/dev/ic/i82557.c
--- a/sys/dev/ic/i82557.c Mon Feb 20 06:48:49 2017 +0000
+++ b/sys/dev/ic/i82557.c Mon Feb 20 07:43:29 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i82557.c,v 1.146 2016/12/15 09:28:05 ozaki-r Exp $ */
+/* $NetBSD: i82557.c,v 1.147 2017/02/20 07:43:29 ozaki-r Exp $ */
/*-
* Copyright (c) 1997, 1998, 1999, 2001, 2002 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i82557.c,v 1.146 2016/12/15 09:28:05 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i82557.c,v 1.147 2017/02/20 07:43:29 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -407,6 +407,7 @@
* Attach the interface.
*/
if_attach(ifp);
+ if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, enaddr);
rnd_attach_source(&sc->rnd_source, device_xname(sc->sc_dev),
RND_TYPE_NET, RND_FLAG_DEFAULT);
@@ -1120,7 +1121,7 @@
/*
* Try to get more packets going.
*/
- fxp_start(ifp);
+ if_schedule_deferred_start(ifp);
if (sc->sc_txpending == 0) {
/*
diff -r 4b2392e438e5 -r 1c129aac7ba5 sys/dev/ic/i82586.c
--- a/sys/dev/ic/i82586.c Mon Feb 20 06:48:49 2017 +0000
+++ b/sys/dev/ic/i82586.c Mon Feb 20 07:43:29 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i82586.c,v 1.75 2016/12/15 09:28:05 ozaki-r Exp $ */
+/* $NetBSD: i82586.c,v 1.76 2017/02/20 07:43:29 ozaki-r Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -137,7 +137,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i82586.c,v 1.75 2016/12/15 09:28:05 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i82586.c,v 1.76 2017/02/20 07:43:29 ozaki-r Exp $");
#include <sys/param.h>
@@ -271,6 +271,7 @@
/* Attach the interface. */
if_attach(ifp);
+ if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, etheraddr);
aprint_normal(" address %s, type %s\n", ether_sprintf(etheraddr),name);
@@ -736,7 +737,7 @@
if (sc->xmit_busy > 0)
iexmit(sc);
- i82586_start(ifp);
+ if_schedule_deferred_start(ifp);
return (0);
}
diff -r 4b2392e438e5 -r 1c129aac7ba5 sys/dev/ic/i82596.c
--- a/sys/dev/ic/i82596.c Mon Feb 20 06:48:49 2017 +0000
+++ b/sys/dev/ic/i82596.c Mon Feb 20 07:43:29 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i82596.c,v 1.35 2016/12/15 09:28:05 ozaki-r Exp $ */
+/* $NetBSD: i82596.c,v 1.36 2017/02/20 07:43:29 ozaki-r Exp $ */
/*
* Copyright (c) 2003 Jochen Kunz.
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i82596.c,v 1.35 2016/12/15 09:28:05 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i82596.c,v 1.36 2017/02/20 07:43:29 ozaki-r Exp $");
/* autoconfig and device stuff */
#include <sys/param.h>
@@ -383,7 +383,7 @@
(sc->sc_iee_cmd)(sc, IEE_SCB_CUC_EXE);
} else
/* Try to get deferred packets going. */
- iee_start(ifp);
+ if_schedule_deferred_start(ifp);
}
}
if (IEE_SWAP32(SC_SCB(sc)->scb_crc_err) != sc->sc_crc_err) {
@@ -663,6 +663,7 @@
sc->sc_ethercom.ec_capabilities |= ETHERCAP_VLAN_MTU;
if_attach(ifp);
+ if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, eth_addr);
aprint_normal(": Intel 82596%s address %s\n",
diff -r 4b2392e438e5 -r 1c129aac7ba5 sys/dev/ic/lan9118.c
--- a/sys/dev/ic/lan9118.c Mon Feb 20 06:48:49 2017 +0000
+++ b/sys/dev/ic/lan9118.c Mon Feb 20 07:43:29 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lan9118.c,v 1.23 2016/12/15 09:28:05 ozaki-r Exp $ */
+/* $NetBSD: lan9118.c,v 1.24 2017/02/20 07:43:29 ozaki-r Exp $ */
/*
* Copyright (c) 2008 KIYOHARA Takashi
* All rights reserved.
@@ -25,7 +25,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lan9118.c,v 1.23 2016/12/15 09:28:05 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lan9118.c,v 1.24 2017/02/20 07:43:29 ozaki-r Exp $");
/*
* The LAN9118 Family
@@ -274,6 +274,7 @@
/* Attach the interface. */
if_attach(ifp);
+ if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, sc->sc_enaddr);
callout_init(&sc->sc_tick, 0);
@@ -332,8 +333,7 @@
lan9118_rxintr(sc);
}
- if (!IFQ_IS_EMPTY(&ifp->if_snd))
- lan9118_start(ifp);
+ if_schedule_deferred_start(ifp);
rnd_add_uint32(&sc->rnd_source, datum);
diff -r 4b2392e438e5 -r 1c129aac7ba5 sys/dev/ic/mb86950.c
--- a/sys/dev/ic/mb86950.c Mon Feb 20 06:48:49 2017 +0000
+++ b/sys/dev/ic/mb86950.c Mon Feb 20 07:43:29 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mb86950.c,v 1.25 2016/12/15 09:28:05 ozaki-r Exp $ */
+/* $NetBSD: mb86950.c,v 1.26 2017/02/20 07:43:29 ozaki-r Exp $ */
/*
* All Rights Reserved, Copyright (C) Fujitsu Limited 1995
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mb86950.c,v 1.25 2016/12/15 09:28:05 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mb86950.c,v 1.26 2017/02/20 07:43:29 ozaki-r Exp $");
/*
Home |
Main Index |
Thread Index |
Old Index