1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-27 08:00:11 +00:00

Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (2 of many)

r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are
still not MPSAFE (or already are but aren’t properly marked). Use it in
preparation for a general review of all nodes.
This is non-functional change that adds annotations to SYSCTL_NODE and
SYSCTL_PROC nodes using one of the soon-to-be-required flags.

Reviewed by:	hselasky, kib
Approved by:	kib (mentor)
Differential Revision:	https://reviews.freebsd.org/D23632
This commit is contained in:
Pawel Biernacki 2020-02-15 18:52:12 +00:00
parent e0d69c5a88
commit f8d2b1f3f7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=357972
90 changed files with 244 additions and 158 deletions

View File

@ -102,7 +102,8 @@ static int uaudio_buffer_ms = 8;
#ifdef USB_DEBUG
static int uaudio_debug;
static SYSCTL_NODE(_hw_usb, OID_AUTO, uaudio, CTLFLAG_RW, 0, "USB uaudio");
static SYSCTL_NODE(_hw_usb, OID_AUTO, uaudio, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB uaudio");
SYSCTL_INT(_hw_usb_uaudio, OID_AUTO, debug, CTLFLAG_RWTUN,
&uaudio_debug, 0, "uaudio debug level");
@ -133,8 +134,9 @@ uaudio_buffer_ms_sysctl(SYSCTL_HANDLER_ARGS)
return (0);
}
SYSCTL_PROC(_hw_usb_uaudio, OID_AUTO, buffer_ms, CTLTYPE_INT | CTLFLAG_RWTUN,
0, sizeof(int), uaudio_buffer_ms_sysctl, "I",
SYSCTL_PROC(_hw_usb_uaudio, OID_AUTO, buffer_ms,
CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, 0, sizeof(int),
uaudio_buffer_ms_sysctl, "I",
"uaudio buffering delay from 2ms to 8ms");
#else
#define uaudio_debug 0
@ -2905,7 +2907,7 @@ uaudio_mixer_register_sysctl(struct uaudio_softc *sc, device_t dev)
mixer_tree = SYSCTL_ADD_NODE(device_get_sysctl_ctx(dev),
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "mixer",
CTLFLAG_RD, NULL, "");
CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "");
if (mixer_tree == NULL)
return;
@ -2925,15 +2927,17 @@ uaudio_mixer_register_sysctl(struct uaudio_softc *sc, device_t dev)
control_tree = SYSCTL_ADD_NODE(device_get_sysctl_ctx(dev),
SYSCTL_CHILDREN(mixer_tree), OID_AUTO, buf,
CTLFLAG_RD, NULL, "Mixer control nodes");
CTLFLAG_RD | CTLFLAG_MPSAFE, NULL,
"Mixer control nodes");
if (control_tree == NULL)
continue;
SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
SYSCTL_CHILDREN(control_tree),
OID_AUTO, "val", CTLTYPE_INT | CTLFLAG_RWTUN, sc,
pmc->wValue[chan],
OID_AUTO, "val",
CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE,
sc, pmc->wValue[chan],
uaudio_mixer_sysctl_handler, "I", "Current value");
SYSCTL_ADD_INT(device_get_sysctl_ctx(dev),

View File

@ -88,7 +88,7 @@
#ifdef USB_DEBUG
static int atmegadci_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, atmegadci, CTLFLAG_RW, 0,
static SYSCTL_NODE(_hw_usb, OID_AUTO, atmegadci, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB ATMEGA DCI");
SYSCTL_INT(_hw_usb_atmegadci, OID_AUTO, debug, CTLFLAG_RWTUN,
&atmegadci_debug, 0, "ATMEGA DCI debug level");

View File

@ -87,7 +87,9 @@
#ifdef USB_DEBUG
static int avr32dci_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, avr32dci, CTLFLAG_RW, 0, "USB AVR32 DCI");
static SYSCTL_NODE(_hw_usb, OID_AUTO, avr32dci,
CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB AVR32 DCI");
SYSCTL_INT(_hw_usb_avr32dci, OID_AUTO, debug, CTLFLAG_RWTUN,
&avr32dci_debug, 0, "AVR32 DCI debug level");
#endif

View File

@ -106,7 +106,8 @@
static int dwc_otg_phy_type = DWC_OTG_PHY_DEFAULT;
static SYSCTL_NODE(_hw_usb, OID_AUTO, dwc_otg, CTLFLAG_RW, 0, "USB DWC OTG");
static SYSCTL_NODE(_hw_usb, OID_AUTO, dwc_otg, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB DWC OTG");
SYSCTL_INT(_hw_usb_dwc_otg, OID_AUTO, phy_type, CTLFLAG_RDTUN,
&dwc_otg_phy_type, 0, "DWC OTG PHY TYPE - 0/1/2/3 - ULPI/HSIC/INTERNAL/UTMI+");

View File

@ -99,7 +99,8 @@ static int ehcinohighspeed = 0;
static int ehciiaadbug = 0;
static int ehcilostintrbug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, ehci, CTLFLAG_RW, 0, "USB ehci");
static SYSCTL_NODE(_hw_usb, OID_AUTO, ehci, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB ehci");
SYSCTL_INT(_hw_usb_ehci, OID_AUTO, debug, CTLFLAG_RWTUN,
&ehcidebug, 0, "Debug level");
SYSCTL_INT(_hw_usb_ehci, OID_AUTO, no_hs, CTLFLAG_RWTUN,

View File

@ -91,7 +91,8 @@
#ifdef USB_DEBUG
static int musbotgdebug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, musbotg, CTLFLAG_RW, 0, "USB musbotg");
static SYSCTL_NODE(_hw_usb, OID_AUTO, musbotg, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB musbotg");
SYSCTL_INT(_hw_usb_musbotg, OID_AUTO, debug, CTLFLAG_RWTUN,
&musbotgdebug, 0, "Debug level");
#endif

View File

@ -85,7 +85,8 @@
#ifdef USB_DEBUG
static int ohcidebug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, ohci, CTLFLAG_RW, 0, "USB ohci");
static SYSCTL_NODE(_hw_usb, OID_AUTO, ohci, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB ohci");
SYSCTL_INT(_hw_usb_ohci, OID_AUTO, debug, CTLFLAG_RWTUN,
&ohcidebug, 0, "ohci debug level");

View File

@ -97,7 +97,7 @@ static int saf1761_otg_debug = 0;
static int saf1761_otg_forcefs = 0;
static
SYSCTL_NODE(_hw_usb, OID_AUTO, saf1761_otg, CTLFLAG_RW, 0,
SYSCTL_NODE(_hw_usb, OID_AUTO, saf1761_otg, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB SAF1761 DCI");
SYSCTL_INT(_hw_usb_saf1761_otg, OID_AUTO, debug, CTLFLAG_RWTUN,

View File

@ -90,7 +90,8 @@
static int uhcidebug = 0;
static int uhcinoloop = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, uhci, CTLFLAG_RW, 0, "USB uhci");
static SYSCTL_NODE(_hw_usb, OID_AUTO, uhci, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB uhci");
SYSCTL_INT(_hw_usb_uhci, OID_AUTO, debug, CTLFLAG_RWTUN,
&uhcidebug, 0, "uhci debug level");
SYSCTL_INT(_hw_usb_uhci, OID_AUTO, loop, CTLFLAG_RWTUN,

View File

@ -86,7 +86,8 @@ static void usb_attach_sub(device_t, struct usb_bus *);
#ifdef USB_DEBUG
static int usb_ctrl_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, ctrl, CTLFLAG_RW, 0, "USB controller");
static SYSCTL_NODE(_hw_usb, OID_AUTO, ctrl, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB controller");
SYSCTL_INT(_hw_usb_ctrl, OID_AUTO, debug, CTLFLAG_RWTUN, &usb_ctrl_debug, 0,
"Debug level");
#endif

View File

@ -89,7 +89,7 @@
#ifdef USB_DEBUG
static int uss820dcidebug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, uss820dci, CTLFLAG_RW, 0,
static SYSCTL_NODE(_hw_usb, OID_AUTO, uss820dci, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB uss820dci");
SYSCTL_INT(_hw_usb_uss820dci, OID_AUTO, debug, CTLFLAG_RWTUN,
&uss820dcidebug, 0, "uss820dci debug level");

View File

@ -89,7 +89,8 @@
((struct xhci_softc *)(((uint8_t *)(bus)) - \
((uint8_t *)&(((struct xhci_softc *)0)->sc_bus))))
static SYSCTL_NODE(_hw_usb, OID_AUTO, xhci, CTLFLAG_RW, 0, "USB XHCI");
static SYSCTL_NODE(_hw_usb, OID_AUTO, xhci, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB XHCI");
static int xhcistreams;
SYSCTL_INT(_hw_usb_xhci, OID_AUTO, streams, CTLFLAG_RWTUN,

View File

@ -96,7 +96,8 @@ struct g_audio_softc {
uint8_t sc_sample_rate[32];
};
static SYSCTL_NODE(_hw_usb, OID_AUTO, g_audio, CTLFLAG_RW, 0, "USB audio gadget");
static SYSCTL_NODE(_hw_usb, OID_AUTO, g_audio, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB audio gadget");
#ifdef USB_DEBUG
static int g_audio_debug = 0;

View File

@ -61,7 +61,9 @@ __FBSDID("$FreeBSD$");
#include <dev/usb/gadget/g_keyboard.h>
static SYSCTL_NODE(_hw_usb, OID_AUTO, g_keyboard, CTLFLAG_RW, 0, "USB keyboard gadget");
static SYSCTL_NODE(_hw_usb, OID_AUTO, g_keyboard,
CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB keyboard gadget");
#ifdef USB_DEBUG
static int g_keyboard_debug = 0;

View File

@ -92,7 +92,8 @@ struct g_modem_softc {
uint8_t sc_abstract_state[32];
};
static SYSCTL_NODE(_hw_usb, OID_AUTO, g_modem, CTLFLAG_RW, 0, "USB modem gadget");
static SYSCTL_NODE(_hw_usb, OID_AUTO, g_modem, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB modem gadget");
#ifdef USB_DEBUG
static int g_modem_debug = 0;

View File

@ -61,7 +61,8 @@ __FBSDID("$FreeBSD$");
#include <dev/usb/gadget/g_mouse.h>
static SYSCTL_NODE(_hw_usb, OID_AUTO, g_mouse, CTLFLAG_RW, 0, "USB mouse gadget");
static SYSCTL_NODE(_hw_usb, OID_AUTO, g_mouse, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB mouse gadget");
#ifdef USB_DEBUG
static int g_mouse_debug = 0;

View File

@ -170,7 +170,8 @@ __FBSDID("$FreeBSD$");
/* end of driver specific options */
/* Tunables */
static SYSCTL_NODE(_hw_usb, OID_AUTO, atp, CTLFLAG_RW, 0, "USB ATP");
static SYSCTL_NODE(_hw_usb, OID_AUTO, atp, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB ATP");
#ifdef USB_DEBUG
enum atp_log_level {
@ -196,9 +197,11 @@ SYSCTL_UINT(_hw_usb_atp, OID_AUTO, double_tap_threshold, CTLFLAG_RWTUN,
static u_int atp_mickeys_scale_factor = ATP_SCALE_FACTOR;
static int atp_sysctl_scale_factor_handler(SYSCTL_HANDLER_ARGS);
SYSCTL_PROC(_hw_usb_atp, OID_AUTO, scale_factor, CTLTYPE_UINT | CTLFLAG_RWTUN,
SYSCTL_PROC(_hw_usb_atp, OID_AUTO, scale_factor,
CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE,
&atp_mickeys_scale_factor, sizeof(atp_mickeys_scale_factor),
atp_sysctl_scale_factor_handler, "IU", "movement scale factor");
atp_sysctl_scale_factor_handler, "IU",
"movement scale factor");
static u_int atp_small_movement_threshold = ATP_SMALL_MOVEMENT_THRESHOLD;
SYSCTL_UINT(_hw_usb_atp, OID_AUTO, small_movement, CTLFLAG_RWTUN,

View File

@ -65,7 +65,8 @@
#ifdef USB_DEBUG
static int uep_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, uep, CTLFLAG_RW, 0, "USB uep");
static SYSCTL_NODE(_hw_usb, OID_AUTO, uep, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB uep");
SYSCTL_INT(_hw_usb_uep, OID_AUTO, debug, CTLFLAG_RWTUN,
&uep_debug, 0, "Debug level");
#endif

View File

@ -80,7 +80,8 @@ __FBSDID("$FreeBSD$");
#ifdef USB_DEBUG
static int uhid_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, uhid, CTLFLAG_RW, 0, "USB uhid");
static SYSCTL_NODE(_hw_usb, OID_AUTO, uhid, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB uhid");
SYSCTL_INT(_hw_usb_uhid, OID_AUTO, debug, CTLFLAG_RWTUN,
&uhid_debug, 0, "Debug level");
#endif

View File

@ -98,7 +98,8 @@ static int ukbd_debug = 0;
static int ukbd_no_leds = 0;
static int ukbd_pollrate = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, ukbd, CTLFLAG_RW, 0, "USB keyboard");
static SYSCTL_NODE(_hw_usb, OID_AUTO, ukbd, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB keyboard");
SYSCTL_INT(_hw_usb_ukbd, OID_AUTO, debug, CTLFLAG_RWTUN,
&ukbd_debug, 0, "Debug level");
SYSCTL_INT(_hw_usb_ukbd, OID_AUTO, no_leds, CTLFLAG_RWTUN,

View File

@ -84,7 +84,8 @@ __FBSDID("$FreeBSD$");
#ifdef USB_DEBUG
static int ums_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, ums, CTLFLAG_RW, 0, "USB ums");
static SYSCTL_NODE(_hw_usb, OID_AUTO, ums, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB ums");
SYSCTL_INT(_hw_usb_ums, OID_AUTO, debug, CTLFLAG_RWTUN,
&ums_debug, 0, "Debug level");
#endif
@ -750,9 +751,10 @@ ums_attach(device_t dev)
SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
OID_AUTO, "parseinfo", CTLTYPE_STRING|CTLFLAG_RD,
sc, 0, ums_sysctl_handler_parseinfo,
"", "Dump of parsed HID report descriptor");
OID_AUTO, "parseinfo",
CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE,
sc, 0, ums_sysctl_handler_parseinfo, "",
"Dump of parsed HID report descriptor");
return (0);

View File

@ -62,7 +62,7 @@ __FBSDID("$FreeBSD$");
#ifdef USB_DEBUG
static int wmt_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, wmt, CTLFLAG_RW, 0,
static SYSCTL_NODE(_hw_usb, OID_AUTO, wmt, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB MSWindows 7/8/10 compatible Multi-touch Device");
SYSCTL_INT(_hw_usb_wmt, OID_AUTO, debug, CTLFLAG_RWTUN,
&wmt_debug, 1, "Debug level");

View File

@ -67,7 +67,8 @@ __FBSDID("$FreeBSD$");
} while (0)
/* Tunables */
static SYSCTL_NODE(_hw_usb, OID_AUTO, wsp, CTLFLAG_RW, 0, "USB wsp");
static SYSCTL_NODE(_hw_usb, OID_AUTO, wsp, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB wsp");
#ifdef USB_DEBUG
enum wsp_log_level {

View File

@ -98,7 +98,8 @@ __FBSDID("$FreeBSD$");
#ifdef USB_DEBUG
static int udbp_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, udbp, CTLFLAG_RW, 0, "USB udbp");
static SYSCTL_NODE(_hw_usb, OID_AUTO, udbp, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB udbp");
SYSCTL_INT(_hw_usb_udbp, OID_AUTO, debug, CTLFLAG_RWTUN,
&udbp_debug, 0, "udbp debug level");
#endif

View File

@ -239,7 +239,7 @@ ugold_attach(device_t dev)
sensor_tree = SYSCTL_ADD_NODE(device_get_sysctl_ctx(dev),
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "sensors",
CTLFLAG_RD, NULL, "");
CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "");
if (sensor_tree == NULL) {
error = ENOMEM;

View File

@ -114,7 +114,8 @@ __FBSDID("$FreeBSD$");
#ifdef USB_DEBUG
static int aue_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, aue, CTLFLAG_RW, 0, "USB aue");
static SYSCTL_NODE(_hw_usb, OID_AUTO, aue, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB aue");
SYSCTL_INT(_hw_usb_aue, OID_AUTO, debug, CTLFLAG_RWTUN, &aue_debug, 0,
"Debug level");
#endif

View File

@ -138,7 +138,8 @@ __FBSDID("$FreeBSD$");
#ifdef USB_DEBUG
static int axe_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, axe, CTLFLAG_RW, 0, "USB axe");
static SYSCTL_NODE(_hw_usb, OID_AUTO, axe, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB axe");
SYSCTL_INT(_hw_usb_axe, OID_AUTO, debug, CTLFLAG_RWTUN, &axe_debug, 0,
"Debug level");
#endif

View File

@ -142,7 +142,8 @@ static void axge_csum_cfg(struct usb_ether *);
#ifdef USB_DEBUG
static int axge_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, axge, CTLFLAG_RW, 0, "USB axge");
static SYSCTL_NODE(_hw_usb, OID_AUTO, axge, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB axge");
SYSCTL_INT(_hw_usb_axge, OID_AUTO, debug, CTLFLAG_RWTUN, &axge_debug, 0,
"Debug level");
#endif

View File

@ -118,7 +118,8 @@ static uint32_t cdce_m_crc32(struct mbuf *, uint32_t, uint32_t);
static int cdce_debug = 0;
static int cdce_tx_interval = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, cdce, CTLFLAG_RW, 0, "USB CDC-Ethernet");
static SYSCTL_NODE(_hw_usb, OID_AUTO, cdce, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB CDC-Ethernet");
SYSCTL_INT(_hw_usb_cdce, OID_AUTO, debug, CTLFLAG_RWTUN, &cdce_debug, 0,
"Debug level");
SYSCTL_INT(_hw_usb_cdce, OID_AUTO, interval, CTLFLAG_RWTUN, &cdce_tx_interval, 0,

View File

@ -101,7 +101,8 @@ struct cdceem_softc {
#define CDCEEM_SC_FLAGS_ECHO_RESPONSE_PENDING 0x1
#define CDCEEM_SC_FLAGS_ECHO_PENDING 0x2
static SYSCTL_NODE(_hw_usb, OID_AUTO, cdceem, CTLFLAG_RW, 0, "USB CDC EEM");
static SYSCTL_NODE(_hw_usb, OID_AUTO, cdceem, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB CDC EEM");
static int cdceem_debug = 1;
SYSCTL_INT(_hw_usb_cdceem, OID_AUTO, debug, CTLFLAG_RWTUN,
&cdceem_debug, 0, "Debug level");

View File

@ -130,7 +130,8 @@ static void cue_reset(struct cue_softc *);
#ifdef USB_DEBUG
static int cue_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, cue, CTLFLAG_RW, 0, "USB cue");
static SYSCTL_NODE(_hw_usb, OID_AUTO, cue, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB cue");
SYSCTL_INT(_hw_usb_cue, OID_AUTO, debug, CTLFLAG_RWTUN, &cue_debug, 0,
"Debug level");
#endif

View File

@ -87,7 +87,8 @@ static uether_fn_t ipheth_setpromisc;
#ifdef USB_DEBUG
static int ipheth_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, ipheth, CTLFLAG_RW, 0, "USB iPhone ethernet");
static SYSCTL_NODE(_hw_usb, OID_AUTO, ipheth, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB iPhone ethernet");
SYSCTL_INT(_hw_usb_ipheth, OID_AUTO, debug, CTLFLAG_RWTUN, &ipheth_debug, 0, "Debug level");
#endif

View File

@ -171,7 +171,8 @@ static void kue_reset(struct kue_softc *);
#ifdef USB_DEBUG
static int kue_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, kue, CTLFLAG_RW, 0, "USB kue");
static SYSCTL_NODE(_hw_usb, OID_AUTO, kue, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB kue");
SYSCTL_INT(_hw_usb_kue, OID_AUTO, debug, CTLFLAG_RWTUN, &kue_debug, 0,
"Debug level");
#endif

View File

@ -144,7 +144,8 @@ __FBSDID("$FreeBSD$");
#ifdef USB_DEBUG
static int mos_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, mos, CTLFLAG_RW, 0, "USB mos");
static SYSCTL_NODE(_hw_usb, OID_AUTO, mos, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB mos");
SYSCTL_INT(_hw_usb_mos, OID_AUTO, debug, CTLFLAG_RWTUN, &mos_debug, 0,
"Debug level");
#endif

View File

@ -122,7 +122,7 @@ __FBSDID("$FreeBSD$");
#ifdef USB_DEBUG
static int muge_debug = 0;
SYSCTL_NODE(_hw_usb, OID_AUTO, muge, CTLFLAG_RW, 0,
SYSCTL_NODE(_hw_usb, OID_AUTO, muge, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"Microchip LAN78xx USB-GigE");
SYSCTL_INT(_hw_usb_muge, OID_AUTO, debug, CTLFLAG_RWTUN, &muge_debug, 0,
"Debug level");

View File

@ -111,7 +111,8 @@ __FBSDID("$FreeBSD$");
#ifdef USB_DEBUG
static int rue_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, rue, CTLFLAG_RW, 0, "USB rue");
static SYSCTL_NODE(_hw_usb, OID_AUTO, rue, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB rue");
SYSCTL_INT(_hw_usb_rue, OID_AUTO, debug, CTLFLAG_RWTUN,
&rue_debug, 0, "Debug level");
#endif

View File

@ -122,7 +122,8 @@ __FBSDID("$FreeBSD$");
#ifdef USB_DEBUG
static int smsc_debug = 0;
SYSCTL_NODE(_hw_usb, OID_AUTO, smsc, CTLFLAG_RW, 0, "USB smsc");
SYSCTL_NODE(_hw_usb, OID_AUTO, smsc, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB smsc");
SYSCTL_INT(_hw_usb_smsc, OID_AUTO, debug, CTLFLAG_RWTUN, &smsc_debug, 0,
"Debug level");
#endif

View File

@ -221,7 +221,8 @@ static const struct usb_ether_methods udav_ue_methods_nophy = {
#ifdef USB_DEBUG
static int udav_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, udav, CTLFLAG_RW, 0, "USB udav");
static SYSCTL_NODE(_hw_usb, OID_AUTO, udav, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB udav");
SYSCTL_INT(_hw_usb_udav, OID_AUTO, debug, CTLFLAG_RWTUN, &udav_debug, 0,
"Debug level");
#endif

View File

@ -63,7 +63,8 @@ __FBSDID("$FreeBSD$");
#ifdef USB_DEBUG
static int ure_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, ure, CTLFLAG_RW, 0, "USB ure");
static SYSCTL_NODE(_hw_usb, OID_AUTO, ure, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB ure");
SYSCTL_INT(_hw_usb_ure, OID_AUTO, debug, CTLFLAG_RWTUN, &ure_debug, 0,
"Debug level");
#endif

View File

@ -96,7 +96,8 @@ static uint32_t urndis_ctrl_halt(struct urndis_softc *sc);
#ifdef USB_DEBUG
static int urndis_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, urndis, CTLFLAG_RW, 0, "USB RNDIS-Ethernet");
static SYSCTL_NODE(_hw_usb, OID_AUTO, urndis, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB RNDIS-Ethernet");
SYSCTL_INT(_hw_usb_urndis, OID_AUTO, debug, CTLFLAG_RWTUN, &urndis_debug, 0,
"Debug level");
#endif

View File

@ -84,7 +84,8 @@ __FBSDID("$FreeBSD$");
#ifdef USB_DEBUG
static int usie_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, usie, CTLFLAG_RW, 0, "sierra USB modem");
static SYSCTL_NODE(_hw_usb, OID_AUTO, usie, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"sierra USB modem");
SYSCTL_INT(_hw_usb_usie, OID_AUTO, debug, CTLFLAG_RWTUN, &usie_debug, 0,
"usie debug level");
#endif

View File

@ -288,7 +288,8 @@ static const STRUCT_USB_HOST_ID uhso_devs[] = {
#undef UHSO_DEV
};
static SYSCTL_NODE(_hw_usb, OID_AUTO, uhso, CTLFLAG_RW, 0, "USB uhso");
static SYSCTL_NODE(_hw_usb, OID_AUTO, uhso, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB uhso");
static int uhso_autoswitch = 1;
SYSCTL_INT(_hw_usb_uhso, OID_AUTO, auto_switch, CTLFLAG_RWTUN,
&uhso_autoswitch, 0, "Automatically switch to modem mode");
@ -599,7 +600,8 @@ uhso_attach(device_t self)
CTLFLAG_RD, uhso_port[UHSO_IFACE_PORT(sc->sc_type)], 0,
"Port available at this interface");
SYSCTL_ADD_PROC(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "radio",
CTLTYPE_INT | CTLFLAG_RWTUN, sc, 0, uhso_radio_sysctl, "I", "Enable radio");
CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, sc, 0,
uhso_radio_sysctl, "I", "Enable radio");
/*
* The default interface description on most Option devices isn't
@ -619,7 +621,7 @@ uhso_attach(device_t self)
CTLFLAG_RD, &sc->sc_ttys, 0, "Number of attached serial ports");
tree = SYSCTL_ADD_NODE(sctx, SYSCTL_CHILDREN(soid), OID_AUTO,
"port", CTLFLAG_RD, NULL, "Serial ports");
"port", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Serial ports");
}
/*
@ -638,7 +640,7 @@ uhso_attach(device_t self)
desc = uhso_port_type_sysctl[port];
tty_node = SYSCTL_ADD_NODE(sctx, SYSCTL_CHILDREN(tree), OID_AUTO,
desc, CTLFLAG_RD, NULL, "");
desc, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "");
ht->ht_name[0] = 0;
if (sc->sc_ttys == 1)

View File

@ -60,7 +60,7 @@ __FBSDID("$FreeBSD$");
#include <dev/usb/usb_process.h>
#include <dev/usb/net/usb_ethernet.h>
static SYSCTL_NODE(_net, OID_AUTO, ue, CTLFLAG_RD, 0,
static SYSCTL_NODE(_net, OID_AUTO, ue, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
"USB Ethernet parameters");
#define UE_LOCK(_ue) mtx_lock((_ue)->ue_mtx)
@ -274,10 +274,10 @@ ue_attach_post_task(struct usb_proc_msg *_task)
snprintf(num, sizeof(num), "%u", ue->ue_unit);
ue->ue_sysctl_oid = SYSCTL_ADD_NODE(&ue->ue_sysctl_ctx,
&SYSCTL_NODE_CHILDREN(_net, ue),
OID_AUTO, num, CTLFLAG_RD, NULL, "");
OID_AUTO, num, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "");
SYSCTL_ADD_PROC(&ue->ue_sysctl_ctx,
SYSCTL_CHILDREN(ue->ue_sysctl_oid), OID_AUTO,
"%parent", CTLTYPE_STRING | CTLFLAG_RD, ue, 0,
SYSCTL_CHILDREN(ue->ue_sysctl_oid), OID_AUTO, "%parent",
CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, ue, 0,
ue_sysctl_parent, "A", "parent device");
UE_LOCK(ue);

View File

@ -67,7 +67,8 @@
#ifdef USB_DEBUG
static int u3g_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, u3g, CTLFLAG_RW, 0, "USB 3g");
static SYSCTL_NODE(_hw_usb, OID_AUTO, u3g, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB 3g");
SYSCTL_INT(_hw_usb_u3g, OID_AUTO, debug, CTLFLAG_RWTUN,
&u3g_debug, 0, "Debug level");
#endif

View File

@ -90,7 +90,8 @@ __FBSDID("$FreeBSD$");
#ifdef USB_DEBUG
static int ubsa_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, ubsa, CTLFLAG_RW, 0, "USB ubsa");
static SYSCTL_NODE(_hw_usb, OID_AUTO, ubsa, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB ubsa");
SYSCTL_INT(_hw_usb_ubsa, OID_AUTO, debug, CTLFLAG_RWTUN,
&ubsa_debug, 0, "ubsa debug level");
#endif

View File

@ -111,7 +111,8 @@ __FBSDID("$FreeBSD$");
#ifdef USB_DEBUG
static int ubser_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, ubser, CTLFLAG_RW, 0, "USB ubser");
static SYSCTL_NODE(_hw_usb, OID_AUTO, ubser, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB ubser");
SYSCTL_INT(_hw_usb_ubser, OID_AUTO, debug, CTLFLAG_RWTUN,
&ubser_debug, 0, "ubser debug level");
#endif

View File

@ -98,7 +98,8 @@ __FBSDID("$FreeBSD$");
#ifdef USB_DEBUG
static int uchcom_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, uchcom, CTLFLAG_RW, 0, "USB uchcom");
static SYSCTL_NODE(_hw_usb, OID_AUTO, uchcom, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB uchcom");
SYSCTL_INT(_hw_usb_uchcom, OID_AUTO, debug, CTLFLAG_RWTUN,
&uchcom_debug, 0, "uchcom debug level");
#endif

View File

@ -457,16 +457,16 @@ ufoma_attach(device_t dev)
soid = device_get_sysctl_tree(dev);
SYSCTL_ADD_PROC(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "supportmode",
CTLFLAG_RD|CTLTYPE_STRING, sc, 0, ufoma_sysctl_support,
"A", "Supporting port role");
CTLFLAG_RD | CTLTYPE_STRING | CTLFLAG_MPSAFE, sc, 0,
ufoma_sysctl_support, "A", "Supporting port role");
SYSCTL_ADD_PROC(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "currentmode",
CTLFLAG_RD|CTLTYPE_STRING, sc, 0, ufoma_sysctl_current,
"A", "Current port role");
CTLFLAG_RD | CTLTYPE_STRING | CTLFLAG_MPSAFE, sc, 0,
ufoma_sysctl_current, "A", "Current port role");
SYSCTL_ADD_PROC(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "openmode",
CTLFLAG_RW|CTLTYPE_STRING, sc, 0, ufoma_sysctl_open,
"A", "Mode to transit when port is opened");
CTLFLAG_RW | CTLTYPE_STRING | CTLFLAG_MPSAFE, sc, 0,
ufoma_sysctl_open, "A", "Mode to transit when port is opened");
SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "comunit",
CTLFLAG_RD, &(sc->sc_super_ucom.sc_unit), 0,
"Unit number as USB serial");

View File

@ -84,7 +84,8 @@ __FBSDID("$FreeBSD$");
#include <dev/usb/serial/uftdi_reg.h>
#include <dev/usb/uftdiio.h>
static SYSCTL_NODE(_hw_usb, OID_AUTO, uftdi, CTLFLAG_RW, 0, "USB uftdi");
static SYSCTL_NODE(_hw_usb, OID_AUTO, uftdi, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB uftdi");
#ifdef USB_DEBUG
static int uftdi_debug = 0;

View File

@ -76,7 +76,8 @@ __FBSDID("$FreeBSD$");
#ifdef USB_DEBUG
static int ulpt_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, ulpt, CTLFLAG_RW, 0, "USB ulpt");
static SYSCTL_NODE(_hw_usb, OID_AUTO, ulpt, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB ulpt");
SYSCTL_INT(_hw_usb_ulpt, OID_AUTO, debug, CTLFLAG_RWTUN,
&ulpt_debug, 0, "Debug level");
#endif

View File

@ -81,7 +81,8 @@ __FBSDID("$FreeBSD$");
#ifdef USB_DEBUG
static int umcs_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, umcs, CTLFLAG_RW, 0, "USB umcs quadport serial adapter");
static SYSCTL_NODE(_hw_usb, OID_AUTO, umcs, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB umcs quadport serial adapter");
SYSCTL_INT(_hw_usb_umcs, OID_AUTO, debug, CTLFLAG_RWTUN, &umcs_debug, 0, "Debug level");
#endif /* USB_DEBUG */

View File

@ -113,7 +113,8 @@ __FBSDID("$FreeBSD$");
#ifdef USB_DEBUG
static int umodem_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, umodem, CTLFLAG_RW, 0, "USB umodem");
static SYSCTL_NODE(_hw_usb, OID_AUTO, umodem, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB umodem");
SYSCTL_INT(_hw_usb_umodem, OID_AUTO, debug, CTLFLAG_RWTUN,
&umodem_debug, 0, "Debug level");
#endif

View File

@ -50,7 +50,8 @@
#ifdef USB_DEBUG
static int umoscom_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, umoscom, CTLFLAG_RW, 0, "USB umoscom");
static SYSCTL_NODE(_hw_usb, OID_AUTO, umoscom, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB umoscom");
SYSCTL_INT(_hw_usb_umoscom, OID_AUTO, debug, CTLFLAG_RWTUN,
&umoscom_debug, 0, "Debug level");
#endif

View File

@ -113,7 +113,8 @@ __FBSDID("$FreeBSD$");
#ifdef USB_DEBUG
static int uplcom_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, uplcom, CTLFLAG_RW, 0, "USB uplcom");
static SYSCTL_NODE(_hw_usb, OID_AUTO, uplcom, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB uplcom");
SYSCTL_INT(_hw_usb_uplcom, OID_AUTO, debug, CTLFLAG_RWTUN,
&uplcom_debug, 0, "Debug level");
#endif

View File

@ -97,7 +97,8 @@ __FBSDID("$FreeBSD$");
#include "opt_gdb.h"
static SYSCTL_NODE(_hw_usb, OID_AUTO, ucom, CTLFLAG_RW, 0, "USB ucom");
static SYSCTL_NODE(_hw_usb, OID_AUTO, ucom, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB ucom");
static int ucom_pps_mode;

View File

@ -59,7 +59,8 @@ __FBSDID("$FreeBSD$");
#ifdef USB_DEBUG
static int uslcom_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, uslcom, CTLFLAG_RW, 0, "USB uslcom");
static SYSCTL_NODE(_hw_usb, OID_AUTO, uslcom, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB uslcom");
SYSCTL_INT(_hw_usb_uslcom, OID_AUTO, debug, CTLFLAG_RWTUN,
&uslcom_debug, 0, "Debug level");
#endif

View File

@ -82,7 +82,8 @@
#ifdef USB_DEBUG
static int uvisor_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, uvisor, CTLFLAG_RW, 0, "USB uvisor");
static SYSCTL_NODE(_hw_usb, OID_AUTO, uvisor, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB uvisor");
SYSCTL_INT(_hw_usb_uvisor, OID_AUTO, debug, CTLFLAG_RWTUN,
&uvisor_debug, 0, "Debug level");
#endif

View File

@ -72,7 +72,8 @@ __FBSDID("$FreeBSD$");
#ifdef USB_DEBUG
static int uvscom_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, uvscom, CTLFLAG_RW, 0, "USB uvscom");
static SYSCTL_NODE(_hw_usb, OID_AUTO, uvscom, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB uvscom");
SYSCTL_INT(_hw_usb_uvscom, OID_AUTO, debug, CTLFLAG_RWTUN,
&uvscom_debug, 0, "Debug level");
#endif

View File

@ -69,7 +69,7 @@ __FBSDID("$FreeBSD$");
#include <cam/ctl/ctl_ioctl.h>
#include <cam/ctl/ctl_private.h>
SYSCTL_NODE(_hw_usb, OID_AUTO, cfumass, CTLFLAG_RW, 0,
SYSCTL_NODE(_hw_usb, OID_AUTO, cfumass, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"CAM Target Layer USB Mass Storage Frontend");
static int debug = 1;
SYSCTL_INT(_hw_usb_cfumass, OID_AUTO, debug, CTLFLAG_RWTUN,

View File

@ -168,7 +168,8 @@ __FBSDID("$FreeBSD$");
static int umass_debug;
static int umass_throttle;
static SYSCTL_NODE(_hw_usb, OID_AUTO, umass, CTLFLAG_RW, 0, "USB umass");
static SYSCTL_NODE(_hw_usb, OID_AUTO, umass, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB umass");
SYSCTL_INT(_hw_usb_umass, OID_AUTO, debug, CTLFLAG_RWTUN,
&umass_debug, 0, "umass debug level");
SYSCTL_INT(_hw_usb_umass, OID_AUTO, throttle, CTLFLAG_RWTUN,

View File

@ -82,7 +82,8 @@ __FBSDID("$FreeBSD$");
#ifdef USB_DEBUG
static int urio_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, urio, CTLFLAG_RW, 0, "USB urio");
static SYSCTL_NODE(_hw_usb, OID_AUTO, urio, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB urio");
SYSCTL_INT(_hw_usb_urio, OID_AUTO, debug, CTLFLAG_RWTUN,
&urio_debug, 0, "urio debug level");
#endif

View File

@ -72,7 +72,8 @@
#ifdef USB_DEBUG
static int ustorage_fs_debug = 0;
SYSCTL_NODE(_hw_usb, OID_AUTO, ustorage_fs, CTLFLAG_RW, 0, "USB ustorage_fs");
SYSCTL_NODE(_hw_usb, OID_AUTO, ustorage_fs, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB ustorage_fs");
SYSCTL_INT(_hw_usb_ustorage_fs, OID_AUTO, debug, CTLFLAG_RWTUN,
&ustorage_fs_debug, 0, "ustorage_fs debug level");
#endif

View File

@ -115,7 +115,7 @@ static usb_error_t usb_temp_setup_by_index(struct usb_device *,
uint16_t index);
static void usb_temp_init(void *);
SYSCTL_NODE(_hw_usb, OID_AUTO, templates, CTLFLAG_RW, 0,
SYSCTL_NODE(_hw_usb, OID_AUTO, templates, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB device side templates");
SYSCTL_PROC(_hw_usb, OID_AUTO, template_power,
CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE,

View File

@ -433,7 +433,7 @@ audio_init(void *arg __unused)
parent = SYSCTL_ADD_NODE(&audio_ctx_list,
SYSCTL_STATIC_CHILDREN(_hw_usb_templates), OID_AUTO,
parent_name, CTLFLAG_RW,
parent_name, CTLFLAG_RW | CTLFLAG_MPSAFE,
0, "USB Audio Interface device side template");
SYSCTL_ADD_U16(&audio_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO,
"vendor_id", CTLFLAG_RWTUN, &usb_template_audio.idVendor,

View File

@ -302,7 +302,7 @@ eth_init(void *arg __unused)
parent = SYSCTL_ADD_NODE(&eth_ctx_list,
SYSCTL_STATIC_CHILDREN(_hw_usb_templates), OID_AUTO,
parent_name, CTLFLAG_RW,
parent_name, CTLFLAG_RW | CTLFLAG_MPSAFE,
0, "USB CDC Ethernet device side template");
SYSCTL_ADD_U16(&eth_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO,
"vendor_id", CTLFLAG_RWTUN,

View File

@ -220,7 +220,7 @@ cdceem_init(void *arg __unused)
parent = SYSCTL_ADD_NODE(&cdceem_ctx_list,
SYSCTL_STATIC_CHILDREN(_hw_usb_templates), OID_AUTO,
parent_name, CTLFLAG_RW,
parent_name, CTLFLAG_RW | CTLFLAG_MPSAFE,
0, "USB CDC EEM device side template");
SYSCTL_ADD_U16(&cdceem_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO,
"vendor_id", CTLFLAG_RWTUN,

View File

@ -255,7 +255,7 @@ kbd_init(void *arg __unused)
parent = SYSCTL_ADD_NODE(&kbd_ctx_list,
SYSCTL_STATIC_CHILDREN(_hw_usb_templates), OID_AUTO,
parent_name, CTLFLAG_RW,
parent_name, CTLFLAG_RW | CTLFLAG_MPSAFE,
0, "USB Keyboard device side template");
SYSCTL_ADD_U16(&kbd_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO,
"vendor_id", CTLFLAG_RWTUN,

View File

@ -275,7 +275,7 @@ midi_init(void *arg __unused)
parent = SYSCTL_ADD_NODE(&midi_ctx_list,
SYSCTL_STATIC_CHILDREN(_hw_usb_templates), OID_AUTO,
parent_name, CTLFLAG_RW,
parent_name, CTLFLAG_RW | CTLFLAG_MPSAFE,
0, "USB MIDI device side template");
SYSCTL_ADD_U16(&midi_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO,
"vendor_id", CTLFLAG_RWTUN,

View File

@ -289,7 +289,7 @@ modem_init(void *arg __unused)
parent = SYSCTL_ADD_NODE(&modem_ctx_list,
SYSCTL_STATIC_CHILDREN(_hw_usb_templates), OID_AUTO,
parent_name, CTLFLAG_RW,
parent_name, CTLFLAG_RW | CTLFLAG_MPSAFE,
0, "Virtual serial port device side template");
SYSCTL_ADD_U16(&modem_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO,
"vendor_id", CTLFLAG_RWTUN,

View File

@ -253,7 +253,7 @@ mouse_init(void *arg __unused)
parent = SYSCTL_ADD_NODE(&mouse_ctx_list,
SYSCTL_STATIC_CHILDREN(_hw_usb_templates), OID_AUTO,
parent_name, CTLFLAG_RW,
parent_name, CTLFLAG_RW | CTLFLAG_MPSAFE,
0, "USB Mouse device side template");
SYSCTL_ADD_U16(&mouse_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO,
"vendor_id", CTLFLAG_RWTUN,

View File

@ -219,7 +219,7 @@ msc_init(void *arg __unused)
parent = SYSCTL_ADD_NODE(&msc_ctx_list,
SYSCTL_STATIC_CHILDREN(_hw_usb_templates), OID_AUTO,
parent_name, CTLFLAG_RW,
parent_name, CTLFLAG_RW | CTLFLAG_MPSAFE,
0, "USB Mass Storage device side template");
SYSCTL_ADD_U16(&msc_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO,
"vendor_id", CTLFLAG_RWTUN,

View File

@ -286,7 +286,7 @@ mtp_init(void *arg __unused)
parent = SYSCTL_ADD_NODE(&mtp_ctx_list,
SYSCTL_STATIC_CHILDREN(_hw_usb_templates), OID_AUTO,
parent_name, CTLFLAG_RW,
parent_name, CTLFLAG_RW | CTLFLAG_MPSAFE,
0, "USB Media Transfer Protocol device side template");
SYSCTL_ADD_U16(&mtp_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO,
"vendor_id", CTLFLAG_RWTUN,

View File

@ -458,7 +458,7 @@ multi_init(void *arg __unused)
parent = SYSCTL_ADD_NODE(&multi_ctx_list,
SYSCTL_STATIC_CHILDREN(_hw_usb_templates), OID_AUTO,
parent_name, CTLFLAG_RW,
parent_name, CTLFLAG_RW | CTLFLAG_MPSAFE,
0, "USB Multifunction device side template");
SYSCTL_ADD_U16(&multi_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO,
"vendor_id", CTLFLAG_RWTUN,

View File

@ -454,7 +454,7 @@ phone_init(void *arg __unused)
parent = SYSCTL_ADD_NODE(&phone_ctx_list,
SYSCTL_STATIC_CHILDREN(_hw_usb_templates), OID_AUTO,
parent_name, CTLFLAG_RW,
parent_name, CTLFLAG_RW | CTLFLAG_MPSAFE,
0, "USB Phone device side template");
SYSCTL_ADD_U16(&phone_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO,
"vendor_id", CTLFLAG_RWTUN,

View File

@ -412,7 +412,7 @@ serialnet_init(void *arg __unused)
parent = SYSCTL_ADD_NODE(&serialnet_ctx_list,
SYSCTL_STATIC_CHILDREN(_hw_usb_templates), OID_AUTO,
parent_name, CTLFLAG_RW,
parent_name, CTLFLAG_RW | CTLFLAG_MPSAFE,
0, "USB CDC Serial/Ethernet device side template");
SYSCTL_ADD_U16(&serialnet_ctx_list, SYSCTL_CHILDREN(parent), OID_AUTO,
"vendor_id", CTLFLAG_RWTUN,

View File

@ -68,7 +68,8 @@
*/
int usb_debug = 0;
SYSCTL_NODE(_hw, OID_AUTO, usb, CTLFLAG_RW, 0, "USB debugging");
SYSCTL_NODE(_hw, OID_AUTO, usb, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB debugging");
SYSCTL_INT(_hw_usb, OID_AUTO, debug, CTLFLAG_RWTUN,
&usb_debug, 0, "Debug level");
@ -76,39 +77,52 @@ SYSCTL_INT(_hw_usb, OID_AUTO, debug, CTLFLAG_RWTUN,
/*
* Sysctls to modify timings/delays
*/
static SYSCTL_NODE(_hw_usb, OID_AUTO, timings, CTLFLAG_RW, 0, "Timings");
static SYSCTL_NODE(_hw_usb, OID_AUTO, timings, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"Timings");
static int usb_timings_sysctl_handler(SYSCTL_HANDLER_ARGS);
SYSCTL_PROC(_hw_usb_timings, OID_AUTO, port_reset_delay, CTLTYPE_UINT | CTLFLAG_RWTUN,
&usb_port_reset_delay, sizeof(usb_port_reset_delay),
usb_timings_sysctl_handler, "IU", "Port Reset Delay");
SYSCTL_PROC(_hw_usb_timings, OID_AUTO, port_root_reset_delay, CTLTYPE_UINT | CTLFLAG_RWTUN,
SYSCTL_PROC(_hw_usb_timings, OID_AUTO, port_reset_delay,
CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, &usb_port_reset_delay,
sizeof(usb_port_reset_delay), usb_timings_sysctl_handler, "IU",
"Port Reset Delay");
SYSCTL_PROC(_hw_usb_timings, OID_AUTO, port_root_reset_delay,
CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE,
&usb_port_root_reset_delay, sizeof(usb_port_root_reset_delay),
usb_timings_sysctl_handler, "IU", "Root Port Reset Delay");
SYSCTL_PROC(_hw_usb_timings, OID_AUTO, port_reset_recovery, CTLTYPE_UINT | CTLFLAG_RWTUN,
usb_timings_sysctl_handler, "IU",
"Root Port Reset Delay");
SYSCTL_PROC(_hw_usb_timings, OID_AUTO, port_reset_recovery,
CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE,
&usb_port_reset_recovery, sizeof(usb_port_reset_recovery),
usb_timings_sysctl_handler, "IU", "Port Reset Recovery");
SYSCTL_PROC(_hw_usb_timings, OID_AUTO, port_powerup_delay, CTLTYPE_UINT | CTLFLAG_RWTUN,
&usb_port_powerup_delay, sizeof(usb_port_powerup_delay),
usb_timings_sysctl_handler, "IU", "Port PowerUp Delay");
SYSCTL_PROC(_hw_usb_timings, OID_AUTO, port_resume_delay, CTLTYPE_UINT | CTLFLAG_RWTUN,
&usb_port_resume_delay, sizeof(usb_port_resume_delay),
usb_timings_sysctl_handler, "IU", "Port Resume Delay");
SYSCTL_PROC(_hw_usb_timings, OID_AUTO, set_address_settle, CTLTYPE_UINT | CTLFLAG_RWTUN,
&usb_set_address_settle, sizeof(usb_set_address_settle),
usb_timings_sysctl_handler, "IU", "Set Address Settle");
SYSCTL_PROC(_hw_usb_timings, OID_AUTO, resume_delay, CTLTYPE_UINT | CTLFLAG_RWTUN,
&usb_resume_delay, sizeof(usb_resume_delay),
usb_timings_sysctl_handler, "IU", "Resume Delay");
SYSCTL_PROC(_hw_usb_timings, OID_AUTO, resume_wait, CTLTYPE_UINT | CTLFLAG_RWTUN,
&usb_resume_wait, sizeof(usb_resume_wait),
usb_timings_sysctl_handler, "IU", "Resume Wait");
SYSCTL_PROC(_hw_usb_timings, OID_AUTO, resume_recovery, CTLTYPE_UINT | CTLFLAG_RWTUN,
&usb_resume_recovery, sizeof(usb_resume_recovery),
usb_timings_sysctl_handler, "IU", "Resume Recovery");
SYSCTL_PROC(_hw_usb_timings, OID_AUTO, extra_power_up_time, CTLTYPE_UINT | CTLFLAG_RWTUN,
&usb_extra_power_up_time, sizeof(usb_extra_power_up_time),
usb_timings_sysctl_handler, "IU", "Extra PowerUp Time");
usb_timings_sysctl_handler, "IU",
"Port Reset Recovery");
SYSCTL_PROC(_hw_usb_timings, OID_AUTO, port_powerup_delay,
CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, &usb_port_powerup_delay,
sizeof(usb_port_powerup_delay), usb_timings_sysctl_handler, "IU",
"Port PowerUp Delay");
SYSCTL_PROC(_hw_usb_timings, OID_AUTO, port_resume_delay,
CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, &usb_port_resume_delay,
sizeof(usb_port_resume_delay), usb_timings_sysctl_handler, "IU",
"Port Resume Delay");
SYSCTL_PROC(_hw_usb_timings, OID_AUTO, set_address_settle,
CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, &usb_set_address_settle,
sizeof(usb_set_address_settle), usb_timings_sysctl_handler, "IU",
"Set Address Settle");
SYSCTL_PROC(_hw_usb_timings, OID_AUTO, resume_delay,
CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, &usb_resume_delay,
sizeof(usb_resume_delay), usb_timings_sysctl_handler, "IU",
"Resume Delay");
SYSCTL_PROC(_hw_usb_timings, OID_AUTO, resume_wait,
CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, &usb_resume_wait,
sizeof(usb_resume_wait), usb_timings_sysctl_handler, "IU",
"Resume Wait");
SYSCTL_PROC(_hw_usb_timings, OID_AUTO, resume_recovery,
CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, &usb_resume_recovery,
sizeof(usb_resume_recovery), usb_timings_sysctl_handler, "IU",
"Resume Recovery");
SYSCTL_PROC(_hw_usb_timings, OID_AUTO, extra_power_up_time,
CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, &usb_extra_power_up_time,
sizeof(usb_extra_power_up_time), usb_timings_sysctl_handler, "IU",
"Extra PowerUp Time");
#endif
/*------------------------------------------------------------------------*

View File

@ -87,7 +87,8 @@
#ifdef USB_DEBUG
static int usb_fifo_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, dev, CTLFLAG_RW, 0, "USB device");
static SYSCTL_NODE(_hw_usb, OID_AUTO, dev, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB device");
SYSCTL_INT(_hw_usb_dev, OID_AUTO, debug, CTLFLAG_RWTUN,
&usb_fifo_debug, 0, "Debug Level");
#endif

View File

@ -132,7 +132,8 @@ struct usb_fifo_methods usb_ugen_methods = {
#ifdef USB_DEBUG
static int ugen_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, ugen, CTLFLAG_RW, 0, "USB generic");
static SYSCTL_NODE(_hw_usb, OID_AUTO, ugen, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB generic");
SYSCTL_INT(_hw_usb_ugen, OID_AUTO, debug, CTLFLAG_RWTUN, &ugen_debug,
0, "Debug level");
#endif

View File

@ -82,7 +82,8 @@
#ifdef USB_DEBUG
static int uhub_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, uhub, CTLFLAG_RW, 0, "USB HUB");
static SYSCTL_NODE(_hw_usb, OID_AUTO, uhub, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB HUB");
SYSCTL_INT(_hw_usb_uhub, OID_AUTO, debug, CTLFLAG_RWTUN, &uhub_debug, 0,
"Debug level");
#endif

View File

@ -384,21 +384,19 @@ acpi_usb_hub_port_probe_cb(ACPI_HANDLE ah, UINT32 lv, void *ctx, void **rv)
snprintf(buf, sizeof(buf), "port%ju",
(uintmax_t)devinfo->Address);
oid = SYSCTL_ADD_NODE(ctx,
SYSCTL_CHILDREN(
device_get_sysctl_tree(dev)),
OID_AUTO, buf, CTLFLAG_RD,
NULL, "port nodes");
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
OID_AUTO, buf, CTLFLAG_RD | CTLFLAG_MPSAFE,
NULL, "port nodes");
tree = SYSCTL_CHILDREN(oid);
sc->port[devinfo->Address - 1].handle = ah;
sc->port[devinfo->Address - 1].upc = 0xffffffff;
acpi_uhub_parse_upc(dev, devinfo->Address, ah, tree);
acpi_uhub_parse_pld(dev, devinfo->Address, ah, tree);
SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
tree, OID_AUTO, "info",
CTLTYPE_STRING | CTLFLAG_RD,
&sc->port[devinfo->Address - 1], 0,
acpi_uhub_port_sysctl,
"A", "Port information");
SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), tree,
OID_AUTO, "info",
CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE,
&sc->port[devinfo->Address - 1], 0,
acpi_uhub_port_sysctl, "A", "Port information");
}
AcpiOsFree(devinfo);
}

View File

@ -91,7 +91,8 @@ static int usb_pcount;
#ifdef USB_DEBUG
static int usb_proc_debug;
static SYSCTL_NODE(_hw_usb, OID_AUTO, proc, CTLFLAG_RW, 0, "USB process");
static SYSCTL_NODE(_hw_usb, OID_AUTO, proc, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB process");
SYSCTL_INT(_hw_usb_proc, OID_AUTO, debug, CTLFLAG_RWTUN, &usb_proc_debug, 0,
"Debug level");
#endif

View File

@ -60,7 +60,8 @@
#define USB_DEBUG_VAR udl_debug
#include <dev/usb/usb_debug.h>
static SYSCTL_NODE(_hw_usb, OID_AUTO, udl, CTLFLAG_RW, 0, "USB UDL");
static SYSCTL_NODE(_hw_usb, OID_AUTO, udl, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB UDL");
#ifdef USB_DEBUG
static int udl_debug = 0;

View File

@ -71,7 +71,8 @@ __FBSDID("$FreeBSD$");
#ifdef USB_DEBUG
static int rsu_debug = 0;
SYSCTL_NODE(_hw_usb, OID_AUTO, rsu, CTLFLAG_RW, 0, "USB rsu");
SYSCTL_NODE(_hw_usb, OID_AUTO, rsu, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB rsu");
SYSCTL_INT(_hw_usb_rsu, OID_AUTO, debug, CTLFLAG_RWTUN, &rsu_debug, 0,
"Debug level");
#define RSU_DPRINTF(_sc, _flg, ...) \

View File

@ -80,7 +80,8 @@ __FBSDID("$FreeBSD$");
#ifdef USB_DEBUG
static int rum_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, rum, CTLFLAG_RW, 0, "USB rum");
static SYSCTL_NODE(_hw_usb, OID_AUTO, rum, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB rum");
SYSCTL_INT(_hw_usb_rum, OID_AUTO, debug, CTLFLAG_RWTUN, &rum_debug, 0,
"Debug level");
#endif

View File

@ -82,7 +82,8 @@ __FBSDID("$FreeBSD$");
#ifdef RUN_DEBUG
int run_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, run, CTLFLAG_RW, 0, "USB run");
static SYSCTL_NODE(_hw_usb, OID_AUTO, run, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB run");
SYSCTL_INT(_hw_usb_run, OID_AUTO, debug, CTLFLAG_RWTUN, &run_debug, 0,
"run debug level");

View File

@ -114,7 +114,8 @@ __FBSDID("$FreeBSD$");
#include <dev/usb/wlan/if_uathreg.h>
#include <dev/usb/wlan/if_uathvar.h>
static SYSCTL_NODE(_hw_usb, OID_AUTO, uath, CTLFLAG_RW, 0, "USB Atheros");
static SYSCTL_NODE(_hw_usb, OID_AUTO, uath, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB Atheros");
static int uath_countrycode = CTRY_DEFAULT; /* country code */
SYSCTL_INT(_hw_usb_uath, OID_AUTO, countrycode, CTLFLAG_RWTUN, &uath_countrycode,
@ -2152,8 +2153,8 @@ uath_sysctl_node(struct uath_softc *sc)
ctx = device_get_sysctl_ctx(sc->sc_dev);
child = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->sc_dev));
tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "stats", CTLFLAG_RD,
NULL, "UATH statistics");
tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "stats",
CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "UATH statistics");
child = SYSCTL_CHILDREN(tree);
UATH_SYSCTL_STAT_ADD32(ctx, child, "badchunkseqnum",
&stats->st_badchunkseqnum, "Bad chunk sequence numbers");

View File

@ -72,7 +72,7 @@
* Sebastien Bourdeauducq <lekernel@prism54.org>.
*/
static SYSCTL_NODE(_hw, OID_AUTO, upgt, CTLFLAG_RD, 0,
static SYSCTL_NODE(_hw, OID_AUTO, upgt, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
"USB PrismGT GW3887 driver parameters");
#ifdef UPGT_DEBUG
@ -2041,8 +2041,8 @@ upgt_sysctl_node(struct upgt_softc *sc)
ctx = device_get_sysctl_ctx(sc->sc_dev);
child = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->sc_dev));
tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "stats", CTLFLAG_RD,
NULL, "UPGT statistics");
tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "stats",
CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "UPGT statistics");
child = SYSCTL_CHILDREN(tree);
UPGT_SYSCTL_STAT_ADD32(ctx, child, "tx_active",
&stats->st_tx_active, "Active numbers in TX queue");

View File

@ -80,7 +80,8 @@ __FBSDID("$FreeBSD$");
#ifdef USB_DEBUG
static int ural_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, ural, CTLFLAG_RW, 0, "USB ural");
static SYSCTL_NODE(_hw_usb, OID_AUTO, ural, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB ural");
SYSCTL_INT(_hw_usb_ural, OID_AUTO, debug, CTLFLAG_RWTUN, &ural_debug, 0,
"Debug level");
#endif

View File

@ -67,7 +67,8 @@ __FBSDID("$FreeBSD$");
#define URTW_RIDX_OFDM6 4
#define URTW_RIDX_OFDM24 8
static SYSCTL_NODE(_hw_usb, OID_AUTO, urtw, CTLFLAG_RW, 0, "USB Realtek 8187L");
static SYSCTL_NODE(_hw_usb, OID_AUTO, urtw, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB Realtek 8187L");
#ifdef URTW_DEBUG
int urtw_debug = 0;
SYSCTL_INT(_hw_usb_urtw, OID_AUTO, debug, CTLFLAG_RWTUN, &urtw_debug, 0,
@ -4385,13 +4386,13 @@ urtw_sysctl_node(struct urtw_softc *sc)
ctx = device_get_sysctl_ctx(sc->sc_dev);
child = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->sc_dev));
tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "stats", CTLFLAG_RD,
NULL, "URTW statistics");
tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "stats",
CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "URTW statistics");
parent = SYSCTL_CHILDREN(tree);
/* Tx statistics. */
tree = SYSCTL_ADD_NODE(ctx, parent, OID_AUTO, "tx", CTLFLAG_RD,
NULL, "Tx MAC statistics");
tree = SYSCTL_ADD_NODE(ctx, parent, OID_AUTO, "tx",
CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Tx MAC statistics");
child = SYSCTL_CHILDREN(tree);
URTW_SYSCTL_STAT_ADD32(ctx, child, "1m", &stats->txrates[0],
"1 Mbit/s");

View File

@ -77,7 +77,8 @@ __FBSDID("$FreeBSD$");
#ifdef USB_DEBUG
static int zyd_debug = 0;
static SYSCTL_NODE(_hw_usb, OID_AUTO, zyd, CTLFLAG_RW, 0, "USB zyd");
static SYSCTL_NODE(_hw_usb, OID_AUTO, zyd, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB zyd");
SYSCTL_INT(_hw_usb_zyd, OID_AUTO, debug, CTLFLAG_RWTUN, &zyd_debug, 0,
"zyd debug level");