summaryrefslogtreecommitdiffstats
path: root/sys/dev/sis
diff options
context:
space:
mode:
authorbrucec <brucec@FreeBSD.org>2010-04-20 19:30:12 +0000
committerbrucec <brucec@FreeBSD.org>2010-04-20 19:30:12 +0000
commit659eae4cbcb9e529076c0f13eab38fc4639a23c9 (patch)
treeae35d7f07d59923839c597deaa6e654e9da9a932 /sys/dev/sis
parent69dad28d6e5bb489f5919cc2dc24f8d0d139cbd5 (diff)
downloadFreeBSD-src-659eae4cbcb9e529076c0f13eab38fc4639a23c9.zip
FreeBSD-src-659eae4cbcb9e529076c0f13eab38fc4639a23c9.tar.gz
It's not necessary to reset the chip every time an input overflow event
occurs. In addition, the delay when programming the short cable fix should be 100us, not 100ms. PR: kern/64556 Submitted by: Thomas Hurst <tom at hur.st> Approved by: rrs (mentor) MFC after: 1 week
Diffstat (limited to 'sys/dev/sis')
-rw-r--r--sys/dev/sis/if_sis.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/sys/dev/sis/if_sis.c b/sys/dev/sis/if_sis.c
index aac46f7..1983342 100644
--- a/sys/dev/sis/if_sis.c
+++ b/sys/dev/sis/if_sis.c
@@ -1483,15 +1483,6 @@ sis_rxeof(struct sis_softc *sc)
return (rx_npkts);
}
-static void
-sis_rxeoc(struct sis_softc *sc)
-{
-
- SIS_LOCK_ASSERT(sc);
- sis_rxeof(sc);
- sis_initl(sc);
-}
-
/*
* A frame was downloaded to the chip. It's safe for us to clean up
* the list buffers.
@@ -1614,7 +1605,7 @@ sis_poll(struct ifnet *ifp, enum poll_cmd cmd, int count)
status = CSR_READ_4(sc, SIS_ISR);
if (status & (SIS_ISR_RX_ERR|SIS_ISR_RX_OFLOW))
- sis_rxeoc(sc);
+ ifp->if_ierrors++;
if (status & (SIS_ISR_RX_IDLE))
SIS_SETBIT(sc, SIS_CSR, SIS_CSR_RX_ENABLE);
@@ -1672,7 +1663,7 @@ sis_intr(void *arg)
sis_rxeof(sc);
if (status & SIS_ISR_RX_OFLOW)
- sis_rxeoc(sc);
+ ifp->if_ierrors++;
if (status & (SIS_ISR_RX_IDLE))
SIS_SETBIT(sc, SIS_CSR, SIS_CSR_RX_ENABLE);
@@ -2017,7 +2008,7 @@ sis_initl(struct sis_softc *sc)
CSR_WRITE_4(sc, NS_PHY_PAGE, 0x0001);
reg = CSR_READ_4(sc, NS_PHY_DSPCFG) & 0xfff;
CSR_WRITE_4(sc, NS_PHY_DSPCFG, reg | 0x1000);
- DELAY(100000);
+ DELAY(100);
reg = CSR_READ_4(sc, NS_PHY_TDATA) & 0xff;
if ((reg & 0x0080) == 0 || (reg > 0xd8 && reg <= 0xff)) {
device_printf(sc->sis_dev,
OpenPOWER on IntegriCloud