Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Jan 2011 19:53:56 +0000 (UTC)
From:      Matthew D Fleming <mdf@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r217323 - in head/sys/dev: acpi_support ae alc ale ath bce bge bwi bwn ed iscsi/initiator iwi mps mpt nfe pccbb sound/pcm ste txp usb/input
Message-ID:  <201101121953.p0CJruOH005143@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mdf
Date: Wed Jan 12 19:53:56 2011
New Revision: 217323
URL: http://svn.freebsd.org/changeset/base/217323

Log:
  sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly.
  
  Commit the rest of the devices.

Modified:
  head/sys/dev/acpi_support/acpi_ibm.c
  head/sys/dev/ae/if_ae.c
  head/sys/dev/alc/if_alc.c
  head/sys/dev/ale/if_ale.c
  head/sys/dev/ath/if_ath.c
  head/sys/dev/bce/if_bce.c
  head/sys/dev/bge/if_bge.c
  head/sys/dev/bwi/if_bwi.c
  head/sys/dev/bwn/if_bwn.c
  head/sys/dev/ed/if_ed.c
  head/sys/dev/iscsi/initiator/iscsi.c
  head/sys/dev/iwi/if_iwi.c
  head/sys/dev/mps/mps.c
  head/sys/dev/mpt/mpt.c
  head/sys/dev/mpt/mpt_raid.c
  head/sys/dev/nfe/if_nfe.c
  head/sys/dev/pccbb/pccbb.c
  head/sys/dev/sound/pcm/sound.c
  head/sys/dev/ste/if_ste.c
  head/sys/dev/txp/if_txp.c
  head/sys/dev/usb/input/atp.c

Modified: head/sys/dev/acpi_support/acpi_ibm.c
==============================================================================
--- head/sys/dev/acpi_support/acpi_ibm.c	Wed Jan 12 19:53:50 2011	(r217322)
+++ head/sys/dev/acpi_support/acpi_ibm.c	Wed Jan 12 19:53:56 2011	(r217323)
@@ -367,7 +367,7 @@ acpi_ibm_attach(device_t dev)
 	    IBM_NAME_EVENTS_MASK_GET, &sc->events_initialmask));
 
 	if (sc->events_mask_supported) {
-		SYSCTL_ADD_INT(sc->sysctl_ctx,
+		SYSCTL_ADD_UINT(sc->sysctl_ctx,
 		    SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO,
 		    "initialmask", CTLFLAG_RD,
 		    &sc->events_initialmask, 0, "Initial eventmask");
@@ -377,7 +377,7 @@ acpi_ibm_attach(device_t dev)
 		    IBM_NAME_EVENTS_AVAILMASK, &sc->events_availmask)))
 			sc->events_availmask = 0xffffffff;
 
-		SYSCTL_ADD_INT(sc->sysctl_ctx,
+		SYSCTL_ADD_UINT(sc->sysctl_ctx,
 		    SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO,
 		    "availmask", CTLFLAG_RD,
 		    &sc->events_availmask, 0, "Mask of supported events");

Modified: head/sys/dev/ae/if_ae.c
==============================================================================
--- head/sys/dev/ae/if_ae.c	Wed Jan 12 19:53:50 2011	(r217322)
+++ head/sys/dev/ae/if_ae.c	Wed Jan 12 19:53:56 2011	(r217323)
@@ -207,43 +207,6 @@ TUNABLE_INT("hw.ae.msi_disable", &msi_di
 #define	AE_TXD_VLAN(vtag) \
 	(((vtag) << 4) | (((vtag) >> 13) & 0x07) | (((vtag) >> 9) & 0x08))
 
-/*
- * ae statistics.
- */
-#define	STATS_ENTRY(node, desc, field) \
-    { node, desc, offsetof(struct ae_stats, field) }
-struct {
-	const char	*node;
-	const char	*desc;
-	intptr_t	offset;
-} ae_stats_tx[] = {
-	STATS_ENTRY("bcast", "broadcast frames", tx_bcast),
-	STATS_ENTRY("mcast", "multicast frames", tx_mcast),
-	STATS_ENTRY("pause", "PAUSE frames", tx_pause),
-	STATS_ENTRY("control", "control frames", tx_ctrl),
-	STATS_ENTRY("defers", "deferrals occuried", tx_defer),
-	STATS_ENTRY("exc_defers", "excessive deferrals occuried", tx_excdefer),
-	STATS_ENTRY("singlecols", "single collisions occuried", tx_singlecol),
-	STATS_ENTRY("multicols", "multiple collisions occuried", tx_multicol),
-	STATS_ENTRY("latecols", "late collisions occuried", tx_latecol),
-	STATS_ENTRY("aborts", "transmit aborts due collisions", tx_abortcol),
-	STATS_ENTRY("underruns", "Tx FIFO underruns", tx_underrun)
-}, ae_stats_rx[] = {
-	STATS_ENTRY("bcast", "broadcast frames", rx_bcast),
-	STATS_ENTRY("mcast", "multicast frames", rx_mcast),
-	STATS_ENTRY("pause", "PAUSE frames", rx_pause),
-	STATS_ENTRY("control", "control frames", rx_ctrl),
-	STATS_ENTRY("crc_errors", "frames with CRC errors", rx_crcerr),
-	STATS_ENTRY("code_errors", "frames with invalid opcode", rx_codeerr),
-	STATS_ENTRY("runt", "runt frames", rx_runt),
-	STATS_ENTRY("frag", "fragmented frames", rx_frag),
-	STATS_ENTRY("align_errors", "frames with alignment errors", rx_align),
-	STATS_ENTRY("truncated", "frames truncated due to Rx FIFO inderrun",
-	    rx_trunc)
-};
-#define	AE_STATS_RX_LEN	(sizeof(ae_stats_rx) / sizeof(*ae_stats_rx))
-#define	AE_STATS_TX_LEN	(sizeof(ae_stats_tx) / sizeof(*ae_stats_tx))
-
 static int
 ae_probe(device_t dev)
 {
@@ -433,13 +396,15 @@ fail:
 	return (error);
 }
 
+#define	AE_SYSCTL(stx, parent, name, desc, ptr)	\
+	SYSCTL_ADD_UINT(ctx, parent, OID_AUTO, name, CTLFLAG_RD, ptr, 0, desc)
+
 static void
 ae_init_tunables(ae_softc_t *sc)
 {
 	struct sysctl_ctx_list *ctx;
 	struct sysctl_oid *root, *stats, *stats_rx, *stats_tx;
 	struct ae_stats *ae_stats;
-	unsigned int i;
 
 	KASSERT(sc != NULL, ("[ae, %d]: sc is NULL", __LINE__));
 	ae_stats = &sc->stats;
@@ -454,20 +419,54 @@ ae_init_tunables(ae_softc_t *sc)
 	 */
 	stats_rx = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(stats), OID_AUTO, "rx",
 	    CTLFLAG_RD, NULL, "Rx MAC statistics");
-	for (i = 0; i < AE_STATS_RX_LEN; i++)
-		SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(stats_rx), OID_AUTO,
-		    ae_stats_rx[i].node, CTLFLAG_RD, (char *)ae_stats +
-		    ae_stats_rx[i].offset, 0, ae_stats_rx[i].desc);
+	AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_rx), "bcast",
+	    "broadcast frames", &ae_stats->rx_bcast);
+	AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_rx), "mcast",
+	    "multicast frames", &ae_stats->rx_mcast);
+	AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_rx), "pause",
+	    "PAUSE frames", &ae_stats->rx_pause);
+	AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_rx), "control",
+	    "control frames", &ae_stats->rx_ctrl);
+	AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_rx), "crc_errors",
+	    "frames with CRC errors", &ae_stats->rx_crcerr);
+	AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_rx), "code_errors",
+	    "frames with invalid opcode", &ae_stats->rx_codeerr);
+	AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_rx), "runt",
+	    "runt frames", &ae_stats->rx_runt);
+	AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_rx), "frag",
+	    "fragmented frames", &ae_stats->rx_frag);
+	AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_rx), "align_errors",
+	    "frames with alignment errors", &ae_stats->rx_align);
+	AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_rx), "truncated",
+	    "frames truncated due to Rx FIFO inderrun", &ae_stats->rx_trunc);
 
 	/*
 	 * Receiver statistcics.
 	 */
 	stats_tx = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(stats), OID_AUTO, "tx",
 	    CTLFLAG_RD, NULL, "Tx MAC statistics");
-	for (i = 0; i < AE_STATS_TX_LEN; i++)
-		SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(stats_tx), OID_AUTO,
-		    ae_stats_tx[i].node, CTLFLAG_RD, (char *)ae_stats +
-		    ae_stats_tx[i].offset, 0, ae_stats_tx[i].desc);
+	AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_tx), "bcast",
+	    "broadcast frames", &ae_stats->tx_bcast);
+	AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_tx), "mcast",
+	    "multicast frames", &ae_stats->tx_mcast);
+	AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_tx), "pause",
+	    "PAUSE frames", &ae_stats->tx_pause);
+	AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_tx), "control",
+	    "control frames", &ae_stats->tx_ctrl);
+	AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_tx), "defers",
+	    "deferrals occuried", &ae_stats->tx_defer);
+	AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_tx), "exc_defers",
+	    "excessive deferrals occuried", &ae_stats->tx_excdefer);
+	AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_tx), "singlecols",
+	    "single collisions occuried", &ae_stats->tx_singlecol);
+	AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_tx), "multicols",
+	    "multiple collisions occuried", &ae_stats->tx_multicol);
+	AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_tx), "latecols",
+	    "late collisions occuried", &ae_stats->tx_latecol);
+	AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_tx), "aborts",
+	    "transmit aborts due collisions", &ae_stats->tx_abortcol);
+	AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_tx), "underruns",
+	    "Tx FIFO underruns", &ae_stats->tx_underrun);
 }
 
 static void

Modified: head/sys/dev/alc/if_alc.c
==============================================================================
--- head/sys/dev/alc/if_alc.c	Wed Jan 12 19:53:50 2011	(r217322)
+++ head/sys/dev/alc/if_alc.c	Wed Jan 12 19:53:56 2011	(r217323)
@@ -1106,7 +1106,7 @@ alc_detach(device_t dev)
 #define	ALC_SYSCTL_STAT_ADD32(c, h, n, p, d)	\
 	    SYSCTL_ADD_UINT(c, h, OID_AUTO, n, CTLFLAG_RD, p, 0, d)
 #define	ALC_SYSCTL_STAT_ADD64(c, h, n, p, d)	\
-	    SYSCTL_ADD_QUAD(c, h, OID_AUTO, n, CTLFLAG_RD, p, d)
+	    SYSCTL_ADD_UQUAD(c, h, OID_AUTO, n, CTLFLAG_RD, p, d)
 
 static void
 alc_sysctl_node(struct alc_softc *sc)

Modified: head/sys/dev/ale/if_ale.c
==============================================================================
--- head/sys/dev/ale/if_ale.c	Wed Jan 12 19:53:50 2011	(r217322)
+++ head/sys/dev/ale/if_ale.c	Wed Jan 12 19:53:56 2011	(r217323)
@@ -729,7 +729,10 @@ ale_detach(device_t dev)
 #define	ALE_SYSCTL_STAT_ADD32(c, h, n, p, d)	\
 	    SYSCTL_ADD_UINT(c, h, OID_AUTO, n, CTLFLAG_RD, p, 0, d)
 
-#if __FreeBSD_version > 800000
+#if __FreeBSD_version >= 900030
+#define	ALE_SYSCTL_STAT_ADD64(c, h, n, p, d)	\
+	    SYSCTL_ADD_UQUAD(c, h, OID_AUTO, n, CTLFLAG_RD, p, d)
+#elif __FreeBSD_version > 800000
 #define	ALE_SYSCTL_STAT_ADD64(c, h, n, p, d)	\
 	    SYSCTL_ADD_QUAD(c, h, OID_AUTO, n, CTLFLAG_RD, p, d)
 #else

Modified: head/sys/dev/ath/if_ath.c
==============================================================================
--- head/sys/dev/ath/if_ath.c	Wed Jan 12 19:53:50 2011	(r217322)
+++ head/sys/dev/ath/if_ath.c	Wed Jan 12 19:53:56 2011	(r217323)
@@ -6565,10 +6565,10 @@ ath_sysctlattach(struct ath_softc *sc)
 	struct sysctl_oid *tree = device_get_sysctl_tree(sc->sc_dev);
 	struct ath_hal *ah = sc->sc_ah;
 
-	SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+	SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
 		"countrycode", CTLFLAG_RD, &sc->sc_eecc, 0,
 		"EEPROM country code");
-	SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+	SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
 		"regdomain", CTLFLAG_RD, &sc->sc_eerd, 0,
 		"EEPROM regdomain code");
 #ifdef	ATH_DEBUG
@@ -6591,10 +6591,10 @@ ath_sysctlattach(struct ath_softc *sc)
 	SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
 		"ledpin", CTLTYPE_INT | CTLFLAG_RW, sc, 0,
 		ath_sysctl_ledpin, "I", "GPIO pin connected to LED");
-	SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+	SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
 		"ledon", CTLFLAG_RW, &sc->sc_ledon, 0,
 		"setting to turn LED on");
-	SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+	SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
 		"ledidle", CTLFLAG_RW, &sc->sc_ledidle, 0,
 		"idle time for inactivity LED (ticks)");
 	SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
@@ -6608,7 +6608,7 @@ ath_sysctlattach(struct ath_softc *sc)
 			"diversity", CTLTYPE_INT | CTLFLAG_RW, sc, 0,
 			ath_sysctl_diversity, "I", "antenna diversity");
 	sc->sc_txintrperiod = ATH_TXINTR_PERIOD;
-	SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+	SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
 		"txintrperiod", CTLFLAG_RW, &sc->sc_txintrperiod, 0,
 		"tx descriptor batching");
 	SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
@@ -6642,7 +6642,7 @@ ath_sysctlattach(struct ath_softc *sc)
 			ath_sysctl_intmit, "I", "interference mitigation");
 	}
 	sc->sc_monpass = HAL_RXERR_DECRYPT | HAL_RXERR_MIC;
-	SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+	SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
 		"monpass", CTLFLAG_RW, &sc->sc_monpass, 0,
 		"mask of error frames to pass when monitoring");
 #ifdef IEEE80211_SUPPORT_TDMA

Modified: head/sys/dev/bce/if_bce.c
==============================================================================
--- head/sys/dev/bce/if_bce.c	Wed Jan 12 19:53:50 2011	(r217322)
+++ head/sys/dev/bce/if_bce.c	Wed Jan 12 19:53:56 2011	(r217323)
@@ -507,14 +507,14 @@ SYSCTL_NODE(_hw, OID_AUTO, bce, CTLFLAG_
 /* Allowable values are TRUE or FALSE */
 static int bce_tso_enable = TRUE;
 TUNABLE_INT("hw.bce.tso_enable", &bce_tso_enable);
-SYSCTL_UINT(_hw_bce, OID_AUTO, tso_enable, CTLFLAG_RDTUN, &bce_tso_enable, 0,
+SYSCTL_INT(_hw_bce, OID_AUTO, tso_enable, CTLFLAG_RDTUN, &bce_tso_enable, 0,
 "TSO Enable/Disable");
 
 /* Allowable values are 0 (IRQ), 1 (MSI/IRQ), and 2 (MSI-X/MSI/IRQ) */
 /* ToDo: Add MSI-X support. */
 static int bce_msi_enable = 1;
 TUNABLE_INT("hw.bce.msi_enable", &bce_msi_enable);
-SYSCTL_UINT(_hw_bce, OID_AUTO, msi_enable, CTLFLAG_RDTUN, &bce_msi_enable, 0,
+SYSCTL_INT(_hw_bce, OID_AUTO, msi_enable, CTLFLAG_RDTUN, &bce_msi_enable, 0,
 "MSI-X|MSI|INTx selector");
 
 /* ToDo: Add tunable to enable/disable strict MTU handling. */
@@ -8487,7 +8487,7 @@ bce_add_sysctls(struct bce_softc *sc)
 	    0, "Number of simulated l2_fhdr errors");
 #endif
 
-	SYSCTL_ADD_INT(ctx, children, OID_AUTO,
+	SYSCTL_ADD_UINT(ctx, children, OID_AUTO,
 	    "l2fhdr_error_count",
 	    CTLFLAG_RD, &sc->l2fhdr_error_count,
 	    0, "Number of l2_fhdr errors");
@@ -8498,18 +8498,18 @@ bce_add_sysctls(struct bce_softc *sc)
 	    CTLFLAG_RW, &mbuf_alloc_failed_sim_control,
 	    0, "Debug control to force mbuf allocation failures");
 
-	SYSCTL_ADD_INT(ctx, children, OID_AUTO,
+	SYSCTL_ADD_UINT(ctx, children, OID_AUTO,
 	    "mbuf_alloc_failed_sim_count",
 	    CTLFLAG_RD, &sc->mbuf_alloc_failed_sim_count,
 	    0, "Number of simulated mbuf cluster allocation failures");
 #endif
 
-	SYSCTL_ADD_INT(ctx, children, OID_AUTO,
+	SYSCTL_ADD_UINT(ctx, children, OID_AUTO,
 	    "mbuf_alloc_failed_count",
 	    CTLFLAG_RD, &sc->mbuf_alloc_failed_count,
 	    0, "Number of mbuf allocation failures");
 
-	SYSCTL_ADD_INT(ctx, children, OID_AUTO,
+	SYSCTL_ADD_UINT(ctx, children, OID_AUTO,
 	    "mbuf_frag_count",
 	    CTLFLAG_RD, &sc->mbuf_frag_count,
 	    0, "Number of fragmented mbufs");
@@ -8521,19 +8521,19 @@ bce_add_sysctls(struct bce_softc *sc)
 	    0, "Debug control to force DMA mapping failures");
 
 	/* ToDo: Figure out how to update this value in bce_dma_map_addr(). */
-	SYSCTL_ADD_INT(ctx, children, OID_AUTO,
+	SYSCTL_ADD_UINT(ctx, children, OID_AUTO,
 	    "dma_map_addr_failed_sim_count",
 	    CTLFLAG_RD, &sc->dma_map_addr_failed_sim_count,
 	    0, "Number of simulated DMA mapping failures");
 
 #endif
 
-	SYSCTL_ADD_INT(ctx, children, OID_AUTO,
+	SYSCTL_ADD_UINT(ctx, children, OID_AUTO,
 	    "dma_map_addr_rx_failed_count",
 	    CTLFLAG_RD, &sc->dma_map_addr_rx_failed_count,
 	    0, "Number of RX DMA mapping failures");
 
-	SYSCTL_ADD_INT(ctx, children, OID_AUTO,
+	SYSCTL_ADD_UINT(ctx, children, OID_AUTO,
 	    "dma_map_addr_tx_failed_count",
 	    CTLFLAG_RD, &sc->dma_map_addr_tx_failed_count,
 	    0, "Number of TX DMA mapping failures");
@@ -8544,13 +8544,13 @@ bce_add_sysctls(struct bce_softc *sc)
 	    CTLFLAG_RW, &unexpected_attention_sim_control,
 	    0, "Debug control to simulate unexpected attentions");
 
-	SYSCTL_ADD_INT(ctx, children, OID_AUTO,
+	SYSCTL_ADD_UINT(ctx, children, OID_AUTO,
 	    "unexpected_attention_sim_count",
 	    CTLFLAG_RW, &sc->unexpected_attention_sim_count,
 	    0, "Number of simulated unexpected attentions");
 #endif
 
-	SYSCTL_ADD_INT(ctx, children, OID_AUTO,
+	SYSCTL_ADD_UINT(ctx, children, OID_AUTO,
 	    "unexpected_attention_count",
 	    CTLFLAG_RW, &sc->unexpected_attention_count,
 	    0, "Number of unexpected attentions");

Modified: head/sys/dev/bge/if_bge.c
==============================================================================
--- head/sys/dev/bge/if_bge.c	Wed Jan 12 19:53:50 2011	(r217322)
+++ head/sys/dev/bge/if_bge.c	Wed Jan 12 19:53:56 2011	(r217323)
@@ -5546,7 +5546,7 @@ bge_add_sysctl_stats(struct bge_softc *s
 #undef BGE_SYSCTL_STAT
 
 #define	BGE_SYSCTL_STAT_ADD64(c, h, n, p, d)	\
-	    SYSCTL_ADD_QUAD(c, h, OID_AUTO, n, CTLFLAG_RD, p, d)
+	    SYSCTL_ADD_UQUAD(c, h, OID_AUTO, n, CTLFLAG_RD, p, d)
 
 static void
 bge_add_sysctl_stats_regs(struct bge_softc *sc, struct sysctl_ctx_list *ctx,

Modified: head/sys/dev/bwi/if_bwi.c
==============================================================================
--- head/sys/dev/bwi/if_bwi.c	Wed Jan 12 19:53:50 2011	(r217322)
+++ head/sys/dev/bwi/if_bwi.c	Wed Jan 12 19:53:56 2011	(r217323)
@@ -537,11 +537,11 @@ bwi_attach(struct bwi_softc *sc)
 	/*
 	 * Add sysctl nodes
 	 */
-	SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev),
+	SYSCTL_ADD_INT(device_get_sysctl_ctx(dev),
 		        SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO,
 		        "fw_version", CTLFLAG_RD, &sc->sc_fw_version, 0,
 		        "Firmware version");
-	SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev),
+	SYSCTL_ADD_INT(device_get_sysctl_ctx(dev),
 		        SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO,
 		        "led_idle", CTLFLAG_RW, &sc->sc_led_idle, 0,
 		        "# ticks before LED enters idle state");

Modified: head/sys/dev/bwn/if_bwn.c
==============================================================================
--- head/sys/dev/bwn/if_bwn.c	Wed Jan 12 19:53:50 2011	(r217322)
+++ head/sys/dev/bwn/if_bwn.c	Wed Jan 12 19:53:56 2011	(r217323)
@@ -14211,13 +14211,13 @@ bwn_sysctl_node(struct bwn_softc *sc)
 		return;
 	stats = &mac->mac_stats;
 
-	SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev),
+	SYSCTL_ADD_INT(device_get_sysctl_ctx(dev),
 	    SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO,
 	    "linknoise", CTLFLAG_RW, &stats->rts, 0, "Noise level");
-	SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev),
+	SYSCTL_ADD_INT(device_get_sysctl_ctx(dev),
 	    SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO,
 	    "rts", CTLFLAG_RW, &stats->rts, 0, "RTS");
-	SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev),
+	SYSCTL_ADD_INT(device_get_sysctl_ctx(dev),
 	    SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO,
 	    "rtsfail", CTLFLAG_RW, &stats->rtsfail, 0, "RTS failed to send");
 

Modified: head/sys/dev/ed/if_ed.c
==============================================================================
--- head/sys/dev/ed/if_ed.c	Wed Jan 12 19:53:50 2011	(r217322)
+++ head/sys/dev/ed/if_ed.c	Wed Jan 12 19:53:56 2011	(r217323)
@@ -323,19 +323,19 @@ ed_attach(device_t dev)
 	sc->rx_mem = (sc->rec_page_stop - sc->rec_page_start) * ED_PAGE_SIZE;
 	SYSCTL_ADD_STRING(device_get_sysctl_ctx(dev),
 	    SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
-	    0, "type", CTLTYPE_STRING | CTLFLAG_RD, sc->type_str, 0,
+	    0, "type", CTLFLAG_RD, sc->type_str, 0,
 	    "Type of chip in card");
 	SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev),
 	    SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
-	    1, "TxMem", CTLTYPE_STRING | CTLFLAG_RD, &sc->tx_mem, 0,
+	    1, "TxMem", CTLFLAG_RD, &sc->tx_mem, 0,
 	    "Memory set aside for transmitting packets");
 	SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev),
 	    SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
-	    2, "RxMem", CTLTYPE_STRING | CTLFLAG_RD, &sc->rx_mem, 0,
+	    2, "RxMem", CTLFLAG_RD, &sc->rx_mem, 0,
 	    "Memory  set aside for receiving packets");
-	SYSCTL_ADD_INT(device_get_sysctl_ctx(dev),
+	SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev),
 	    SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
-	    3, "Mem", CTLTYPE_STRING | CTLFLAG_RD, &sc->mem_size, 0,
+	    3, "Mem", CTLFLAG_RD, &sc->mem_size, 0,
 	    "Total Card Memory");
 	if (bootverbose) {
 		if (sc->type_str && (*sc->type_str != 0))

Modified: head/sys/dev/iscsi/initiator/iscsi.c
==============================================================================
--- head/sys/dev/iscsi/initiator/iscsi.c	Wed Jan 12 19:53:50 2011	(r217322)
+++ head/sys/dev/iscsi/initiator/iscsi.c	Wed Jan 12 19:53:56 2011	(r217323)
@@ -229,12 +229,9 @@ iscsi_ioctl(struct cdev *dev, u_long cmd
 	  error = sp->soc == NULL? ENOTCONN: i_fullfeature(dev, 1);
 	  if(error == 0) {
 	       sp->proc = td->td_proc;
-	       SYSCTL_ADD_UINT(&sp->clist,
-			       SYSCTL_CHILDREN(sp->oid),
-			       OID_AUTO,
-			       "pid",
-			       CTLFLAG_RD,
-			       &sp->proc->p_pid, sizeof(pid_t), "control process id");
+	       SYSCTL_ADD_INT(&sp->clist, SYSCTL_CHILDREN(sp->oid),
+		   OID_AUTO, "pid", CTLFLAG_RD,
+		   &sp->proc->p_pid, sizeof(pid_t), "control process id");
 	  }
 	  break;
 

Modified: head/sys/dev/iwi/if_iwi.c
==============================================================================
--- head/sys/dev/iwi/if_iwi.c	Wed Jan 12 19:53:50 2011	(r217322)
+++ head/sys/dev/iwi/if_iwi.c	Wed Jan 12 19:53:56 2011	(r217323)
@@ -3515,14 +3515,14 @@ iwi_ledattach(struct iwi_softc *sc)
 	SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
 		"softled", CTLTYPE_INT | CTLFLAG_RW, sc, 0,
 		iwi_sysctl_softled, "I", "enable/disable software LED support");
-	SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+	SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
 		"ledpin", CTLFLAG_RW, &sc->sc_ledpin, 0,
 		"pin setting to turn activity LED on");
-	SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+	SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
 		"ledidle", CTLFLAG_RW, &sc->sc_ledidle, 0,
 		"idle time for inactivity LED (ticks)");
 	/* XXX for debugging */
-	SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+	SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
 		"nictype", CTLFLAG_RD, &sc->sc_nictype, 0,
 		"NIC type from EEPROM");
 

Modified: head/sys/dev/mps/mps.c
==============================================================================
--- head/sys/dev/mps/mps.c	Wed Jan 12 19:53:50 2011	(r217322)
+++ head/sys/dev/mps/mps.c	Wed Jan 12 19:53:56 2011	(r217323)
@@ -846,11 +846,11 @@ mps_attach(struct mps_softc *sc)
 	if (sc->sysctl_tree == NULL)
 		return (ENOMEM);
 
-	SYSCTL_ADD_INT(&sc->sysctl_ctx, SYSCTL_CHILDREN(sc->sysctl_tree),
+	SYSCTL_ADD_UINT(&sc->sysctl_ctx, SYSCTL_CHILDREN(sc->sysctl_tree),
 	    OID_AUTO, "debug_level", CTLFLAG_RW, &sc->mps_debug, 0,
 	    "mps debug level");
 
-	SYSCTL_ADD_INT(&sc->sysctl_ctx, SYSCTL_CHILDREN(sc->sysctl_tree),
+	SYSCTL_ADD_UINT(&sc->sysctl_ctx, SYSCTL_CHILDREN(sc->sysctl_tree),
 	    OID_AUTO, "allow_multiple_tm_cmds", CTLFLAG_RW,
 	    &sc->allow_multiple_tm_cmds, 0,
 	    "allow multiple simultaneous task management cmds");

Modified: head/sys/dev/mpt/mpt.c
==============================================================================
--- head/sys/dev/mpt/mpt.c	Wed Jan 12 19:53:50 2011	(r217322)
+++ head/sys/dev/mpt/mpt.c	Wed Jan 12 19:53:56 2011	(r217323)
@@ -2126,10 +2126,10 @@ mpt_sysctl_attach(struct mpt_softc *mpt)
 	struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(mpt->dev);
 	struct sysctl_oid *tree = device_get_sysctl_tree(mpt->dev);
 
-	SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+	SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
 		       "debug", CTLFLAG_RW, &mpt->verbose, 0,
 		       "Debugging/Verbose level");
-	SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+	SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
 		       "role", CTLFLAG_RD, &mpt->role, 0,
 		       "HBA role");
 #ifdef	MPT_TEST_MULTIPATH

Modified: head/sys/dev/mpt/mpt_raid.c
==============================================================================
--- head/sys/dev/mpt/mpt_raid.c	Wed Jan 12 19:53:50 2011	(r217322)
+++ head/sys/dev/mpt/mpt_raid.c	Wed Jan 12 19:53:56 2011	(r217323)
@@ -1824,7 +1824,7 @@ mpt_raid_sysctl_attach(struct mpt_softc 
 			"vol_resync_rate", CTLTYPE_INT | CTLFLAG_RW, mpt, 0,
 			mpt_raid_sysctl_vol_resync_rate, "I",
 			"volume resync priority (0 == NC, 1 - 255)");
-	SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+	SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
 			"nonoptimal_volumes", CTLFLAG_RD,
 			&mpt->raid_nonopt_volumes, 0,
 			"number of nonoptimal volumes");

Modified: head/sys/dev/nfe/if_nfe.c
==============================================================================
--- head/sys/dev/nfe/if_nfe.c	Wed Jan 12 19:53:50 2011	(r217322)
+++ head/sys/dev/nfe/if_nfe.c	Wed Jan 12 19:53:56 2011	(r217323)
@@ -3075,7 +3075,7 @@ sysctl_hw_nfe_proc_limit(SYSCTL_HANDLER_
 #define	NFE_SYSCTL_STAT_ADD32(c, h, n, p, d)	\
 	    SYSCTL_ADD_UINT(c, h, OID_AUTO, n, CTLFLAG_RD, p, 0, d)
 #define	NFE_SYSCTL_STAT_ADD64(c, h, n, p, d)	\
-	    SYSCTL_ADD_QUAD(c, h, OID_AUTO, n, CTLFLAG_RD, p, d)
+	    SYSCTL_ADD_UQUAD(c, h, OID_AUTO, n, CTLFLAG_RD, p, d)
 
 static void
 nfe_sysctl_node(struct nfe_softc *sc)

Modified: head/sys/dev/pccbb/pccbb.c
==============================================================================
--- head/sys/dev/pccbb/pccbb.c	Wed Jan 12 19:53:50 2011	(r217322)
+++ head/sys/dev/pccbb/pccbb.c	Wed Jan 12 19:53:56 2011	(r217323)
@@ -152,7 +152,7 @@ SYSCTL_ULONG(_hw_cbb, OID_AUTO, start_32
 
 int cbb_debug = 0;
 TUNABLE_INT("hw.cbb.debug", &cbb_debug);
-SYSCTL_ULONG(_hw_cbb, OID_AUTO, debug, CTLFLAG_RW, &cbb_debug, 0,
+SYSCTL_INT(_hw_cbb, OID_AUTO, debug, CTLFLAG_RW, &cbb_debug, 0,
     "Verbose cardbus bridge debugging");
 
 static void	cbb_insert(struct cbb_softc *sc);

Modified: head/sys/dev/sound/pcm/sound.c
==============================================================================
--- head/sys/dev/sound/pcm/sound.c	Wed Jan 12 19:53:50 2011	(r217322)
+++ head/sys/dev/sound/pcm/sound.c	Wed Jan 12 19:53:56 2011	(r217323)
@@ -1068,7 +1068,7 @@ pcm_register(device_t dev, void *devinfo
 	    CTLFLAG_RD, 0, "record channels node");
 	/* XXX: an user should be able to set this with a control tool, the
 	   sysadmin then needs min+max sysctls for this */
-	SYSCTL_ADD_INT(device_get_sysctl_ctx(dev),
+	SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev),
 	    SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
             OID_AUTO, "buffersize", CTLFLAG_RD, &d->bufsz, 0, "allocated buffer size");
 	SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),

Modified: head/sys/dev/ste/if_ste.c
==============================================================================
--- head/sys/dev/ste/if_ste.c	Wed Jan 12 19:53:50 2011	(r217322)
+++ head/sys/dev/ste/if_ste.c	Wed Jan 12 19:53:56 2011	(r217323)
@@ -2180,7 +2180,7 @@ ste_resume(device_t dev)
 #define	STE_SYSCTL_STAT_ADD32(c, h, n, p, d)	\
 	    SYSCTL_ADD_UINT(c, h, OID_AUTO, n, CTLFLAG_RD, p, 0, d)
 #define	STE_SYSCTL_STAT_ADD64(c, h, n, p, d)	\
-	    SYSCTL_ADD_QUAD(c, h, OID_AUTO, n, CTLFLAG_RD, p, d)
+	    SYSCTL_ADD_UQUAD(c, h, OID_AUTO, n, CTLFLAG_RD, p, d)
 
 static void
 ste_sysctl_node(struct ste_softc *sc)

Modified: head/sys/dev/txp/if_txp.c
==============================================================================
--- head/sys/dev/txp/if_txp.c	Wed Jan 12 19:53:50 2011	(r217322)
+++ head/sys/dev/txp/if_txp.c	Wed Jan 12 19:53:56 2011	(r217323)
@@ -2859,7 +2859,10 @@ txp_stats_update(struct txp_softc *sc, s
 #define	TXP_SYSCTL_STAT_ADD32(c, h, n, p, d)	\
 	    SYSCTL_ADD_UINT(c, h, OID_AUTO, n, CTLFLAG_RD, p, 0, d)
 
-#if __FreeBSD_version > 800000
+#if __FreeBSD_version >= 900030
+#define	TXP_SYSCTL_STAT_ADD64(c, h, n, p, d)	\
+	    SYSCTL_ADD_UQUAD(c, h, OID_AUTO, n, CTLFLAG_RD, p, d)
+#elif __FreeBSD_version > 800000
 #define	TXP_SYSCTL_STAT_ADD64(c, h, n, p, d)	\
 	    SYSCTL_ADD_QUAD(c, h, OID_AUTO, n, CTLFLAG_RD, p, d)
 #else

Modified: head/sys/dev/usb/input/atp.c
==============================================================================
--- head/sys/dev/usb/input/atp.c	Wed Jan 12 19:53:50 2011	(r217322)
+++ head/sys/dev/usb/input/atp.c	Wed Jan 12 19:53:56 2011	(r217323)
@@ -129,11 +129,11 @@ SYSCTL_INT(_hw_usb_atp, OID_AUTO, debug,
 #endif /* USB_DEBUG */
 
 static u_int atp_touch_timeout = ATP_TOUCH_TIMEOUT;
-SYSCTL_INT(_hw_usb_atp, OID_AUTO, touch_timeout, CTLFLAG_RW, &atp_touch_timeout,
-    125000, "age threshold (in micros) for a touch");
+SYSCTL_UINT(_hw_usb_atp, OID_AUTO, touch_timeout, CTLFLAG_RW,
+    &atp_touch_timeout, 125000, "age threshold (in micros) for a touch");
 
 static u_int atp_double_tap_threshold = ATP_DOUBLE_TAP_N_DRAG_THRESHOLD;
-SYSCTL_INT(_hw_usb_atp, OID_AUTO, double_tap_threshold, CTLFLAG_RW,
+SYSCTL_UINT(_hw_usb_atp, OID_AUTO, double_tap_threshold, CTLFLAG_RW,
     &atp_double_tap_threshold, ATP_DOUBLE_TAP_N_DRAG_THRESHOLD,
     "maximum time (in micros) between a double-tap");
 



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