diff options
author | jhb <jhb@FreeBSD.org> | 2002-04-04 21:03:38 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2002-04-04 21:03:38 +0000 |
commit | db9aa81e239bb1c46b3b7ba560474cd954b78bf3 (patch) | |
tree | f7344c6a10fdc020dd02fe2ee1f244cb56f92bb6 /sys/pci | |
parent | 5b964d2945fa9a17daef9bc1e6dbbcb4f7154379 (diff) | |
download | FreeBSD-src-db9aa81e239bb1c46b3b7ba560474cd954b78bf3.zip FreeBSD-src-db9aa81e239bb1c46b3b7ba560474cd954b78bf3.tar.gz |
Change callers of mtx_init() to pass in an appropriate lock type name. In
most cases NULL is passed, but in some cases such as network driver locks
(which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used.
Tested on: i386, alpha, sparc64
Diffstat (limited to 'sys/pci')
-rw-r--r-- | sys/pci/if_dc.c | 3 | ||||
-rw-r--r-- | sys/pci/if_pcn.c | 6 | ||||
-rw-r--r-- | sys/pci/if_rl.c | 3 | ||||
-rw-r--r-- | sys/pci/if_sf.c | 3 | ||||
-rw-r--r-- | sys/pci/if_sis.c | 3 | ||||
-rw-r--r-- | sys/pci/if_sk.c | 3 | ||||
-rw-r--r-- | sys/pci/if_ste.c | 3 | ||||
-rw-r--r-- | sys/pci/if_ti.c | 3 | ||||
-rw-r--r-- | sys/pci/if_tl.c | 3 | ||||
-rw-r--r-- | sys/pci/if_vr.c | 3 | ||||
-rw-r--r-- | sys/pci/if_wb.c | 3 | ||||
-rw-r--r-- | sys/pci/if_xl.c | 3 |
12 files changed, 26 insertions, 13 deletions
diff --git a/sys/pci/if_dc.c b/sys/pci/if_dc.c index fa8cd2e..540e8a6 100644 --- a/sys/pci/if_dc.c +++ b/sys/pci/if_dc.c @@ -1781,7 +1781,8 @@ static int dc_attach(dev) unit = device_get_unit(dev); bzero(sc, sizeof(struct dc_softc)); - mtx_init(&sc->dc_mtx, device_get_nameunit(dev), MTX_DEF | MTX_RECURSE); + mtx_init(&sc->dc_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, + MTX_DEF | MTX_RECURSE); DC_LOCK(sc); /* diff --git a/sys/pci/if_pcn.c b/sys/pci/if_pcn.c index c1f42e2..f027900 100644 --- a/sys/pci/if_pcn.c +++ b/sys/pci/if_pcn.c @@ -416,7 +416,8 @@ static int pcn_probe(dev) sc->pcn_btag = rman_get_bustag(sc->pcn_res); sc->pcn_bhandle = rman_get_bushandle(sc->pcn_res); mtx_init(&sc->pcn_mtx, - device_get_nameunit(dev), MTX_DEF); + device_get_nameunit(dev), MTX_NETWORK_LOCK, + MTX_DEF); PCN_LOCK(sc); /* * Note: we can *NOT* put the chip into @@ -504,7 +505,8 @@ static int pcn_attach(dev) unit = device_get_unit(dev); /* Initialize our mutex. */ - mtx_init(&sc->pcn_mtx, device_get_nameunit(dev), MTX_DEF | MTX_RECURSE); + mtx_init(&sc->pcn_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, + MTX_DEF | MTX_RECURSE); PCN_LOCK(sc); /* diff --git a/sys/pci/if_rl.c b/sys/pci/if_rl.c index aec9420..b912571 100644 --- a/sys/pci/if_rl.c +++ b/sys/pci/if_rl.c @@ -835,7 +835,8 @@ static int rl_attach(dev) unit = device_get_unit(dev); bzero(sc, sizeof(struct rl_softc)); - mtx_init(&sc->rl_mtx, device_get_nameunit(dev), MTX_DEF | MTX_RECURSE); + mtx_init(&sc->rl_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, + MTX_DEF | MTX_RECURSE); RL_LOCK(sc); /* diff --git a/sys/pci/if_sf.c b/sys/pci/if_sf.c index 771e69e..6322a3b 100644 --- a/sys/pci/if_sf.c +++ b/sys/pci/if_sf.c @@ -671,7 +671,8 @@ static int sf_attach(dev) unit = device_get_unit(dev); bzero(sc, sizeof(struct sf_softc)); - mtx_init(&sc->sf_mtx, device_get_nameunit(dev), MTX_DEF | MTX_RECURSE); + mtx_init(&sc->sf_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, + MTX_DEF | MTX_RECURSE); SF_LOCK(sc); /* * Handle power management nonsense. diff --git a/sys/pci/if_sis.c b/sys/pci/if_sis.c index 333210c..22a2163 100644 --- a/sys/pci/if_sis.c +++ b/sys/pci/if_sis.c @@ -799,7 +799,8 @@ static int sis_attach(dev) unit = device_get_unit(dev); bzero(sc, sizeof(struct sis_softc)); - mtx_init(&sc->sis_mtx, device_get_nameunit(dev), MTX_DEF | MTX_RECURSE); + mtx_init(&sc->sis_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, + MTX_DEF | MTX_RECURSE); SIS_LOCK(sc); if (pci_get_device(dev) == SIS_DEVICEID_900) diff --git a/sys/pci/if_sk.c b/sys/pci/if_sk.c index 6c39da2..3a6cb4f 100644 --- a/sys/pci/if_sk.c +++ b/sys/pci/if_sk.c @@ -1183,7 +1183,8 @@ static int sk_attach(dev) unit = device_get_unit(dev); bzero(sc, sizeof(struct sk_softc)); - mtx_init(&sc->sk_mtx, device_get_nameunit(dev), MTX_DEF | MTX_RECURSE); + mtx_init(&sc->sk_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, + MTX_DEF | MTX_RECURSE); SK_LOCK(sc); /* diff --git a/sys/pci/if_ste.c b/sys/pci/if_ste.c index 0473ca8..6b65dcf 100644 --- a/sys/pci/if_ste.c +++ b/sys/pci/if_ste.c @@ -914,7 +914,8 @@ static int ste_attach(dev) unit = device_get_unit(dev); bzero(sc, sizeof(struct ste_softc)); - mtx_init(&sc->ste_mtx, device_get_nameunit(dev), MTX_DEF | MTX_RECURSE); + mtx_init(&sc->ste_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, + MTX_DEF | MTX_RECURSE); STE_LOCK(sc); /* diff --git a/sys/pci/if_ti.c b/sys/pci/if_ti.c index 7926105..17f5a00 100644 --- a/sys/pci/if_ti.c +++ b/sys/pci/if_ti.c @@ -1454,7 +1454,8 @@ static int ti_attach(dev) unit = device_get_unit(dev); bzero(sc, sizeof(struct ti_softc)); - mtx_init(&sc->ti_mtx, device_get_nameunit(dev), MTX_DEF | MTX_RECURSE); + mtx_init(&sc->ti_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, + MTX_DEF | MTX_RECURSE); TI_LOCK(sc); sc->arpcom.ac_if.if_capabilities = IFCAP_HWCSUM; sc->arpcom.ac_if.if_capenable = sc->arpcom.ac_if.if_capabilities; diff --git a/sys/pci/if_tl.c b/sys/pci/if_tl.c index 7d19023..1c52f9a 100644 --- a/sys/pci/if_tl.c +++ b/sys/pci/if_tl.c @@ -1122,7 +1122,8 @@ static int tl_attach(dev) goto fail; } - mtx_init(&sc->tl_mtx, device_get_nameunit(dev), MTX_DEF | MTX_RECURSE); + mtx_init(&sc->tl_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, + MTX_DEF | MTX_RECURSE); TL_LOCK(sc); /* diff --git a/sys/pci/if_vr.c b/sys/pci/if_vr.c index 33a6897..5c15aae 100644 --- a/sys/pci/if_vr.c +++ b/sys/pci/if_vr.c @@ -642,7 +642,8 @@ static int vr_attach(dev) unit = device_get_unit(dev); bzero(sc, sizeof(struct vr_softc *)); - mtx_init(&sc->vr_mtx, device_get_nameunit(dev), MTX_DEF | MTX_RECURSE); + mtx_init(&sc->vr_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, + MTX_DEF | MTX_RECURSE); VR_LOCK(sc); /* diff --git a/sys/pci/if_wb.c b/sys/pci/if_wb.c index 6f104b6..8647e32 100644 --- a/sys/pci/if_wb.c +++ b/sys/pci/if_wb.c @@ -814,7 +814,8 @@ static int wb_attach(dev) sc = device_get_softc(dev); unit = device_get_unit(dev); - mtx_init(&sc->wb_mtx, device_get_nameunit(dev), MTX_DEF | MTX_RECURSE); + mtx_init(&sc->wb_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, + MTX_DEF | MTX_RECURSE); WB_LOCK(sc); /* diff --git a/sys/pci/if_xl.c b/sys/pci/if_xl.c index 6a7f6c6..782361c 100644 --- a/sys/pci/if_xl.c +++ b/sys/pci/if_xl.c @@ -1255,7 +1255,8 @@ static int xl_attach(dev) sc = device_get_softc(dev); unit = device_get_unit(dev); - mtx_init(&sc->xl_mtx, device_get_nameunit(dev), MTX_DEF | MTX_RECURSE); + mtx_init(&sc->xl_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, + MTX_DEF | MTX_RECURSE); XL_LOCK(sc); sc->xl_flags = 0; |