Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help
DEVCTL(8)		  BSD System Manager's Manual		     DEVCTL(8)

     devctl -- device control utility

     devctl attach device
     devctl clear driver [-f] device
     devctl detach [-f]	device
     devctl disable [-f] device
     devctl enable device
     devctl suspend device
     devctl resume device
     devctl set	driver [-f] device driver
     devctl rescan device
     devctl delete [-f]	device
     devctl reset [-d] device

     The devctl	utility	adjusts	the state of individual	devices	in the ker-
     nel's internal device hierarchy.  Each invocation of devctl consists of a
     single command followed by	command-specific arguments.  Each command op-
     erates on a single	device specified via the device	argument.  The device
     may be specified either as	the name of an existing	device or as a bus-
     specific address.	More details on	supported address formats can be found
     in	devctl(3).

     The following commands are	supported:

     attach device
	     Force the kernel to re-probe the device.  If a suitable driver is
	     found, it is attached to the device.

     detach [-f] device
	     Detach the	device from its	current	device driver.	If the -f flag
	     is	specified, the device driver will be detached even if the de-
	     vice is busy.

     disable [-f] device
	     Disable a device.	If the device is currently attached to a de-
	     vice driver, the device driver will be detached from the device,
	     but the device will retain	its current name.  If the -f flag is
	     specified,	the device driver will be detached even	if the device
	     is	busy.

     enable device
	     Enable a device.  The device will probe and attach	if a suitable
	     device driver is found.  Note that	this can re-enable a device
	     disabled at boot time via a loader	tunable.

     suspend device
	     Suspend a device.	This may include placing the device in a re-
	     duced power state.

     resume device
	     Resume a suspended	device to a fully working state.

     set driver	[-f] device driver
	     Force the device to use a device driver named driver.  If the de-
	     vice is already attached to a device driver and the -f flag is
	     specified,	the device will	be detached from its current device
	     driver before it is attached to the new device driver.  If	the
	     device is already attached	to a device driver and the -f flag is
	     not specified, the	device will not	be changed.

     clear driver [-f] device
	     Clear a previously-forced driver name so that the device is able
	     to	use any	valid device driver.  After the	previous name has been
	     cleared, the device is reprobed so	that other device drivers may
	     attach to it.  This can be	used to	undo an	earlier	set driver
	     command.  If the device is	currently attached to a	device driver
	     and the -f	flag is	not specified, the device will not be changed.

     rescan device
	     Rescan a bus device checking for devices that have	been added or

     delete [-f] device
	     Delete the	device from the	device tree.  If the -f	flag is	speci-
	     fied, the device will be deleted even if it is physically
	     present.  This command should be used with	care as	a device that
	     is	deleted	but present can	no longer be used unless the parent
	     bus device	rediscovers the	device via a rescan request.

     reset [-d]	device
	     Reset the device, using bus-specific reset	method.	 Drivers for
	     the devices being reset are suspended around the reset.  If the
	     -d	option is specified, drivers are detached instead.

	     Currently,	resets are implemented for PCIe	buses and PCI devices.
	     For PCIe bus, the link is disabled	and then re-trained, causing
	     all children of the bus to	reset.	Use -p option of devinfo(8)
	     tool to report parent bus for the device.	For PCI	device,	if
	     Function-Level Reset is implemented by it,	FLR is tried first; if
	     failed or not implemented,	power reset is tried.

	     If	you have detached or suspended a child device explicitly and
	     then do a reset, the child	device will end	up attached.

     devctl(3),	devinfo(8)

     The devctl	utility	first appeared in FreeBSD 10.3.

     Currently there is	no administrative flag to prevent re-attach or resume
     of	the manually detached or suspended devices after reset.	 Similarly,
     there is no flag to prevent un-suspending of the the manually suspended
     devices after system resume.

BSD				 April 4, 2019				   BSD


Want to link to this manual page? Use this URL:

home | help