summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/acpi_support/acpi_ibm.c4
-rw-r--r--sys/dev/ae/if_ae.c91
-rw-r--r--sys/dev/alc/if_alc.c2
-rw-r--r--sys/dev/ale/if_ale.c5
-rw-r--r--sys/dev/ath/if_ath.c12
-rw-r--r--sys/dev/bce/if_bce.c22
-rw-r--r--sys/dev/bge/if_bge.c2
-rw-r--r--sys/dev/bwi/if_bwi.c4
-rw-r--r--sys/dev/bwn/if_bwn.c6
-rw-r--r--sys/dev/ed/if_ed.c10
-rw-r--r--sys/dev/iscsi/initiator/iscsi.c9
-rw-r--r--sys/dev/iwi/if_iwi.c6
-rw-r--r--sys/dev/mps/mps.c4
-rw-r--r--sys/dev/mpt/mpt.c4
-rw-r--r--sys/dev/mpt/mpt_raid.c2
-rw-r--r--sys/dev/nfe/if_nfe.c2
-rw-r--r--sys/dev/pccbb/pccbb.c2
-rw-r--r--sys/dev/sound/pcm/sound.c2
-rw-r--r--sys/dev/ste/if_ste.c2
-rw-r--r--sys/dev/txp/if_txp.c5
-rw-r--r--sys/dev/usb/input/atp.c6
21 files changed, 102 insertions, 100 deletions
diff --git a/sys/dev/acpi_support/acpi_ibm.c b/sys/dev/acpi_support/acpi_ibm.c
index 380f976..d2be5dd 100644
--- a/sys/dev/acpi_support/acpi_ibm.c
+++ b/sys/dev/acpi_support/acpi_ibm.c
@@ -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");
diff --git a/sys/dev/ae/if_ae.c b/sys/dev/ae/if_ae.c
index fbabf8e..d315607 100644
--- a/sys/dev/ae/if_ae.c
+++ b/sys/dev/ae/if_ae.c
@@ -207,43 +207,6 @@ TUNABLE_INT("hw.ae.msi_disable", &msi_disable);
#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
diff --git a/sys/dev/alc/if_alc.c b/sys/dev/alc/if_alc.c
index 9f06921..d50cfe7 100644
--- a/sys/dev/alc/if_alc.c
+++ b/sys/dev/alc/if_alc.c
@@ -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)
diff --git a/sys/dev/ale/if_ale.c b/sys/dev/ale/if_ale.c
index c0238b2..af83c03 100644
--- a/sys/dev/ale/if_ale.c
+++ b/sys/dev/ale/if_ale.c
@@ -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
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c
index b919249..be9f92f 100644
--- a/sys/dev/ath/if_ath.c
+++ b/sys/dev/ath/if_ath.c
@@ -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
diff --git a/sys/dev/bce/if_bce.c b/sys/dev/bce/if_bce.c
index c9200f3..3d919d2 100644
--- a/sys/dev/bce/if_bce.c
+++ b/sys/dev/bce/if_bce.c
@@ -507,14 +507,14 @@ SYSCTL_NODE(_hw, OID_AUTO, bce, CTLFLAG_RD, 0, "bce driver parameters");
/* 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");
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c
index 9bec08b..e5318c2 100644
--- a/sys/dev/bge/if_bge.c
+++ b/sys/dev/bge/if_bge.c
@@ -5546,7 +5546,7 @@ bge_add_sysctl_stats(struct bge_softc *sc, struct sysctl_ctx_list *ctx,
#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,
diff --git a/sys/dev/bwi/if_bwi.c b/sys/dev/bwi/if_bwi.c
index 5501c13..23a9e5f 100644
--- a/sys/dev/bwi/if_bwi.c
+++ b/sys/dev/bwi/if_bwi.c
@@ -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");
diff --git a/sys/dev/bwn/if_bwn.c b/sys/dev/bwn/if_bwn.c
index b2f72f5..f75c1ad 100644
--- a/sys/dev/bwn/if_bwn.c
+++ b/sys/dev/bwn/if_bwn.c
@@ -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");
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c
index 6213ce7..b0e1c0c 100644
--- a/sys/dev/ed/if_ed.c
+++ b/sys/dev/ed/if_ed.c
@@ -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))
diff --git a/sys/dev/iscsi/initiator/iscsi.c b/sys/dev/iscsi/initiator/iscsi.c
index 5d7a5b7f..d35f631 100644
--- a/sys/dev/iscsi/initiator/iscsi.c
+++ b/sys/dev/iscsi/initiator/iscsi.c
@@ -229,12 +229,9 @@ iscsi_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int mode, struct thread *
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;
diff --git a/sys/dev/iwi/if_iwi.c b/sys/dev/iwi/if_iwi.c
index de2bfb1..dc81309 100644
--- a/sys/dev/iwi/if_iwi.c
+++ b/sys/dev/iwi/if_iwi.c
@@ -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");
diff --git a/sys/dev/mps/mps.c b/sys/dev/mps/mps.c
index 788b102..3780fc9 100644
--- a/sys/dev/mps/mps.c
+++ b/sys/dev/mps/mps.c
@@ -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");
diff --git a/sys/dev/mpt/mpt.c b/sys/dev/mpt/mpt.c
index 1ca4ef9..12f0949 100644
--- a/sys/dev/mpt/mpt.c
+++ b/sys/dev/mpt/mpt.c
@@ -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
diff --git a/sys/dev/mpt/mpt_raid.c b/sys/dev/mpt/mpt_raid.c
index d6e91ce..11650ed 100644
--- a/sys/dev/mpt/mpt_raid.c
+++ b/sys/dev/mpt/mpt_raid.c
@@ -1824,7 +1824,7 @@ mpt_raid_sysctl_attach(struct mpt_softc *mpt)
"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");
diff --git a/sys/dev/nfe/if_nfe.c b/sys/dev/nfe/if_nfe.c
index cac32a4..036a051 100644
--- a/sys/dev/nfe/if_nfe.c
+++ b/sys/dev/nfe/if_nfe.c
@@ -3075,7 +3075,7 @@ sysctl_hw_nfe_proc_limit(SYSCTL_HANDLER_ARGS)
#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)
diff --git a/sys/dev/pccbb/pccbb.c b/sys/dev/pccbb/pccbb.c
index a0585b0..bbb9eae 100644
--- a/sys/dev/pccbb/pccbb.c
+++ b/sys/dev/pccbb/pccbb.c
@@ -152,7 +152,7 @@ SYSCTL_ULONG(_hw_cbb, OID_AUTO, start_32_io, CTLFLAG_RW,
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);
diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c
index 08a831a..caa7841 100644
--- a/sys/dev/sound/pcm/sound.c
+++ b/sys/dev/sound/pcm/sound.c
@@ -1068,7 +1068,7 @@ pcm_register(device_t dev, void *devinfo, int numplay, int numrec)
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),
diff --git a/sys/dev/ste/if_ste.c b/sys/dev/ste/if_ste.c
index f616e50..e201d42 100644
--- a/sys/dev/ste/if_ste.c
+++ b/sys/dev/ste/if_ste.c
@@ -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)
diff --git a/sys/dev/txp/if_txp.c b/sys/dev/txp/if_txp.c
index 9396f4d..52d5c5f 100644
--- a/sys/dev/txp/if_txp.c
+++ b/sys/dev/txp/if_txp.c
@@ -2859,7 +2859,10 @@ txp_stats_update(struct txp_softc *sc, struct txp_rsp_desc *rsp)
#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
diff --git a/sys/dev/usb/input/atp.c b/sys/dev/usb/input/atp.c
index 1ec6f27..fab60a2 100644
--- a/sys/dev/usb/input/atp.c
+++ b/sys/dev/usb/input/atp.c
@@ -129,11 +129,11 @@ SYSCTL_INT(_hw_usb_atp, OID_AUTO, debug, CTLFLAG_RW,
#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");
OpenPOWER on IntegriCloud