setpci [options] devices operations...
setpci is a utility for querying and configuring PCI devices.
All numbers are entered in hexadecimal notation.
Root privileges are necessary for almost all operations, excluding reads of the standard header of the configuration space on some operating systems. Please see lspci(8) for details on access rights.
The PCI utilities use the PCI library to talk to PCI devices (see pcilib(7) for details). You can use the following options to influence its behavior:
Before each sequence of operations you need to select which devices you wish that operation to affect.
When -s and -d are combined, only devices that match both criteria are selected. When multiple options of the same kind are specified, the rightmost one overrides the others.
There are two kinds of operations: reads and writes. To read a register, just specify its name. Writes have the form name=value,value... where each value is either a hexadecimal number or an expression of type data:mask where both data and mask are hexadecimal numbers. In the latter case, only the bits corresponding to binary ones in the mask are changed (technically, this is a read-modify-write operation).
There are several ways how to identity a register:
All names of registers and width specifiers are case-insensitive.
The PCI Utilities are maintained by Martin Mares <firstname.lastname@example.org>.