diff options
author | peter <peter@FreeBSD.org> | 2001-12-15 02:51:21 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2001-12-15 02:51:21 +0000 |
commit | fce71746d6ce4d2c71a9daed6cb5c360265c2a65 (patch) | |
tree | 3aa204644439feb580a2a7771f5d9662d868e142 /sys/pci | |
parent | be795bba25af4d1460e1b0cffb46f35a0c7248da (diff) | |
download | FreeBSD-src-fce71746d6ce4d2c71a9daed6cb5c360265c2a65.zip FreeBSD-src-fce71746d6ce4d2c71a9daed6cb5c360265c2a65.tar.gz |
Patch up some existing style bugs and some that crept in with the
DEVICE_POLLING stuff.
Diffstat (limited to 'sys/pci')
-rw-r--r-- | sys/pci/if_dc.c | 14 | ||||
-rw-r--r-- | sys/pci/if_sis.c | 3 | ||||
-rw-r--r-- | sys/pci/if_sisreg.h | 2 |
3 files changed, 10 insertions, 9 deletions
diff --git a/sys/pci/if_dc.c b/sys/pci/if_dc.c index caee9d0..85002ed 100644 --- a/sys/pci/if_dc.c +++ b/sys/pci/if_dc.c @@ -1943,7 +1943,7 @@ static int dc_attach(dev) case DC_DEVICEID_X3201: sc->dc_type = DC_TYPE_XIRCOM; sc->dc_flags |= DC_TX_INTR_ALWAYS | DC_TX_COALESCE | - DC_TX_ALIGN ; + DC_TX_ALIGN; /* * We don't actually need to coalesce, but we're doing * it to obtain a double word aligned buffer. @@ -2799,7 +2799,7 @@ static poll_handler_t dc_poll; static void dc_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) { - struct dc_softc *sc = ifp->if_softc; + struct dc_softc *sc = ifp->if_softc; if (cmd == POLL_DEREGISTER) { /* final call, enable interrupts */ /* Re-enable interrupts. */ @@ -2820,11 +2820,11 @@ dc_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) DC_ISR_TX_NOBUF|DC_ISR_TX_IDLE|DC_ISR_TX_UNDERRUN| DC_ISR_BUS_ERR); if (!status) - return ; + return; /* ack what we have */ CSR_WRITE_4(sc, DC_ISR, status); - if (status & (DC_ISR_RX_WATDOGTIMEO|DC_ISR_RX_NOBUF) ) { + if (status & (DC_ISR_RX_WATDOGTIMEO|DC_ISR_RX_NOBUF)) { u_int32_t r = CSR_READ_4(sc, DC_FRAMESDISCARDED); ifp->if_ierrors += (r & 0xffff) + ((r >> 17) & 0x7ff); @@ -2856,8 +2856,8 @@ static void dc_intr(arg) sc = arg; - if ( (CSR_READ_4(sc, DC_ISR) & DC_INTRS) == 0) - return ; + if ((CSR_READ_4(sc, DC_ISR) & DC_INTRS) == 0) + return; DC_LOCK(sc); ifp = &sc->arpcom.ac_if; @@ -3070,7 +3070,7 @@ static void dc_start(ifp) if (sc->dc_flags & DC_TX_COALESCE && (m_head->m_next != NULL || - sc->dc_flags & DC_TX_ALIGN) ) { + sc->dc_flags & DC_TX_ALIGN)) { if (dc_coal(sc, &m_head)) { IF_PREPEND(&ifp->if_snd, m_head); ifp->if_flags |= IFF_OACTIVE; diff --git a/sys/pci/if_sis.c b/sys/pci/if_sis.c index ec7ee82..81ec6c4 100644 --- a/sys/pci/if_sis.c +++ b/sys/pci/if_sis.c @@ -1454,7 +1454,8 @@ static poll_handler_t sis_poll; static void sis_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) { - struct sis_softc *sc = ifp->if_softc; + struct sis_softc *sc = ifp->if_softc; + SIS_LOCK(sc); if (cmd == POLL_DEREGISTER) { /* final call, enable interrupts */ CSR_WRITE_4(sc, SIS_IER, 1); diff --git a/sys/pci/if_sisreg.h b/sys/pci/if_sisreg.h index 8032175..9ab779f 100644 --- a/sys/pci/if_sisreg.h +++ b/sys/pci/if_sisreg.h @@ -307,7 +307,7 @@ struct sis_desc { #define SIS_LASTDESC(x) (!((x)->sis_ctl & SIS_CMDSTS_MORE))) #define SIS_OWNDESC(x) ((x)->sis_ctl & SIS_CMDSTS_OWN) -#define SIS_INC(x, y) { if (++(x) == y) x=0 ; } +#define SIS_INC(x, y) { if (++(x) == y) x = 0; } #define SIS_RXBYTES(x) ((x)->sis_ctl & SIS_CMDSTS_BUFLEN) #define SIS_RXSTAT_COLL 0x00010000 |