]> git.ipfire.org Git - thirdparty/pciutils.git/log
thirdparty/pciutils.git
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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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

8 years agoMaint: Remember to push to Github, too
Martin Mares [Sat, 19 Sep 2015 13:18:06 +0000 (15:18 +0200)] 
Maint: Remember to push to Github, too

8 years agoReleased as 3.4.0. v3.4.0
Martin Mares [Mon, 14 Sep 2015 15:53:11 +0000 (17:53 +0200)] 
Released as 3.4.0.

8 years agoUpdated pci.ids to today's snapshot
Martin Mares [Mon, 14 Sep 2015 15:49:29 +0000 (17:49 +0200)] 
Updated pci.ids to today's snapshot

8 years agolib/configure: Also accept host tuples without vendor string
Felix Janda [Sun, 12 Apr 2015 07:16:28 +0000 (09:16 +0200)] 
lib/configure: Also accept host tuples without vendor string

Based on patch from
https://bugs.gentoo.org/show_bug.cgi?id=425022

8 years agolspci calls pci_fill_info() only as needed
Martin Mares [Mon, 14 Sep 2015 15:44:45 +0000 (17:44 +0200)] 
lspci calls pci_fill_info() only as needed

Previously, lspci always asked for all attributes, even in terse
mode where most of them are not shown.

8 years agoSysfs: Read failures of optional attributes are not fatal
Martin Mares [Mon, 14 Sep 2015 15:43:04 +0000 (17:43 +0200)] 
Sysfs: Read failures of optional attributes are not fatal

Ameya Palande reported that with some kernels, reads of such
attributes fail on some hardware. He suggested to ignore read
failures completely, but I decided to turn the errors into
warnings in such cases. At least, the user will know that something
fishy is going on.

8 years agoOops, numa_node should not be a mandatory attribute
Martin Mares [Mon, 14 Sep 2015 15:42:11 +0000 (17:42 +0200)] 
Oops, numa_node should not be a mandatory attribute

8 years agoUpdated fixed-version references to pci_fill_info
Martin Mares [Mon, 14 Sep 2015 15:24:29 +0000 (17:24 +0200)] 
Updated fixed-version references to pci_fill_info

8 years agoNUMA node scanning is now done in an ABI-compatible way
Martin Mares [Mon, 14 Sep 2015 15:00:28 +0000 (17:00 +0200)] 
NUMA node scanning is now done in an ABI-compatible way

The numa_node field was moved to the end of the public part of
struct pci_dev. As usually, it has to be requested using the
PCI_FILL_NUMA_NODE and pci_fill_info() is versioned.

8 years agoWhitespace fixes
Martin Mares [Mon, 14 Sep 2015 14:48:32 +0000 (16:48 +0200)] 
Whitespace fixes

8 years agoImproved reporting of NUMA nodes
Martin Mares [Mon, 14 Sep 2015 14:46:49 +0000 (16:46 +0200)] 
Improved reporting of NUMA nodes

They are also printed in "-vv" and "-nv" modes now.

8 years agoReport NUMA node in lspci -v
Matthew Wilcox [Wed, 22 Apr 2015 20:27:21 +0000 (16:27 -0400)] 
Report NUMA node in lspci -v

In multi-socket systems, it's useful to see which node a particular
PCI device belongs to.  Linux provides this information through sysfs,
but some users don't like poking through sysfs themselves to find it,
and it's pretty straightforward to report it in lspci.

I should note that when there is no NUMA node for a particular device,
Linux reports -1.  I've chosen to continue that convention in pciutils,
and simply omit the information if the device does not belong to a NUMA
node (eg on single-socket systems, or devices which are not preferentially
attached to a particular node, like Nehalem-based systems).

8 years agoFixed naming inconsistency in man page: slot vs. device
Martin Mares [Mon, 14 Sep 2015 14:40:42 +0000 (16:40 +0200)] 
Fixed naming inconsistency in man page: slot vs. device

Thanks to Robert Urban for pointing it out.

9 years agoFix broken backward compat struct translation for pci filters
Lucas Stach [Mon, 13 Apr 2015 18:42:25 +0000 (20:42 +0200)] 
Fix broken backward compat struct translation for pci filters

This seems to be a copy&paste error in both directions of the
compat translation.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
9 years agoFixing up release 3.3.1 to contain new pci.ids v3.3.1
Martin Mares [Thu, 9 Apr 2015 14:42:40 +0000 (16:42 +0200)] 
Fixing up release 3.3.1 to contain new pci.ids

9 years agoUpdate pci.ids to today's snapshot
Martin Mares [Thu, 9 Apr 2015 14:42:12 +0000 (16:42 +0200)] 
Update pci.ids to today's snapshot

9 years agoReleased as 3.3.1.
Martin Mares [Thu, 9 Apr 2015 14:36:55 +0000 (16:36 +0200)] 
Released as 3.3.1.

9 years agopread.h: Remove support for libc5
Felix Janda [Sun, 29 Mar 2015 08:59:32 +0000 (09:59 +0100)] 
pread.h: Remove support for libc5

The support code for libc5 breaks building on linux i386 with
other libcs that don't define __GLIBC__.

9 years agoMaint: Make sure that there are no Vim swap files in the tarball
Martin Mares [Thu, 22 Jan 2015 21:47:16 +0000 (22:47 +0100)] 
Maint: Make sure that there are no Vim swap files in the tarball

9 years agoFixed memory allocation bug in name cache path code
Martin Mares [Thu, 22 Jan 2015 21:44:49 +0000 (22:44 +0100)] 
Fixed memory allocation bug in name cache path code

9 years agoImproved listing of vendor-specific information
Martin Mares [Thu, 22 Jan 2015 21:42:33 +0000 (22:42 +0100)] 
Improved listing of vendor-specific information

9 years agoAdded test case for virtio
Martin Mares [Thu, 22 Jan 2015 21:31:24 +0000 (22:31 +0100)] 
Added test case for virtio

9 years agoAdd virtio vendor capability support
Gerd Hoffmann [Wed, 21 Jan 2015 15:35:04 +0000 (16:35 +0100)] 
Add virtio vendor capability support

virtio uses vendor-specific capabilities to specify the location of
the virtio register ranges.  The specification can be found here:

http://docs.oasis-open.org/virtio/virtio/v1.0/cs01/virtio-v1.0-cs01.html#x1-690004

This patch adds support for decoding these capabilities to lspci.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
9 years agoFix small memory leak in names-cache
Martin Mares [Fri, 12 Dec 2014 17:18:35 +0000 (18:18 +0100)] 
Fix small memory leak in names-cache

Signed-off-by: Tomáš Chvátal <tchvatal@suse.cz>
---
 lib/names-cache.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/names-cache.c b/lib/names-cache.c
index 90a6454..c97ea30 100644
--- a/lib/names-cache.c
+++ b/lib/names-cache.c
@@ -39,7 +39,8 @@ static char *get_cache_name(struct pci_access *a)
   buf = pci_malloc(a, strlen(pw->pw_dir) + strlen(name+1) + 1);
   sprintf(buf, "%s%s", pw->pw_dir, name+1);
   pci_set_param_internal(a, "net.cache_name", buf, 0);
-  return buf;
+  pci_mfree(buf);
+  return pci_get_param(a, "net.cache_name");
 }

 int
--
2.1.3

9 years agoMaintenance scripts now upload to kernel.org automatically
Martin Mares [Mon, 10 Nov 2014 14:01:01 +0000 (15:01 +0100)] 
Maintenance scripts now upload to kernel.org automatically

9 years agoChangeLog: Fix formatting so that it is parseable by maint/release v3.3.0
Martin Mares [Mon, 10 Nov 2014 13:46:15 +0000 (14:46 +0100)] 
ChangeLog: Fix formatting so that it is parseable by maint/release

9 years agoUpdated PCI_LIB_VERSION
Martin Mares [Mon, 10 Nov 2014 13:40:50 +0000 (14:40 +0100)] 
Updated PCI_LIB_VERSION

9 years agoReleased as 3.3.0.
Martin Mares [Mon, 10 Nov 2014 13:38:10 +0000 (14:38 +0100)] 
Released as 3.3.0.

9 years agoUpdated pci.ids to today's snapshot.
Martin Mares [Mon, 10 Nov 2014 13:34:12 +0000 (14:34 +0100)] 
Updated pci.ids to today's snapshot.

9 years agoChangeLog: Mention filtering by class
Martin Mares [Sun, 2 Nov 2014 11:14:56 +0000 (12:14 +0100)] 
ChangeLog: Mention filtering by class