summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2014-07-09 00:13:06 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2014-07-09 00:13:06 +0000
commite38cae75fb7f0f65f43cb0252a5f8190705e7681 (patch)
treec8459899d82c435ad2012a5c34f017a0a3502795 /sys
parentaab740da655b1ec56166b7b4371c76bdb8f0e07b (diff)
dont try to be smart about avoiding the use of too many descriptors
when filling the rx ring. trust the hwm. problem found by sthen@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/if_bnx.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/pci/if_bnx.c b/sys/dev/pci/if_bnx.c
index 323a1696804..c98899230a7 100644
--- a/sys/dev/pci/if_bnx.c
+++ b/sys/dev/pci/if_bnx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bnx.c,v 1.104 2014/07/08 05:35:18 dlg Exp $ */
+/* $OpenBSD: if_bnx.c,v 1.105 2014/07/09 00:13:05 dlg Exp $ */
/*-
* Copyright (c) 2006 Broadcom Corporation
@@ -4015,7 +4015,7 @@ bnx_fill_rx_chain(struct bnx_softc *sc)
/* Keep filling the RX chain until it's full. */
slots = if_rxr_get(&sc->rx_ring, sc->max_rx_bd);
- while (slots > BNX_MAX_SEGMENTS) {
+ while (slots > 0) {
chain_prod = RX_CHAIN_IDX(prod);
used = bnx_get_buf(sc, &prod, &chain_prod, &prod_bseq);
@@ -5123,6 +5123,11 @@ bnx_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command);
break;
+ case SIOCGIFRXR:
+ error = if_rxr_ioctl((struct if_rxrinfo *)ifr->ifr_data,
+ NULL, MCLBYTES, &sc->rx_ring);
+ break;
+
default:
error = ether_ioctl(ifp, &sc->arpcom, command, data);
}