summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/if_bge.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2008-11-08 07:37:07 +0000
committerderaadt <deraadt@openbsd.org>2008-11-08 07:37:07 +0000
commit8013a2019f21f180e9d5dfa2b87e2b0f8facc8fe (patch)
tree5f61a7ac03e09ca59b4ab2bda3717de238298640 /sys/dev/pci/if_bge.c
parentWhen initializing the standard RX ring, do not allocate mbufs clusters for the (diff)
downloadwireguard-openbsd-8013a2019f21f180e9d5dfa2b87e2b0f8facc8fe.tar.xz
wireguard-openbsd-8013a2019f21f180e9d5dfa2b87e2b0f8facc8fe.zip
brad, noone said you could go making changes like that (doubling the
amount of memory and interrupt time each bge uses) without discussing it with other people. lots of people are complaining about the lack of communication in your process, and you are going to have to change that.
Diffstat (limited to 'sys/dev/pci/if_bge.c')
-rw-r--r--sys/dev/pci/if_bge.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c
index 1bc6d6324af..98bef6d6799 100644
--- a/sys/dev/pci/if_bge.c
+++ b/sys/dev/pci/if_bge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bge.c,v 1.253 2008/11/08 07:13:02 deraadt Exp $ */
+/* $OpenBSD: if_bge.c,v 1.254 2008/11/08 07:37:07 deraadt Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -982,6 +982,12 @@ bge_newbuf_jumbo(struct bge_softc *sc, int i, struct mbuf *m)
return (0);
}
+/*
+ * The standard receive ring has 512 entries in it. At 2K per mbuf cluster,
+ * that's 1MB or memory, which is a lot. For now, we fill only the first
+ * 256 ring entries and hope that our CPU is fast enough to keep up with
+ * the NIC.
+ */
int
bge_init_rx_ring_std(struct bge_softc *sc)
{
@@ -2709,7 +2715,7 @@ bge_tick(void *xsc)
/*
* Do not touch PHY if we have link up. This could break
* IPMI/ASF mode or produce extra input errors.
- * (extra input errors was reported for BCM5701 & BCM5704).
+ * (extra input errors was reported for bcm5701 & bcm5704).
*/
if (!BGE_STS_BIT(sc, BGE_STS_LINK))
mii_tick(mii);
@@ -3571,6 +3577,8 @@ bge_link_upd(struct bge_softc *sc)
}
/*
* Discard link events for MII/GMII cards if MI auto-polling disabled.
+ * This should not happen since mii callouts are locked now, but
+ * we keep this check for debug.
*/
} else if (BGE_STS_BIT(sc, BGE_STS_AUTOPOLL)) {
/*