Patch up some existing style bugs and some that crept in with the

DEVICE_POLLING stuff.
This commit is contained in:
Peter Wemm 2001-12-15 02:51:21 +00:00
parent 6481f3012e
commit 80c706c80e
4 changed files with 17 additions and 16 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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