]> git.openfabrics.org - ~emulex/infiniband.git/commit
PCI: remove redundant capabilities checking in pci_{save, restore}_pcie_state
authorMyron Stowe <myron.stowe@redhat.com>
Fri, 1 Jun 2012 21:16:43 +0000 (15:16 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 12 Jun 2012 02:41:28 +0000 (20:41 -0600)
commit9cb604ed45a31419bab3877472691a5da15a3c47
tree6a9c237f2af76b3ac257fb6ee477cc8fb7b89980
parentc463b8cb9350cf1230cefe467a1cf279140a5437
PCI: remove redundant capabilities checking in pci_{save, restore}_pcie_state

Unlike PCI Express v1's Capabilities Structure, v2's requires the entire
structure to be implemented.  In v2 structures, register fields that
are not implemented are present but hardwired to 0x0.  These may
include: Link Capabilities, Status, and Control; Slot Capabilities,
Status, and Control; Root Capabilities, Status, and Control; and all of
the '2' (Device, Link, and Slot) Capabilities, Status, and Control
registers.

This patch removes the redundant capability checks corresponding to the
Link 2's and Slot 2's, Capabilities, Status, and Control registers as they
will be present if Device Capabilities 2's registers are (which explains
why the macros for each of the three are identical).

Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pci.c