svn commit: r230286 - head/sys/dev/bge
Pyun YongHyeon
yongari at FreeBSD.org
Tue Jan 17 22:15:34 UTC 2012
Author: yongari
Date: Tue Jan 17 22:15:33 2012
New Revision: 230286
URL: http://svn.freebsd.org/changeset/base/230286
Log:
Introduce a tunable that disables use of MSI.
Non-zero value will use INTx.
Modified:
head/sys/dev/bge/if_bge.c
head/sys/dev/bge/if_bgereg.h
Modified: head/sys/dev/bge/if_bge.c
==============================================================================
--- head/sys/dev/bge/if_bge.c Tue Jan 17 22:09:33 2012 (r230285)
+++ head/sys/dev/bge/if_bge.c Tue Jan 17 22:15:33 2012 (r230286)
@@ -2745,6 +2745,9 @@ bge_can_use_msi(struct bge_softc *sc)
{
int can_use_msi = 0;
+ if (sc->bge_msi_disable != 0)
+ return (0);
+
/* Disable MSI for polling(4). */
#ifdef DEVICE_POLLING
return (0);
@@ -5627,6 +5630,12 @@ bge_add_sysctls(struct bge_softc *sc)
"Number of fragmented TX buffers of a frame allowed before "
"forced collapsing");
+ sc->bge_msi_disable = 0;
+ snprintf(tn, sizeof(tn), "dev.bge.%d.msi_disable", unit);
+ TUNABLE_INT_FETCH(tn, &sc->bge_msi_disable);
+ SYSCTL_ADD_INT(ctx, children, OID_AUTO, "msi_disable",
+ CTLFLAG_RD, &sc->bge_msi_disable, 0, "Disable MSI");
+
/*
* It seems all Broadcom controllers have a bug that can generate UDP
* datagrams with checksum value 0 when TX UDP checksum offloading is
Modified: head/sys/dev/bge/if_bgereg.h
==============================================================================
--- head/sys/dev/bge/if_bgereg.h Tue Jan 17 22:09:33 2012 (r230285)
+++ head/sys/dev/bge/if_bgereg.h Tue Jan 17 22:15:33 2012 (r230286)
@@ -2864,6 +2864,7 @@ struct bge_softc {
int bge_timer;
int bge_forced_collapse;
int bge_forced_udpcsum;
+ int bge_msi_disable;
int bge_csum_features;
struct callout bge_stat_ch;
uint32_t bge_rx_discards;
More information about the svn-src-all
mailing list