svn commit: r367873 - head/sys/arm/allwinner
Emmanuel Vadot
manu at FreeBSD.org
Fri Nov 20 11:25:55 UTC 2020
Author: manu
Date: Fri Nov 20 11:25:54 2020
New Revision: 367873
URL: https://svnweb.freebsd.org/changeset/base/367873
Log:
if_awg: Remove the taskqueue for miibus_statchg
I guess it was added so we can obtain the device lock but we already
have it when the function is called.
No functional changes intended
Modified:
head/sys/arm/allwinner/if_awg.c
Modified: head/sys/arm/allwinner/if_awg.c
==============================================================================
--- head/sys/arm/allwinner/if_awg.c Fri Nov 20 10:48:19 2020 (r367872)
+++ head/sys/arm/allwinner/if_awg.c Fri Nov 20 11:25:54 2020 (r367873)
@@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$");
#include <sys/socket.h>
#include <sys/sockio.h>
#include <sys/module.h>
-#include <sys/taskqueue.h>
#include <sys/gpio.h>
#include <net/bpf.h>
@@ -199,7 +198,6 @@ struct awg_softc {
device_t dev;
device_t miibus;
struct callout stat_ch;
- struct task link_task;
void *ih;
u_int mdc_div_ratio_m;
int link;
@@ -284,11 +282,14 @@ awg_miibus_writereg(device_t dev, int phy, int reg, in
}
static void
-awg_update_link_locked(struct awg_softc *sc)
+awg_miibus_statchg(device_t dev)
{
+ struct awg_softc *sc;
struct mii_data *mii;
uint32_t val;
+ sc = device_get_softc(dev);
+
AWG_ASSERT_LOCKED(sc);
if ((if_getdrvflags(sc->ifp) & IFF_DRV_RUNNING) == 0)
@@ -346,28 +347,6 @@ awg_update_link_locked(struct awg_softc *sc)
}
static void
-awg_link_task(void *arg, int pending)
-{
- struct awg_softc *sc;
-
- sc = arg;
-
- AWG_LOCK(sc);
- awg_update_link_locked(sc);
- AWG_UNLOCK(sc);
-}
-
-static void
-awg_miibus_statchg(device_t dev)
-{
- struct awg_softc *sc;
-
- sc = device_get_softc(dev);
-
- taskqueue_enqueue(taskqueue_swi, &sc->link_task);
-}
-
-static void
awg_media_status(if_t ifp, struct ifmediareq *ifmr)
{
struct awg_softc *sc;
@@ -1873,7 +1852,6 @@ awg_attach(device_t dev)
mtx_init(&sc->mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, MTX_DEF);
callout_init_mtx(&sc->stat_ch, &sc->mtx, 0);
- TASK_INIT(&sc->link_task, 0, awg_link_task, sc);
/* Setup clocks and regulators */
error = awg_setup_extres(dev);
More information about the svn-src-all
mailing list