summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2008-12-03 03:20:18 +0000
committeryongari <yongari@FreeBSD.org>2008-12-03 03:20:18 +0000
commit579fc34775c85219ea3b1e035314a7b1a317ce66 (patch)
treee14aa0cccb8bb4d8c700993afde47f8a1bde83f5 /sys
parent8070e0b5fd76204bc8f4cd8b21f58fc8043ed941 (diff)
downloadFreeBSD-src-579fc34775c85219ea3b1e035314a7b1a317ce66.zip
FreeBSD-src-579fc34775c85219ea3b1e035314a7b1a317ce66.tar.gz
Update if_iqdrops instead of if_ierrors when m_devget(9) fails.
Diffstat (limited to 'sys')
-rw-r--r--sys/pci/if_rl.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/pci/if_rl.c b/sys/pci/if_rl.c
index 5ddf9a4..71866ce 100644
--- a/sys/pci/if_rl.c
+++ b/sys/pci/if_rl.c
@@ -1302,18 +1302,13 @@ rl_rxeof(struct rl_softc *sc)
if (total_len > wrap) {
m = m_devget(rxbufpos, total_len, RL_ETHER_ALIGN, ifp,
NULL);
- if (m == NULL) {
- ifp->if_ierrors++;
- } else {
+ if (m != NULL)
m_copyback(m, wrap, total_len - wrap,
sc->rl_cdata.rl_rx_buf);
- }
cur_rx = (total_len - wrap + ETHER_CRC_LEN);
} else {
m = m_devget(rxbufpos, total_len, RL_ETHER_ALIGN, ifp,
NULL);
- if (m == NULL)
- ifp->if_ierrors++;
cur_rx += total_len + 4 + ETHER_CRC_LEN;
}
@@ -1321,8 +1316,10 @@ rl_rxeof(struct rl_softc *sc)
cur_rx = (cur_rx + 3) & ~3;
CSR_WRITE_2(sc, RL_CURRXADDR, cur_rx - 16);
- if (m == NULL)
+ if (m == NULL) {
+ ifp->if_iqdrops++;
continue;
+ }
ifp->if_ipackets++;
RL_UNLOCK(sc);
OpenPOWER on IntegriCloud