]> git.ipfire.org Git - thirdparty/pciutils.git/log
thirdparty/pciutils.git
5 years agoReleased as 3.6.2 v3.6.2
Martin Mares [Sun, 12 Aug 2018 10:59:26 +0000 (12:59 +0200)] 
Released as 3.6.2

5 years agoUpdated pci.ids to today's snapshot
Martin Mares [Sun, 12 Aug 2018 10:57:13 +0000 (12:57 +0200)] 
Updated pci.ids to today's snapshot

5 years agoAdded test cases for topology computation
Martin Mares [Sun, 12 Aug 2018 10:47:25 +0000 (12:47 +0200)] 
Added test cases for topology computation

Contributed by Matthew Wilcox

5 years agoTopology now works in combination with filters
Martin Mares [Sun, 12 Aug 2018 09:24:06 +0000 (11:24 +0200)] 
Topology now works in combination with filters

If bus topology is needed, we scan all devices regardless of filters,
and apply the filters later when showing devices.

Also, we forbid several impossible combinations of options: tree mode
with filters, bus mapping mode with anything requiring topology.

5 years agoTree: Detect bridges properly
Martin Mares [Sun, 12 Aug 2018 09:13:05 +0000 (11:13 +0200)] 
Tree: Detect bridges properly

Previously, only PCI_CLASS_BRIDGE_PCI was considered, which excluded
CardBus bridges. We now accept anything of the base class "bridge"
with the proper header type.

Also added a bunch of debugging messages.

5 years agoAdded an option for displaying bus paths
Martin Mares [Fri, 10 Aug 2018 10:28:49 +0000 (12:28 +0200)] 
Added an option for displaying bus paths

Originally implemented by Matthew Wilcox as a stand-alone feature.
I modified it to make use of bus topology calculated by ls-tree.c.

5 years agoGeneralized topology computation in ls-tree.c
Martin Mares [Fri, 10 Aug 2018 10:11:39 +0000 (12:11 +0200)] 
Generalized topology computation in ls-tree.c

The topology tree is now independent of the plain device list
and it can be traversed in both top-to-bottom and bottom-to-top
directions.

5 years agoReleased as 3.6.1 v3.6.1
Martin Mares [Thu, 12 Jul 2018 12:02:43 +0000 (14:02 +0200)] 
Released as 3.6.1

5 years agoSysfs: fixed sysfs_deref_link()
Martin Mares [Thu, 12 Jul 2018 11:59:52 +0000 (13:59 +0200)] 
Sysfs: fixed sysfs_deref_link()

The function canonicalize_file_name() is GLIBC-specific, use realpath()
instead, which is available also on MUSL libc.

Also, it leaked memory.

5 years agomaint/release: Perl does not have "." in @INC any longer
Martin Mares [Sat, 30 Jun 2018 21:56:10 +0000 (23:56 +0200)] 
maint/release: Perl does not have "." in @INC any longer

5 years agoReleased as 3.6.0 v3.6.0
Martin Mares [Sat, 30 Jun 2018 21:54:30 +0000 (23:54 +0200)] 
Released as 3.6.0

5 years agoUpdated pci.ids to today's snapshot
Martin Mares [Sat, 30 Jun 2018 21:42:12 +0000 (23:42 +0200)] 
Updated pci.ids to today's snapshot

5 years agoConvert other string properties to the generic mechanism
Martin Mares [Tue, 26 Jun 2018 10:14:18 +0000 (12:14 +0200)] 
Convert other string properties to the generic mechanism

This removes the need of explicit memory management and fixes
PCI_FILL_RESCAN.

To keep backward compatibility, I am keeping the raw pointers
in struct pci_dev, but they point inside the pci_property instead
of separately allocated memory.

5 years agoCreated a generic interface for device properties
Martin Mares [Tue, 26 Jun 2018 10:08:37 +0000 (12:08 +0200)] 
Created a generic interface for device properties

Introduction of device tree node properties broke library ABI.

I gave up on creating new symbol versions whenever we add a new
device property, so I introduced a generic property interface
with which new string properties can be added while keeping ABI
compatibility.

5 years agoAdd device-tree node path to the verbose output
Oliver O'Halloran [Tue, 15 May 2018 05:39:05 +0000 (15:39 +1000)] 
Add device-tree node path to the verbose output

Adds the path of the device-tree node of a PCI device to the lspci -v
output, like so:

0021:00:00.0 PCI bridge: IBM Device 03dc (prog-if 00 [Normal decode])
DT Node: /sys/firmware/devicetree/base/pciex@3fffe41100000/pci@0

This is added as a generic property to struct pci_device and populated
by the sysfs backend. Other platforms may find it useful though.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
5 years agopciutils: add tags\TAGS generation
Viktor Prutyanov [Thu, 22 Mar 2018 16:51:37 +0000 (19:51 +0300)] 
pciutils: add tags\TAGS generation

This patch adds 'ctags' and 'TAGS' targets to Makefile

Signed-off-by: Viktor Prutyanov <viktor.prutyanov@virtuozzo.com>
5 years agoVPD: Cleanup
Martin Mares [Tue, 19 Jun 2018 09:44:42 +0000 (11:44 +0200)] 
VPD: Cleanup

5 years agopciutils: Add decoding of vendor specific VPD fields
return.0 [Mon, 18 Jun 2018 22:00:31 +0000 (17:00 -0500)] 
pciutils: Add decoding of vendor specific VPD fields

IBM has defined several VPD fields that are not part of the PCI
spec, but are frequently used on embedded and pluggable pcie
adapters.

Since these fields are "Unknown", they are listed in hex
and less readable.

This patch adds commonly used vendor specific VPD keywords
described in "Table 160. LoPAPR VPD Fields" of the Linux on Power
Architecture Platform Reference (LoPAPR).

Signed-off-by: John Walthour <return.0@me.com>
5 years agolspci: "virtual" resource regions recognized properly
Martin Mares [Sun, 27 May 2018 11:49:55 +0000 (13:49 +0200)] 
lspci: "virtual" resource regions recognized properly

We wanted to add a "[virtual]" marker to all resources which are
known to the kernel, but not configured in the hardware. That is,
those where the BAR is all zero.

However, the test was never triggered for I/O regions, since their
BAR is never zero: it always has the region type bit set.

Now, we test only the address part of the BAR.

6 years agolspci: Use spec name for RCRB ((Root Complex Register Block)
Bjorn Helgaas [Thu, 19 Apr 2018 20:16:47 +0000 (15:16 -0500)] 
lspci: Use spec name for RCRB ((Root Complex Register Block)

Extended Capability ID 0x000a is the RCRB (Root Complex Register Block)
capability.  Change the #define and the capability label to match the
terminology used in the specs.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
6 years agolspci: Print names of capabilities even if we can't decode the rest
Bjorn Helgaas [Thu, 19 Apr 2018 20:16:40 +0000 (15:16 -0500)] 
lspci: Print names of capabilities even if we can't decode the rest

We don't have decoders for many new capabilities, so we currently print
just the capability ID, e.g.,

  Capabilities: [220 v1] Extended Capability ID 0x19

Print the names, even if we don't yet know how to decode the contents,
e.g.,

  Capabilities: [220 v1] Secondary PCI Express <?>

The capability IDs are taken from the PCI Code and ID Assignment spec,
r1.10.  The #defines are named to match those in Linux when possible.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
6 years agolspci: Decode Null Capability
Bjorn Helgaas [Thu, 19 Apr 2018 20:16:33 +0000 (15:16 -0500)] 
lspci: Decode Null Capability

The PCI Code and ID Assignment spec, r1.9, sec 2, defines a "Null
Capability" containing no registers other than the 8-bit Capability ID
(00h) and an 8-bit Next Capability Pointer.

Some devices, e.g., the Intel [8086:2058] implement this Capability.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
6 years agolspci: Clarify unknown capability IDs
Bjorn Helgaas [Thu, 19 Apr 2018 20:16:26 +0000 (15:16 -0500)] 
lspci: Clarify unknown capability IDs

For capabilities we don't know how to decode, we print the config address,
version, and capability ID:

  Capabilities: [220 v1] #19

This doesn't clearly identify the capability ID ("19"), whether it is a
PCI-compatible Capability ID or an Extended Capability ID (although you can
infer this by whether the address is 2 or 3 digits), or the fact that the
ID is printed in hex, which makes it hard to parse this manually.

Add a label ("Capability ID" or "Extended Capability ID") and print a "0x"
prefix so it's clear the value is in hex:

  Capabilities: [220 v1] Extended Capability ID 0x19

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
6 years agolspci.man: Removed one remaining reference to the sf.net site
Martin Mares [Tue, 10 Apr 2018 09:38:46 +0000 (11:38 +0200)] 
lspci.man: Removed one remaining reference to the sf.net site

6 years agolspci: Avoid "%1$c" style format strings in HT capability
Martin Mares [Sat, 24 Mar 2018 15:34:35 +0000 (16:34 +0100)] 
lspci: Avoid "%1$c" style format strings in HT capability

This kind of format strings is not available on some compilers.

Also added a test case for the HT capability.

6 years agoSylixos: README
GongYuJian [Tue, 20 Mar 2018 03:33:09 +0000 (11:33 +0800)] 
Sylixos: README

6 years agoSylixos: Bits of Makefile and configure
GongYuJian [Tue, 20 Mar 2018 04:29:53 +0000 (12:29 +0800)] 
Sylixos: Bits of Makefile and configure

6 years agolspci: fix printing DeviceName
Viktor Prutyanov [Tue, 20 Mar 2018 19:20:34 +0000 (22:20 +0300)] 
lspci: fix printing DeviceName

In commit ef6c9ec3a45992d9e7ef4716d444252baf2013e1 pci_fill_info() calls were moved
and the label field is filled after its output.
Before this patch lspci never prints 'DeviceName'.

Signed-off-by: Viktor Prutyanov <viktor.prutyanov@virtuozzo.com>
6 years agoSylixos: Trying to simplify probing mechanism
Martin Mares [Sun, 18 Mar 2018 17:53:18 +0000 (18:53 +0100)] 
Sylixos: Trying to simplify probing mechanism

6 years agoSylixos: Coding style cleanup
Martin Mares [Sun, 18 Mar 2018 17:47:42 +0000 (18:47 +0100)] 
Sylixos: Coding style cleanup

6 years agoSylixos port
Martin Mares [Sun, 18 Mar 2018 17:40:56 +0000 (18:40 +0100)] 
Sylixos port

Contributed by YuJian Gong.

6 years agoIntroduced an explicit probe sequence
Martin Mares [Sat, 17 Mar 2018 15:28:15 +0000 (16:28 +0100)] 
Introduced an explicit probe sequence

Previously, the probe order was determined by the order of back-ends.
However, new back-ends must be always added at the end of the list
to maintain ABI compatibility, so they were always probed last.

6 years agoAvoid "optarg" as an identifier
Martin Mares [Sat, 17 Mar 2018 11:41:24 +0000 (12:41 +0100)] 
Avoid "optarg" as an identifier

On SylixOS, it is defined as a macro.

6 years agoAdjust prototypes of xmalloc(), xrealloc() and xstrdup()
Martin Mares [Sat, 17 Mar 2018 11:39:00 +0000 (12:39 +0100)] 
Adjust prototypes of xmalloc(), xrealloc() and xstrdup()

SylixOS defines its own versions of these functions in its standard
library, which collide with ours. However, their prototypes make
more sense, because they follow the prototypes of the non-x versions
in the C standard, so there is no harm in following them.

6 years agolspci: Report if the PCIe link speed/width is full or downgraded
Martin Mares [Fri, 16 Mar 2018 16:53:42 +0000 (17:53 +0100)] 
lspci: Report if the PCIe link speed/width is full or downgraded

Based on an idea by Dmitry Monakhov.

6 years agolspci: Make DevCtl, DevSta, and AER decoding more consistent
Bjorn Helgaas [Wed, 31 Jan 2018 21:19:13 +0000 (15:19 -0600)] 
lspci: Make DevCtl, DevSta, and AER decoding more consistent

Change DevCtl error reporting enables so they match the corresponding
DevSta bits:

-  DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
+  DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-

PCIe r4.0, sec 6.2.2, classifies errors as Correctable or Uncorrectable.
Uncorrectable includes both Non-Fatal and Fatal errors.  Decode the DevSta
"Non-Fatal Error Detected" bit as "NonFatalErr", not "UncorrErr":

-  DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr- TransPend-
+  DevSta: CorrErr+ NonFatalErr- FatalErr- UnsupReq+ AuxPwr- TransPend-

Change the "Unsupported" and "UnsuppReq" labels in DevCtl and DevSta to
match the "UnsupReq" used in AER.

The Correctable error category doesn't include Non-Fatal errors, so change
the AER Correctable Error Status "Advisory Non-Fatal Error Status" from
"NonFatalErr" to "AdvNonFatalErr":

-  CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
+  CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
6 years agofbsd-device should compile again
Martin Mares [Thu, 11 Jan 2018 08:39:38 +0000 (09:39 +0100)] 
fbsd-device should compile again

6 years agofbsd-device: Hopefully fixed a bug in fbsd_scan()
Martin Mares [Sun, 31 Dec 2017 17:24:15 +0000 (18:24 +0100)] 
fbsd-device: Hopefully fixed a bug in fbsd_scan()

The previous version was obviously wrong: as Andriy Gapon pointed
out, we assign twice to t->dev, but never to t->func.

Not tested, though, as I have no FreeBSD system at hand.

6 years agolspci: Decode "VGA 16-bit decode" in bridge control register
Bjorn Helgaas [Fri, 8 Dec 2017 21:24:10 +0000 (15:24 -0600)] 
lspci: Decode "VGA 16-bit decode" in bridge control register

Decode the "VGA 16-bit decode" bit in the bridge control register.  This
bit was added in the PCI-to-PCI Bridge Arch Spec, r1.2, sec 3.2.5.18.
Note that the bit is only meaningful if the VGA Enable bit or the VGA
Palette Snoop Enable bit is set.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
6 years agopciutils: Add the support for a DOS/DJGPP environment
Rudolf Marek [Fri, 29 Dec 2017 20:58:41 +0000 (21:58 +0100)] 
pciutils: Add the support for a DOS/DJGPP environment

Here is bit a blast from the past. The flashrom still supports the DOS/DJGPP environment, which requires
pciutils to be compiled with DJGPP. I originally developed this patch in 2010,
and I respun it for latest pciutils.

* Add DJGPP as an OS target
* Stop if endianess macros are not defined
* Introduce new intel_io_lock/unclock function to synchronize
  I/O operations.

There is a small issue left that "lspci" and "lspci.exe" are created. The ".exe" variants
are not installed and also not cleaned. No idea if you want to fix that or not.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Compiled with:

 make ZLIB=no DNS=no HOST=i386-djgpp-djgpp CROSS_COMPILE=i586-pc-msdosdjgpp- \
     PREFIX=/ DESTDIR=$PWD/../libpci-libgetopt  \
     STRIP="--strip-program=i586-pc-msdosdjgpp-strip -s" install install-lib

If you put to C:\share\pci.ids file, the lspci.exe will also display the human readable output.

6 years agoREADME: kernel.org does not speak FTP any longer
Martin Mares [Sun, 19 Nov 2017 10:39:27 +0000 (11:39 +0100)] 
README: kernel.org does not speak FTP any longer

6 years agoForgot the ChangeLog for v3.5.6. v3.5.6
Martin Mares [Fri, 17 Nov 2017 13:04:04 +0000 (14:04 +0100)] 
Forgot the ChangeLog for v3.5.6.

6 years agoReleased as 3.5.6
Martin Mares [Fri, 17 Nov 2017 13:01:56 +0000 (14:01 +0100)] 
Released as 3.5.6

6 years agoUpdated pci.ids to today's snapshot
Martin Mares [Fri, 17 Nov 2017 13:01:11 +0000 (14:01 +0100)] 
Updated pci.ids to today's snapshot

6 years agopciutils: change MN VPD keyword to F_TEXT
Martin Mares [Fri, 17 Nov 2017 12:58:23 +0000 (13:58 +0100)] 
pciutils: change MN VPD keyword to F_TEXT

The PCI spec defines all keyword data fields as ASCII unless
otherwise noted. The MN keyword is not otherwise noted. To make
the MN field human readable in lspci verbose outputs, this patch
changes the MN keyword definition from F_BINARY to F_TEXT.

Signed-off-by: John Walthour <return.0@me.com>
6 years agofbsd-device: Use PCIOCGETCONF and PCIOCGETBAR when /dev/pci fd is readonly.
Imre Vadász [Fri, 14 Jul 2017 21:05:53 +0000 (23:05 +0200)] 
fbsd-device: Use PCIOCGETCONF and PCIOCGETBAR when /dev/pci fd is readonly.

This way we can at least fulfill some of the common requests without root
privileges. This allows various applications (for example the google chrome
webbrowser) to successfully probe the list of PCI devices without needing
read-write access to the /dev/pci device file.

Signed-off-by: Imre Vadász <imrevdsz@gmail.com>
6 years agofbsd-device: Make extended configuration space available.
Imre Vadász [Fri, 14 Jul 2017 21:13:35 +0000 (23:13 +0200)] 
fbsd-device: Make extended configuration space available.

Signed-off-by: Imre Vadász <imrevdsz@gmail.com>
6 years agofbsd-device: Fix fbsd-device backend on DragonFly BSD.
Imre Vadász [Fri, 14 Jul 2017 21:12:15 +0000 (23:12 +0200)] 
fbsd-device: Fix fbsd-device backend on DragonFly BSD.

DragonFly also supports PCI domains same as FreeBSD.

Signed-off-by: Imre Vadász <imrevdsz@gmail.com>
6 years agoconfigure: use simpler/more portable echo_n
Mike Frysinger [Mon, 20 Jun 2016 04:21:38 +0000 (00:21 -0400)] 
configure: use simpler/more portable echo_n

The `echo -n` behavior is not in POSIX and not all shells support it.
Use the portable `printf` func as defined by POSIX.

6 years agoReleased as 3.5.5 v3.5.5
Martin Mares [Wed, 5 Jul 2017 13:21:46 +0000 (15:21 +0200)] 
Released as 3.5.5

6 years agoUpdated pci.ids to today's snapshot
Martin Mares [Wed, 5 Jul 2017 13:16:20 +0000 (15:16 +0200)] 
Updated pci.ids to today's snapshot

6 years agolspci: Fix wrong read size for RootSta
Jeffy Chen [Fri, 30 Jun 2017 10:09:00 +0000 (18:09 +0800)] 
lspci: Fix wrong read size for RootSta

We are reading wrong size(word) for this cap, since:

RootSta has:
PCI_EXP_RTSTA_PME_STATUS  0x00010000 /* PME Status */
PCI_EXP_RTSTA_PME_PENDING 0x00020000 /* PME is Pending */

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-by: Bjorn Helgaas <bhelgaas@google.com>
6 years agolspci: Fix "Auxiliary" spelling error
Bjorn Helgaas [Fri, 21 Apr 2017 19:32:41 +0000 (14:32 -0500)] 
lspci: Fix "Auxiliary" spelling error

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
6 years agolspci: Use #defines for greppability
Bjorn Helgaas [Fri, 21 Apr 2017 19:32:34 +0000 (14:32 -0500)] 
lspci: Use #defines for greppability

Use existing #defines when possible so grep/cscope/etc are more useful.  No
functional change intended.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
6 years agolspci: Decode only supported ASPM exit latencies
Bjorn Helgaas [Fri, 21 Apr 2017 19:32:26 +0000 (14:32 -0500)] 
lspci: Decode only supported ASPM exit latencies

Per PCIe spec r3.1, sec 7.8.6, the L0s Exit Latency is only valid when L0s
is supported, and similarly the L1 Exit Latency is only valid when L1 is
supported.

Only decode the L0s and L1 Exit Latencies if they are defined.

For example, on a device that supports L1 but not L0s, the difference in
the "lspci -vv" output looks like this:

-   LnkCap: Port #1, Speed 8GT/s, Width x1, ASPM L1, Exit Latency L0s <1us, L1 <16us
+   LnkCap: Port #1, Speed 8GT/s, Width x1, ASPM L1, Exit Latency L1 <16us

Correct the comments on the PCI_EXP_LNKCAP_L0S and PCI_EXP_LNKCAP_L1
definitions.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
6 years agolspci: Decode "Slot Implemented" for PCI/PCI-X to PCIe Bridges
Bjorn Helgaas [Fri, 21 Apr 2017 19:32:18 +0000 (14:32 -0500)] 
lspci: Decode "Slot Implemented" for PCI/PCI-X to PCIe Bridges

The secondary side of a PCI/PCI-X to PCIe Bridge (a "reverse bridge") is a
PCIe Downstream Port and could support a slot just like Root Ports and
Switch Downstream Ports.

Decode "Slot Implemented" for reverse bridges and, if true, the Slot
Capabilities, Control, and Status registers.

For a reverse bridge with no slot, the difference in the "lspci -vv" output
looks like this:

-    Capabilities: [40] Express (v2) PCI/PCI-X to PCI-Express Bridge, MSI 00
+    Capabilities: [40] Express (v2) PCI/PCI-X to PCI-Express Bridge (Slot-), MSI 00

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
6 years agolspci: Indent PCIe Capability DevCap2 & DevCtl2 correctly
Bjorn Helgaas [Fri, 21 Apr 2017 19:32:09 +0000 (14:32 -0500)] 
lspci: Indent PCIe Capability DevCap2 & DevCtl2 correctly

Indent the AtomicOpsCap and AtomicOpsCtl fields to make it clear that these
are part of the DevCap2 and DevCtl2 registers.

The difference in the "lspci -vv" output looks like this:

        DevCap2: Completion Timeout: Range ABC, TimeoutDis+, LTR+, OBFF Not Supported ARIFwd+
-       AtomicOpsCap: Routing- 32bit- 64bit- 128bitCAS-
+                AtomicOpsCap: Routing- 32bit- 64bit- 128bitCAS-
        DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR+, OBFF Disabled ARIFwd-
-       AtomicOpsCtl: ReqEn- EgressBlck-
+                AtomicOpsCtl: ReqEn- EgressBlck-

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
6 years agolspci: Include "ECRC" in the ECRC generate/check labels
Bjorn Helgaas [Fri, 21 Apr 2017 19:32:00 +0000 (14:32 -0500)] 
lspci: Include "ECRC" in the ECRC generate/check labels

Include "ECRC" in the ECRC generate/check labels.

The difference in the "lspci -vv" output looks like this:

-       AERCap: First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn-
+       AERCap: First Error Pointer: 00, ECRCGenCap- ECRCGenEn- ECRCChkCap- ECRCChkEn-

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
6 years agolspci: Decode AER Root Error Command, Root Error Status, Error Source
Bjorn Helgaas [Fri, 21 Apr 2017 19:31:50 +0000 (14:31 -0500)] 
lspci: Decode AER Root Error Command, Root Error Status, Error Source

Decode the AER Root Error Command, Root Error Status, and Error Source
Identification registers.

Per PCIe r3.1, sec 7.10, these registers are only available for Root Ports
and Root Complex Event Collectors, so we have to check the Device/Port Type
from the PCIe capability.

The difference in the "lspci -vv" output looks like this (for a Root Port):

+       RootCmd: CERptEn- NFERptEn- FERptEn-
+       RootSta: CERcvd- MultCERcvd- UERcvd- MultUERcvd-
+                FirstFatal- NonFatalMsg- FatalMsg- IntMsg 0
+       ErrorSrc: ERR_COR: 0000 ERR_FATAL/NONFATAL: 0000

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
6 years agolspci: Dump AER Header Log
Bjorn Helgaas [Fri, 21 Apr 2017 19:31:42 +0000 (14:31 -0500)] 
lspci: Dump AER Header Log

Dump the AER Header Log register.  This contains the header for the TLP
corresponding to a detected error.

It's probably beyond the scope of lspci to decode the header itself, but
it's interesting to at least show the data as a hint for human readers.
The difference in the "lspci -vv" output looks like this:

+       HeaderLog: 00000000 00000000 00000000 00000000

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
6 years agolspci: Decode AER Multiple Header and TLP Prefix Log bits
Bjorn Helgaas [Fri, 21 Apr 2017 19:31:33 +0000 (14:31 -0500)] 
lspci: Decode AER Multiple Header and TLP Prefix Log bits

Decode the AER Multiple Header Recording and TLP Prefix Log Present bits in
the AER Capabilities and Control register.

The difference in the "lspci -vv" output looks like this:

-       AERCap: First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn-
+       AERCap: First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn-
+               MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
7 years agoReleased as 3.5.4 v3.5.4
Martin Mares [Sat, 25 Feb 2017 23:00:20 +0000 (00:00 +0100)] 
Released as 3.5.4

7 years agotypes.h: Provide u64 on all systems
Martin Mares [Fri, 24 Feb 2017 20:23:53 +0000 (21:23 +0100)] 
types.h: Provide u64 on all systems

Recent changes in lspci.c require u64 to be present regardless
of PCI_HAVE_64BIT_ADDRESS.

7 years agoReleased as 3.5.3 v3.5.3
Martin Mares [Wed, 15 Feb 2017 09:17:55 +0000 (10:17 +0100)] 
Released as 3.5.3

7 years agoUpdated pci.ids to today's snapshot
Martin Mares [Wed, 15 Feb 2017 09:16:31 +0000 (10:16 +0100)] 
Updated pci.ids to today's snapshot

7 years agols-caps: Minor cleanup of cap_express_dev2()
Martin Mares [Wed, 15 Feb 2017 09:09:50 +0000 (10:09 +0100)] 
ls-caps: Minor cleanup of cap_express_dev2()

7 years agopciutils: Add test case for pci atomic ops
Satanand Burla [Fri, 10 Feb 2017 02:31:51 +0000 (18:31 -0800)] 
pciutils: Add test case for pci atomic ops

This patch adds test case for atomic ops

Signed-off-by: Satanand Burla <satananda.burla@caviumnetworks.com>
7 years agopciutils: Add decode for Atomic Ops in lspci
Satanand Burla [Tue, 27 Dec 2016 23:52:36 +0000 (15:52 -0800)] 
pciutils: Add decode for Atomic Ops in lspci

This adds support for decoding Atomic ops added in ECN
https://pcisig.com/sites/default/files/specification_documents/ECN_Atomic_Ops_080417.pdf

Signed-off-by: Satanand Burla <satananda.burla@caviumnetworks.com>
7 years agolspci: Support GEN4 speed (16GT/s)
Gavin Shan [Tue, 14 Feb 2017 23:53:45 +0000 (10:53 +1100)] 
lspci: Support GEN4 speed (16GT/s)

This enables "lspci" to show GEN4 speed (16GT/s) properly according
to the contents in register PCI_EXP_LNKCAP, PCI_EXP_LNKSTA and
PCI_EXP_LNKCTL2.

Reported-by: Carol Soto <clsoto@us.ibm.com>
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
7 years agolspci: better display of ranges behind a bridge
Martin Mares [Sat, 31 Dec 2016 15:55:23 +0000 (16:55 +0100)] 
lspci: better display of ranges behind a bridge

When the range is non-empty, it is always printed together with
its size.

If it is empty, the output depends on the verbosity level chosen:

  - no verbosity: nothing is printed
  - -vvv: full range is printed
  - anything between: "none" is printed

Thanks to Harry Mallon and Bjorn Helgaas for inspiration.

7 years agols-kernel: use libkmod's default to find modules
Vladimír Čunát [Thu, 24 Nov 2016 15:56:09 +0000 (16:56 +0100)] 
ls-kernel: use libkmod's default to find modules

7 years agoReleased as 3.5.2 v3.5.2
Martin Mares [Mon, 3 Oct 2016 19:58:48 +0000 (21:58 +0200)] 
Released as 3.5.2

7 years agoUpdated pci.ids to today's snapshot
Martin Mares [Mon, 3 Oct 2016 19:56:37 +0000 (21:56 +0200)] 
Updated pci.ids to today's snapshot

7 years agoMerge branch 'l1pm'
Martin Mares [Mon, 3 Oct 2016 19:49:11 +0000 (21:49 +0200)] 
Merge branch 'l1pm'

7 years agopciutils: Update the tests/cap-l1-pm with actual device data
Rajat Jain [Sat, 1 Oct 2016 00:41:44 +0000 (17:41 -0700)] 
pciutils: Update the tests/cap-l1-pm with actual device data

Update the test data using lspci output taken from a card that supports
L1 PM supstates.

Signed-off-by: Rajat Jain <rajatja@google.com>
7 years agosetpci: fix length of SUBSYSTEM_VENDOR_ID
Charles.Rose@dell.com [Mon, 26 Sep 2016 15:00:19 +0000 (15:00 +0000)] 
setpci: fix length of SUBSYSTEM_VENDOR_ID

SUBSYSTEM_VENDOR_ID should be 2 bytes, not 4.
Thanks to Christopher Arzola for catching this.

Signed-off-by: Charles Rose <charles_rose@dell.com>
7 years agoCleaned up the previous patch
Martin Mares [Mon, 26 Sep 2016 18:20:26 +0000 (20:20 +0200)] 
Cleaned up the previous patch

7 years agolspci: Parse all the L1 PM substate capability regs
Rajat Jain [Fri, 9 Sep 2016 00:05:30 +0000 (17:05 -0700)] 
lspci: Parse all the L1 PM substate capability regs

Parse the control registers to display all the L1 PM
substate configuration information.

Signed-off-by: Rajat Jain <rajatja@google.com>
7 years agoReleased as 3.5.1. v3.5.1
Martin Mares [Sun, 22 May 2016 07:55:55 +0000 (09:55 +0200)] 
Released as 3.5.1.

7 years agoFix symbol versioning of pci_init()
Martin Mares [Sun, 22 May 2016 07:54:35 +0000 (09:54 +0200)] 
Fix symbol versioning of pci_init()

Thanks to Ian Stakenvicius <axs@gentoo.org> for reporting the bug.

7 years agoReleased as 3.5.0. v3.5.0
Martin Mares [Thu, 19 May 2016 15:57:01 +0000 (17:57 +0200)] 
Released as 3.5.0.

7 years agoUpdated pci.ids to today's snapshot
Martin Mares [Thu, 19 May 2016 15:44:09 +0000 (17:44 +0200)] 
Updated pci.ids to today's snapshot

7 years agolspci: Add test case for PTM
Yong, Jonathan [Wed, 18 May 2016 07:10:02 +0000 (07:10 +0000)] 
lspci: Add test case for PTM

These are the software dummy PTM master and endpoints, but should
be enough to test register decoding.

Signed-off-by: Yong, Jonathan <jonathan.yong@intel.com>
7 years agoMerge branch 'dpc'
Martin Mares [Sat, 14 May 2016 10:02:04 +0000 (12:02 +0200)] 
Merge branch 'dpc'

Conflicts:
lib/header.h

7 years agoAdd support for Downstream Port Containment
Keith Busch [Tue, 26 Apr 2016 22:49:17 +0000 (16:49 -0600)] 
Add support for Downstream Port Containment

The PCI SIG added the Downstream Port Containment capability. This patch
decodes this for lspci, and defines the extended capability for setpci.

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoDomains: Legacy 16-bit domain numbers are maintained in generic code
Martin Mares [Sat, 14 May 2016 09:57:01 +0000 (11:57 +0200)] 
Domains: Legacy 16-bit domain numbers are maintained in generic code

Previously, backward compatibility was kept only with the sysfs
back-end.

Also, domains which do not fit in 16 bits are replaced by 0xffff.

7 years agoDomains: Upgraded ABI version to 3.5
Martin Mares [Sat, 14 May 2016 09:49:57 +0000 (11:49 +0200)] 
Domains: Upgraded ABI version to 3.5

7 years agoMerge branch 'domains'
Martin Mares [Sat, 14 May 2016 09:48:32 +0000 (11:48 +0200)] 
Merge branch 'domains'

Conflicts:
lib/pci.h

7 years agopciutils: Add support for 32-bit PCI domains
Keith Busch [Thu, 17 Mar 2016 19:19:17 +0000 (13:19 -0600)] 
pciutils: Add support for 32-bit PCI domains

This adds support for new host bridges that may create PCI domain number
values requiring more than 16 bits. The new domain 32-bit integer is
signed to allow -1 for "any", and is sufficient as the domain number
will never require the full 32-bits.

The domain field is appended at the end of struct pci_dev, and the
current location of the 16-bit domain remains for compatibility. The
domain number is truncated and copied into the legacy domain location
so existing applications linking to the library will continue to work
without modification. We accept that these applications may not work
correctly on machines with host bridges exporting 32-bit domains.

In order to force new programs to link to the new ABI, the pci_init
function call is versioned in this commit.

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoNetBSD: Make extended configuration space available
Martin Mares [Sat, 14 May 2016 09:31:59 +0000 (11:31 +0200)] 
NetBSD: Make extended configuration space available

Patch by Masanobu SAITOH <msaitoh@execsw.org>.

7 years agoA few minor corrections to the IORESOURCE changes
Martin Mares [Sat, 14 May 2016 09:30:40 +0000 (11:30 +0200)] 
A few minor corrections to the IORESOURCE changes

7 years agoAdd support for enhanced allocation regions
Sean O. Stalley [Fri, 12 Feb 2016 00:52:25 +0000 (16:52 -0800)] 
Add support for enhanced allocation regions

Append [enhanced] to Regions that contain the BEI flag in sysfs.
To do this, we need to add the resource flags to the pci_dev struct.
This struct is passed through the libpci API, so we increment the API version number.

Don't truncate least significant bits of the region size.
ex: a 2000 byte region should display [size=2000] instead of [size=1K]

Signed-off-by: Sean O. Stalley <sean.stalley@intel.com>
7 years agolspci: Decode Precision Time Measurement capabiltity
Yong, Jonathan [Tue, 10 May 2016 03:15:55 +0000 (03:15 +0000)] 
lspci: Decode Precision Time Measurement capabiltity

Section 7.32 Precision Time Management (or Measurement) from the
PCI Express Base 3.1 specification is an optional Extended Capability
for discovering and controlling the distribution of a PTM Hierarchy.

Signed-off-by: Yong, Jonathan <jonathan.yong@intel.com>
8 years agoReleased as 3.4.1. v3.4.1
Martin Mares [Sun, 3 Jan 2016 14:19:41 +0000 (15:19 +0100)] 
Released as 3.4.1.

8 years agopci.ids updated to today's snapshot
Martin Mares [Sun, 3 Jan 2016 14:18:55 +0000 (15:18 +0100)] 
pci.ids updated to today's snapshot

8 years agoAdd lspci support for Enhanced Allocation Capability.
David Daney [Wed, 23 Dec 2015 00:33:51 +0000 (16:33 -0800)] 
Add lspci support for Enhanced Allocation Capability.

The PCISIG recently added the Enhanced Allocation Capability.  Decode
it in lspci.

8 years agolspci: Decode DevCap SlotPowerLimit for all components with Upstream Ports
Bjorn Helgaas [Thu, 10 Dec 2015 19:50:01 +0000 (13:50 -0600)] 
lspci: Decode DevCap SlotPowerLimit for all components with Upstream Ports

The SlotPowerLimit in the Slot Capability indicates how much power the slot
can supply to a downstream device.  A Root Port or Switch Downstream Port
communicates the limit via a Set_Slot_Power_Limit Message on the link.  The
component on the other end of the link copies the limit from the message to
the Captured Slot Power Limit in its Device Capability [see PCIe r3.0, sec
2.2.8.5].

The Captured SlotPowerLimit is relevant for all devices on the downstream
end of a Link.  This includes Endpoints and Bridges as well as
Switch Upstream Ports.

Decode the DevCap Captured SlotPowerLimit for Endpoints and Bridges as well
as Switch Upstream Ports.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
8 years agoOmit unnecessary commas in PASID/PRI capabilities
Martin Mares [Tue, 27 Oct 2015 11:19:10 +0000 (12:19 +0100)] 
Omit unnecessary commas in PASID/PRI capabilities

8 years agoDecode PASID and PRI extended capabilities
David Woodhouse [Thu, 15 Oct 2015 18:44:16 +0000 (19:44 +0100)] 
Decode PASID and PRI extended capabilities

8 years agoREADME: SourceForge mirrors replaced by GitHub
Martin Mares [Sat, 19 Sep 2015 13:50:26 +0000 (15:50 +0200)] 
README: SourceForge mirrors replaced by GitHub