Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Jan 2012 20:21:59 +0000 (UTC)
From:      Pyun YongHyeon <yongari@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r230337 - head/sys/dev/bge
Message-ID:  <201201192021.q0JKLxGO005782@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yongari
Date: Thu Jan 19 20:21:59 2012
New Revision: 230337
URL: http://svn.freebsd.org/changeset/base/230337

Log:
  Rename dev.bge.%d.msi_disable to dev.bge.%d.msi which matches
  enable/disable and default it to on.
  
  Suggested by:	jhb

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	Thu Jan 19 20:13:16 2012	(r230336)
+++ head/sys/dev/bge/if_bge.c	Thu Jan 19 20:21:59 2012	(r230337)
@@ -2745,7 +2745,7 @@ bge_can_use_msi(struct bge_softc *sc)
 {
 	int can_use_msi = 0;
 
-	if (sc->bge_msi_disable != 0)
+	if (sc->bge_msi != 0)
 		return (0);
 
 	/* Disable MSI for polling(4). */
@@ -5630,11 +5630,11 @@ 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");
+	sc->bge_msi = 1;
+	snprintf(tn, sizeof(tn), "dev.bge.%d.msi", unit);
+	TUNABLE_INT_FETCH(tn, &sc->bge_msi);
+	SYSCTL_ADD_INT(ctx, children, OID_AUTO, "msi",
+	    CTLFLAG_RD, &sc->bge_msi, 0, "Enable MSI");
 
 	/*
 	 * It seems all Broadcom controllers have a bug that can generate UDP

Modified: head/sys/dev/bge/if_bgereg.h
==============================================================================
--- head/sys/dev/bge/if_bgereg.h	Thu Jan 19 20:13:16 2012	(r230336)
+++ head/sys/dev/bge/if_bgereg.h	Thu Jan 19 20:21:59 2012	(r230337)
@@ -2864,7 +2864,7 @@ struct bge_softc {
 	int			bge_timer;
 	int			bge_forced_collapse;
 	int			bge_forced_udpcsum;
-	int			bge_msi_disable;
+	int			bge_msi;
 	int			bge_csum_features;
 	struct callout		bge_stat_ch;
 	uint32_t		bge_rx_discards;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201192021.q0JKLxGO005782>