PERFORCE change 63476 for review
John Baldwin
jhb at FreeBSD.org
Thu Oct 21 09:03:47 PDT 2004
http://perforce.freebsd.org/chv.cgi?CH=63476
Change 63476 by jhb at jhb_slimer on 2004/10/21 16:03:32
Remove Giant assertions.
Affected files ...
.. //depot/projects/smpng/sys/pci/if_de.c#22 edit
Differences ...
==== //depot/projects/smpng/sys/pci/if_de.c#22 (text+ko) ====
@@ -145,7 +145,6 @@
tulip_softc_t * const sc = arg;
int s = splimp();
- mtx_assert(&Giant, MA_OWNED);
TULIP_PERFSTART(timeout)
sc->tulip_flags &= ~TULIP_TIMEOUTPENDING;
@@ -160,7 +159,6 @@
tulip_timeout(
tulip_softc_t * const sc)
{
- mtx_assert(&Giant, MA_OWNED);
if (sc->tulip_flags & TULIP_TIMEOUTPENDING)
return;
sc->tulip_flags |= TULIP_TIMEOUTPENDING;
@@ -175,7 +173,6 @@
tulip_softc_t * const sc = arg;
int s = splimp();
- mtx_assert(&Giant, MA_OWNED);
sc->tulip_flags &= ~TULIP_FASTTIMEOUTPENDING;
(sc->tulip_boardsw->bd_media_poll)(sc, TULIP_MEDIAPOLL_FASTTIMER);
splx(s);
@@ -185,7 +182,6 @@
tulip_fasttimeout(
tulip_softc_t * const sc)
{
- mtx_assert(&Giant, MA_OWNED);
if (sc->tulip_flags & TULIP_FASTTIMEOUTPENDING)
return;
sc->tulip_flags |= TULIP_FASTTIMEOUTPENDING;
@@ -198,8 +194,6 @@
tulip_softc_t * const sc)
{
struct mbuf *m;
-
- mtx_assert(&Giant, MA_OWNED);
/*
* Before we are sure this is the right media we need
* to send a small packet to make sure there's carrier.
@@ -247,7 +241,6 @@
{
const tulip_media_info_t *mi = sc->tulip_mediums[media];
- mtx_assert(&Giant, MA_OWNED);
if (mi == NULL)
return;
@@ -340,8 +333,6 @@
tulip_softc_t * const sc,
tulip_media_t media)
{
-
- mtx_assert(&Giant, MA_OWNED);
if ((sc->tulip_flags & TULIP_LINKUP) == 0)
sc->tulip_flags |= TULIP_PRINTLINKUP;
sc->tulip_flags |= TULIP_LINKUP;
@@ -395,8 +386,6 @@
tulip_media_print(
tulip_softc_t * const sc)
{
-
- mtx_assert(&Giant, MA_OWNED);
if ((sc->tulip_flags & TULIP_LINKUP) == 0)
return;
if (sc->tulip_flags & TULIP_PRINTMEDIA) {
@@ -419,7 +408,6 @@
tulip_media_t last_media = TULIP_MEDIA_UNKNOWN;
tulip_media_t media;
- mtx_assert(&Giant, MA_OWNED);
/*
* If one of the media blocks contained a default media flag,
* use that.
@@ -491,7 +479,6 @@
}
- mtx_assert(&Giant, MA_OWNED);
/*
* Have we seen some packets? If so, the link must be good.
*/
@@ -590,7 +577,6 @@
tulip_softc_t * const sc,
tulip_mediapoll_event_t event)
{
- mtx_assert(&Giant, MA_OWNED);
#if defined(TULIP_DEBUG)
sc->tulip_dbg.dbg_events[event]++;
#endif
@@ -880,7 +866,6 @@
tulip_media_select(
tulip_softc_t * const sc)
{
- mtx_assert(&Giant, MA_OWNED);
if (sc->tulip_features & TULIP_HAVE_GPR) {
TULIP_CSR_WRITE(sc, csr_gp, TULIP_GP_PINSET|sc->tulip_gpinit);
DELAY(10);
@@ -905,7 +890,6 @@
tulip_softc_t * const sc,
tulip_media_t media)
{
- mtx_assert(&Giant, MA_OWNED);
sc->tulip_cmdmode |= TULIP_CMD_CAPTREFFCT|TULIP_CMD_THRSHLD160
|TULIP_CMD_BACKOFFCTR;
sc->tulip_if.if_baudrate = 10000000;
@@ -929,7 +913,6 @@
tulip_21040_media_probe(
tulip_softc_t * const sc)
{
- mtx_assert(&Giant, MA_OWNED);
tulip_21040_mediainfo_init(sc, TULIP_MEDIA_UNKNOWN);
return;
}
@@ -938,7 +921,6 @@
tulip_21040_10baset_only_media_probe(
tulip_softc_t * const sc)
{
- mtx_assert(&Giant, MA_OWNED);
tulip_21040_mediainfo_init(sc, TULIP_MEDIA_10BASET);
tulip_media_set(sc, TULIP_MEDIA_10BASET);
sc->tulip_media = TULIP_MEDIA_10BASET;
@@ -948,7 +930,6 @@
tulip_21040_10baset_only_media_select(
tulip_softc_t * const sc)
{
- mtx_assert(&Giant, MA_OWNED);
sc->tulip_flags |= TULIP_LINKUP;
if (sc->tulip_media == TULIP_MEDIA_10BASET_FD) {
sc->tulip_cmdmode |= TULIP_CMD_FULLDUPLEX;
@@ -964,7 +945,6 @@
tulip_21040_auibnc_only_media_probe(
tulip_softc_t * const sc)
{
- mtx_assert(&Giant, MA_OWNED);
tulip_21040_mediainfo_init(sc, TULIP_MEDIA_AUIBNC);
sc->tulip_flags |= TULIP_SQETEST|TULIP_LINKUP;
tulip_media_set(sc, TULIP_MEDIA_AUIBNC);
@@ -975,7 +955,6 @@
tulip_21040_auibnc_only_media_select(
tulip_softc_t * const sc)
{
- mtx_assert(&Giant, MA_OWNED);
tulip_media_set(sc, TULIP_MEDIA_AUIBNC);
sc->tulip_cmdmode &= ~TULIP_CMD_FULLDUPLEX;
}
@@ -1007,7 +986,6 @@
{
tulip_media_info_t * const mi = sc->tulip_mediainfo;
- mtx_assert(&Giant, MA_OWNED);
#ifdef notyet
if (sc->tulip_revinfo >= 0x20) {
TULIP_MEDIAINFO_SIA_INIT(sc, &mi[0], 21041P2, 10BASET);
@@ -1027,7 +1005,6 @@
tulip_21041_media_probe(
tulip_softc_t * const sc)
{
- mtx_assert(&Giant, MA_OWNED);
sc->tulip_if.if_baudrate = 10000000;
sc->tulip_cmdmode |= TULIP_CMD_CAPTREFFCT|TULIP_CMD_ENHCAPTEFFCT
|TULIP_CMD_THRSHLD160|TULIP_CMD_BACKOFFCTR;
@@ -1042,7 +1019,6 @@
{
u_int32_t sia_status;
- mtx_assert(&Giant, MA_OWNED);
#if defined(TULIP_DEBUG)
sc->tulip_dbg.dbg_events[event]++;
#endif
@@ -1264,7 +1240,6 @@
TULIP_MEDIA_UNKNOWN
};
- mtx_assert(&Giant, MA_OWNED);
/*
* Don't read phy specific registers if link is not up.
*/
@@ -1314,7 +1289,6 @@
{
unsigned phyaddr;
- mtx_assert(&Giant, MA_OWNED);
for (phyaddr = 1; phyaddr < 32; phyaddr++) {
unsigned status = tulip_mii_readreg(sc, phyaddr, PHYREG_STATUS);
if (status == 0 || status == 0xFFFF || status < PHYSTS_10BASET)
@@ -1337,7 +1311,6 @@
tulip_softc_t * const sc,
unsigned abilities)
{
- mtx_assert(&Giant, MA_OWNED);
sc->tulip_abilities = abilities;
if (abilities & PHYSTS_100BASETX_FD) {
sc->tulip_probe_media = TULIP_MEDIA_100BASETX_FD;
@@ -1362,7 +1335,6 @@
tulip_softc_t * const sc,
const unsigned phyaddr)
{
- mtx_assert(&Giant, MA_OWNED);
switch (sc->tulip_probe_state) {
case TULIP_PROBE_MEDIATEST:
case TULIP_PROBE_INACTIVE: {
@@ -1463,7 +1435,6 @@
const tulip_media_info_t *mi = NULL;
tulip_media_t media = sc->tulip_media;
- mtx_assert(&Giant, MA_OWNED);
if (sc->tulip_probe_state == TULIP_PROBE_INACTIVE)
media = sc->tulip_media;
else
@@ -1539,7 +1510,6 @@
tulip_softc_t * const sc,
tulip_mediapoll_event_t event)
{
- mtx_assert(&Giant, MA_OWNED);
#if defined(TULIP_DEBUG)
sc->tulip_dbg.dbg_events[event]++;
#endif
@@ -1557,7 +1527,6 @@
unsigned gpdata,
unsigned cmdmode)
{
- mtx_assert(&Giant, MA_OWNED);
sc->tulip_mediums[media] = mip;
mip->mi_type = TULIP_MEDIAINFO_GPR;
mip->mi_cmdmode = cmdmode;
@@ -1570,7 +1539,6 @@
{
tulip_media_info_t *mip = sc->tulip_mediainfo;
- mtx_assert(&Giant, MA_OWNED);
sc->tulip_gpinit = TULIP_GP_EB_PINS;
sc->tulip_gpdata = TULIP_GP_EB_INIT;
TULIP_CSR_WRITE(sc, csr_gp, TULIP_GP_EB_PINS);
@@ -1617,7 +1585,6 @@
tulip_media_info_t *mip = sc->tulip_mediainfo;
unsigned gpdata;
- mtx_assert(&Giant, MA_OWNED);
sc->tulip_gpinit = TULIP_GP_EB_PINS;
sc->tulip_gpdata = TULIP_GP_EB_INIT;
TULIP_CSR_WRITE(sc, csr_gp, TULIP_GP_EB_PINS);
@@ -1672,7 +1639,6 @@
tulip_media_info_t *mip = sc->tulip_mediainfo;
int idx, cnt = 0;
- mtx_assert(&Giant, MA_OWNED);
TULIP_CSR_WRITE(sc, csr_command, TULIP_CMD_PORTSELECT|TULIP_CMD_MUSTBEONE);
TULIP_CSR_WRITE(sc, csr_busmode, TULIP_BUSMODE_SWRESET);
DELAY(10); /* Wait 10 microseconds (actually 50 PCI cycles but at
@@ -1729,7 +1695,6 @@
tulip_media_info_t *mip = sc->tulip_mediainfo;
u_int32_t cmdmode = TULIP_CSR_READ(sc, csr_command);
- mtx_assert(&Giant, MA_OWNED);
sc->tulip_gpinit = TULIP_GP_EM100_PINS;
sc->tulip_gpdata = TULIP_GP_EM100_INIT;
TULIP_CSR_WRITE(sc, csr_gp, TULIP_GP_EM100_PINS);
@@ -1777,7 +1742,6 @@
tulip_media_info_t *mip = sc->tulip_mediainfo;
int cnt10 = 0, cnt100 = 0, idx;
- mtx_assert(&Giant, MA_OWNED);
sc->tulip_gpinit = TULIP_GP_ZX34X_PINS;
sc->tulip_gpdata = TULIP_GP_ZX34X_INIT;
TULIP_CSR_WRITE(sc, csr_gp, TULIP_GP_ZX34X_PINS);
@@ -1832,7 +1796,6 @@
tulip_2114x_media_probe(
tulip_softc_t * const sc)
{
- mtx_assert(&Giant, MA_OWNED);
sc->tulip_cmdmode |= TULIP_CMD_MUSTBEONE
|TULIP_CMD_BACKOFFCTR|TULIP_CMD_THRSHLD72;
}
@@ -1860,7 +1823,6 @@
{
unsigned bit, csr;
- mtx_assert(&Giant, MA_OWNED);
csr = SROMSEL ; EMIT;
csr = SROMSEL | SROMRD; EMIT;
csr ^= SROMCS; EMIT;
@@ -1889,7 +1851,6 @@
const unsigned msb = 1 << (bitwidth + 3 - 1);
unsigned lastidx = (1 << bitwidth) - 1;
- mtx_assert(&Giant, MA_OWNED);
tulip_srom_idle(sc);
for (idx = 0; idx <= lastidx; idx++) {
@@ -1939,7 +1900,6 @@
unsigned csr = TULIP_CSR_READ(sc, csr_srom_mii) & (MII_RD|MII_DOUT|MII_CLK);
unsigned lastbit = (csr & MII_DOUT) ? msb : 0;
- mtx_assert(&Giant, MA_OWNED);
csr |= MII_WR; MII_EMIT; /* clock low; assert write */
for (; bits > 0; bits--, data <<= 1) {
@@ -1960,7 +1920,6 @@
{
unsigned csr = TULIP_CSR_READ(sc, csr_srom_mii) & (MII_RD|MII_DOUT|MII_CLK);
- mtx_assert(&Giant, MA_OWNED);
if (cmd == MII_WRCMD) {
csr |= MII_DOUT; MII_EMIT; /* clock low; change data */
csr ^= MII_CLKON; MII_EMIT; /* clock high; data valid */
@@ -1981,7 +1940,6 @@
unsigned csr = TULIP_CSR_READ(sc, csr_srom_mii) & (MII_RD|MII_DOUT|MII_CLK);
int idx;
- mtx_assert(&Giant, MA_OWNED);
for (idx = 0, data = 0; idx < 16; idx++) {
data <<= 1; /* this is NOOP on the first pass through */
csr ^= MII_CLKON; MII_EMIT; /* clock high; data valid */
@@ -2003,7 +1961,6 @@
unsigned csr = TULIP_CSR_READ(sc, csr_srom_mii) & (MII_RD|MII_DOUT|MII_CLK);
unsigned data;
- mtx_assert(&Giant, MA_OWNED);
csr &= ~(MII_RD|MII_CLK); MII_EMIT;
tulip_mii_writebits(sc, MII_PREAMBLE, 32);
tulip_mii_writebits(sc, MII_RDCMD, 8);
@@ -2027,7 +1984,6 @@
unsigned data)
{
unsigned csr = TULIP_CSR_READ(sc, csr_srom_mii) & (MII_RD|MII_DOUT|MII_CLK);
- mtx_assert(&Giant, MA_OWNED);
csr &= ~(MII_RD|MII_CLK); MII_EMIT;
tulip_mii_writebits(sc, MII_PREAMBLE, 32);
tulip_mii_writebits(sc, MII_WRCMD, 8);
@@ -2050,7 +2006,6 @@
tulip_identify_dec_nic(
tulip_softc_t * const sc)
{
- mtx_assert(&Giant, MA_OWNED);
strcpy(sc->tulip_boardid, "DEC ");
#define D0 4
if (sc->tulip_chipid <= TULIP_21040)
@@ -2068,7 +2023,6 @@
tulip_softc_t * const sc)
{
unsigned id = 0;
- mtx_assert(&Giant, MA_OWNED);
strcpy(sc->tulip_boardid, "ZNYX ZX3XX ");
if (sc->tulip_chipid == TULIP_21140 || sc->tulip_chipid == TULIP_21140A) {
unsigned znyx_ptr;
@@ -2165,7 +2119,6 @@
int auibnc = 0, utp = 0;
char *cp;
- mtx_assert(&Giant, MA_OWNED);
strcpy(sc->tulip_boardid, "SMC ");
if (sc->tulip_chipid == TULIP_21041)
return;
@@ -2211,7 +2164,6 @@
tulip_identify_cogent_nic(
tulip_softc_t * const sc)
{
- mtx_assert(&Giant, MA_OWNED);
strcpy(sc->tulip_boardid, "Cogent ");
if (sc->tulip_chipid == TULIP_21140 || sc->tulip_chipid == TULIP_21140A) {
if (sc->tulip_rombuf[32] == TULIP_COGENT_EM100TX_ID) {
@@ -2248,7 +2200,6 @@
tulip_identify_accton_nic(
tulip_softc_t * const sc)
{
- mtx_assert(&Giant, MA_OWNED);
strcpy(sc->tulip_boardid, "ACCTON ");
switch (sc->tulip_chipid) {
case TULIP_21140A:
@@ -2279,7 +2230,6 @@
tulip_identify_asante_nic(
tulip_softc_t * const sc)
{
- mtx_assert(&Giant, MA_OWNED);
strcpy(sc->tulip_boardid, "Asante ");
if ((sc->tulip_chipid == TULIP_21140 || sc->tulip_chipid == TULIP_21140A)
&& sc->tulip_boardsw != &tulip_2114x_isv_boardsw) {
@@ -2336,7 +2286,6 @@
tulip_identify_compex_nic(
tulip_softc_t * const sc)
{
- mtx_assert(&Giant, MA_OWNED);
strcpy(sc->tulip_boardid, "COMPEX ");
if (sc->tulip_chipid == TULIP_21140A) {
int root_unit;
@@ -2385,7 +2334,6 @@
const u_int8_t *dp;
u_int32_t leaf_offset, blocks, data;
- mtx_assert(&Giant, MA_OWNED);
for (idx1 = 0; idx1 < shp->sh_adapter_count; idx1++, saip++) {
if (shp->sh_adapter_count == 1)
break;
@@ -2765,7 +2713,6 @@
unsigned char tmpbuf[8];
static const u_char testpat[] = { 0xFF, 0, 0x55, 0xAA, 0xFF, 0, 0x55, 0xAA };
- mtx_assert(&Giant, MA_OWNED);
sc->tulip_connidx = TULIP_SROM_LASTCONNIDX;
if (sc->tulip_chipid == TULIP_21040) {
@@ -2966,7 +2913,6 @@
tulip_media_t media;
int medias = 0;
- mtx_assert(&Giant, MA_OWNED);
for (media = TULIP_MEDIA_UNKNOWN; media < TULIP_MEDIA_MAX; media++) {
if (sc->tulip_mediums[media] != NULL) {
ifmedia_add(&sc->tulip_ifmedia, tulip_media_to_ifmedia[media],
@@ -2994,7 +2940,6 @@
{
tulip_softc_t * const sc = (tulip_softc_t *)ifp->if_softc;
- mtx_assert(&Giant, MA_OWNED);
sc->tulip_flags |= TULIP_NEEDRESET;
sc->tulip_probe_state = TULIP_PROBE_INACTIVE;
sc->tulip_media = TULIP_MEDIA_UNKNOWN;
@@ -3026,7 +2971,6 @@
{
tulip_softc_t *sc = (tulip_softc_t *)ifp->if_softc;
- mtx_assert(&Giant, MA_OWNED);
if (sc->tulip_media == TULIP_MEDIA_UNKNOWN)
return;
@@ -3045,7 +2989,6 @@
u_char *addrp;
int multicnt;
- mtx_assert(&Giant, MA_OWNED);
sc->tulip_flags &= ~(TULIP_WANTHASHPERFECT|TULIP_WANTHASHONLY|TULIP_ALLMULTI);
sc->tulip_flags |= TULIP_WANTSETUP|TULIP_WANTTXSTART;
sc->tulip_cmdmode &= ~TULIP_CMD_RXRUN;
@@ -3192,7 +3135,6 @@
tulip_desc_t *di;
u_int32_t inreset = (sc->tulip_flags & TULIP_INRESET);
- mtx_assert(&Giant, MA_OWNED);
/*
* Brilliant. Simply brilliant. When switching modes/speeds
* on a 2114*, you need to set the appriopriate MII/PCS/SCL/PS
@@ -3334,7 +3276,6 @@
tulip_ifinit(
void * sc)
{
- mtx_assert(&Giant, MA_OWNED);
tulip_init((tulip_softc_t *)sc);
}
@@ -3342,7 +3283,6 @@
tulip_init(
tulip_softc_t * const sc)
{
- mtx_assert(&Giant, MA_OWNED);
if (sc->tulip_if.if_flags & IFF_UP) {
if ((sc->tulip_if.if_flags & IFF_RUNNING) == 0) {
/* initialize the media */
@@ -3394,7 +3334,6 @@
int cnt = 0;
#endif
- mtx_assert(&Giant, MA_OWNED);
for (;;) {
TULIP_PERFSTART(rxget)
tulip_desc_t *eop = ri->ri_nextin;
@@ -3710,7 +3649,6 @@
int xmits = 0;
int descs = 0;
- mtx_assert(&Giant, MA_OWNED);
while (ri->ri_free < ri->ri_max) {
u_int32_t d_flag;
@@ -3843,7 +3781,6 @@
u_int32_t mask;
const char thrsh[] = "72|128\0\0\0" "96|256\0\0\0" "128|512\0\0" "160|1024";
- mtx_assert(&Giant, MA_OWNED);
csr &= (1 << (sizeof(tulip_status_bits)/sizeof(tulip_status_bits[0]))) - 1;
printf("%s: abnormal interrupt:", sc->tulip_xname);
for (sep = " ", mask = 1; mask <= csr; mask <<= 1, msgp++) {
@@ -3872,7 +3809,6 @@
TULIP_PERFSTART(intr)
u_int32_t csr;
- mtx_assert(&Giant, MA_OWNED);
while ((csr = TULIP_CSR_READ(sc, csr_status)) & sc->tulip_intrmask) {
*progress_p = 1;
TULIP_CSR_WRITE(sc, csr_status, csr);
@@ -3985,7 +3921,6 @@
tulip_softc_t * const sc,
int *progress_p)
{
- mtx_assert(&Giant, MA_OWNED);
if (TULIP_CSR_READ(sc, csr_status) & (TULIP_STS_NORMALINTR|TULIP_STS_ABNRMLINTR) == 0)
return;
*progress_p = 1;
@@ -4008,7 +3943,6 @@
int unit;
int s;
- mtx_assert(&Giant, MA_OWNED);
/*
* Copy mask to local copy and reset global one to 0.
*/
@@ -4070,7 +4004,6 @@
tulip_softc_t * sc = arg;
int progress = 0;
- mtx_assert(&Giant, MA_OWNED);
for (; sc != NULL; sc = sc->tulip_slaves) {
#if defined(TULIP_DEBUG)
sc->tulip_dbg.dbg_intrs++;
@@ -4094,7 +4027,6 @@
tulip_softc_t * sc = (tulip_softc_t *) arg;
int progress = 0;
- mtx_assert(&Giant, MA_OWNED);
#if defined(TULIP_DEBUG)
sc->tulip_dbg.dbg_intrs++;
#endif
@@ -4131,7 +4063,6 @@
int len = m->m_pkthdr.len;
struct mbuf **mp = &m0;
- mtx_assert(&Giant, MA_OWNED);
while (len > 0) {
if (mlen == MHLEN) {
MGETHDR(*mp, M_DONTWAIT, MT_DATA);
@@ -4182,7 +4113,6 @@
struct mbuf *m0;
#endif
- mtx_assert(&Giant, MA_OWNED);
#if defined(TULIP_DEBUG)
if ((sc->tulip_cmdmode & TULIP_CMD_TXRUN) == 0) {
printf("%s: txput%s: tx not running\n",
@@ -4504,7 +4434,6 @@
tulip_ringinfo_t * const ri = &sc->tulip_txinfo;
tulip_desc_t *nextout;
- mtx_assert(&Giant, MA_OWNED);
/*
* We will transmit, at most, one setup packet per call to ifstart.
*/
@@ -4604,7 +4533,6 @@
int s;
int error = 0;
- mtx_assert(&Giant, MA_OWNED);
#if defined(TULIP_USE_SOFTINTR)
s = splnet();
#else
@@ -4691,7 +4619,6 @@
TULIP_PERFSTART(ifstart)
tulip_softc_t * const sc = (tulip_softc_t *)ifp->if_softc;
- mtx_assert(&Giant, MA_OWNED);
if (sc->tulip_if.if_flags & IFF_RUNNING) {
if ((sc->tulip_flags & (TULIP_WANTSETUP|TULIP_TXPROBE_ACTIVE)) == TULIP_WANTSETUP)
@@ -4728,13 +4655,11 @@
#if defined(TULIP_DEBUG)
u_int32_t rxintrs = sc->tulip_dbg.dbg_rxintrs - sc->tulip_dbg.dbg_last_rxintrs;
- mtx_assert(&Giant, MA_OWNED);
if (rxintrs > sc->tulip_dbg.dbg_high_rxintrs_hz)
sc->tulip_dbg.dbg_high_rxintrs_hz = rxintrs;
sc->tulip_dbg.dbg_last_rxintrs = sc->tulip_dbg.dbg_rxintrs;
#endif /* TULIP_DEBUG */
- mtx_assert(&Giant, MA_OWNED);
sc->tulip_if.if_timer = 1;
/*
* These should be rare so do a bulk test up front so we can just skip
@@ -4809,7 +4734,6 @@
{
struct ifnet * const ifp = &sc->tulip_if;
- mtx_assert(&Giant, MA_OWNED);
/* XXX: driver name/unit should be set some other way */
ifp->if_dname = "de";
ifp->if_dunit = sc->tulip_unit;
@@ -4868,7 +4792,6 @@
{
bus_dma_segment_t segs[1];
int nsegs, error;
- mtx_assert(&Giant, MA_OWNED);
error = bus_dmamem_alloc(sc->tulip_dmatag, size, 1, PAGE_SIZE,
segs, sizeof(segs)/sizeof(segs[0]),
&nsegs, BUS_DMA_NOWAIT);
@@ -4906,7 +4829,6 @@
{
int error = 0;
- mtx_assert(&Giant, MA_OWNED);
#if !defined(TULIP_BUS_DMA_NOTX)
/*
* Allocate dmamap for setup descriptor
@@ -4994,7 +4916,6 @@
tulip_csrptr_t csr_base,
size_t csr_size)
{
- mtx_assert(&Giant, MA_OWNED);
sc->tulip_csrs.csr_busmode = csr_base + 0 * csr_size;
sc->tulip_csrs.csr_txpoll = csr_base + 1 * csr_size;
sc->tulip_csrs.csr_rxpoll = csr_base + 2 * csr_size;
@@ -5020,7 +4941,6 @@
tulip_desc_t *descs,
int ndescs)
{
- mtx_assert(&Giant, MA_OWNED);
ri->ri_max = ndescs;
ri->ri_first = descs;
ri->ri_last = ri->ri_first + ri->ri_max;
@@ -5041,7 +4961,6 @@
{
const char *name = NULL;
- mtx_assert(&Giant, MA_OWNED);
if (pci_get_vendor(dev) != DEC_VENDORID)
return ENXIO;
@@ -5083,7 +5002,6 @@
tulip_shutdown(device_t dev)
{
tulip_softc_t * const sc = device_get_softc(dev);
- mtx_assert(&Giant, MA_OWNED);
TULIP_CSR_WRITE(sc, csr_busmode, TULIP_BUSMODE_SWRESET);
DELAY(10); /* Wait 10 microseconds (actually 50 PCI cycles but at
33MHz that comes to two microseconds but wait a
@@ -5107,7 +5025,6 @@
struct resource *res;
int rid, unit;
- mtx_assert(&Giant, MA_OWNED);
unit = device_get_unit(dev);
if (unit >= TULIP_MAX_DEVICES) {
More information about the p4-projects
mailing list