1. 12 9月, 2012 3 次提交
  2. 24 8月, 2012 35 次提交
  3. 23 8月, 2012 2 次提交
    • J
      PCI/core: Use PCI Express Capability accessors · 59875ae4
      Jiang Liu 提交于
      Use PCI Express Capability access functions to simplify core.
      Signed-off-by: NJiang Liu <jiang.liu@huawei.com>
      Signed-off-by: NYijing Wang <wangyijing@huawei.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      59875ae4
    • J
      PCI: Add accessors for PCI Express Capability · 8c0d3a02
      Jiang Liu 提交于
      The PCI Express Capability (PCIe spec r3.0, sec 7.8) comes in two
      versions, v1 and v2.  In v1 Capability structures (PCIe spec r1.0 and
      r1.1), some fields are optional, so the structure size depends on the
      device type.
      
      This patch adds functions to access this capability so drivers don't
      have to be aware of the differences between v1 and v2.  Note that these
      new functions apply only to the "PCI Express Capability," not to any of
      the other "PCI Express Extended Capabilities" (AER, VC, ACS, MFVC, etc.)
      
      Function pcie_capability_read_word/dword() reads the PCIe Capabilities
      register and returns the value in the reference parameter "val".  If
      the PCIe Capabilities register is not implemented on the PCIe device,
      "val" is set to 0.
      
      Function pcie_capability_write_word/dword() writes the value to the
      specified PCIe Capability register.
      
      Function pcie_capability_clear_and_set_word/dword() sets and/or clears bits
      of a PCIe Capability register.
      
      [bhelgaas: changelog, drop "pci_" prefixes, don't export
      pcie_capability_reg_implemented()]
      Signed-off-by: NJiang Liu <jiang.liu@huawei.com>
      Signed-off-by: NYijing Wang <wangyijing@huawei.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      8c0d3a02