linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/32] provide interfaces to access PCIe capabilities registers
@ 2012-08-01 15:54 Jiang Liu
  2012-08-01 15:54 ` [PATCH v3 01/32] PCI: add pcie_flags_reg into struct pci_dev to cache PCIe capabilities register Jiang Liu
                   ` (32 more replies)
  0 siblings, 33 replies; 60+ messages in thread
From: Jiang Liu @ 2012-08-01 15:54 UTC (permalink / raw)
  To: Bjorn Helgaas, Don Dutile
  Cc: Jiang Liu, Yinghai Lu, Taku Izumi, Rafael J . Wysocki,
	Kenji Kaneshige, Yijing Wang, linux-kernel, linux-pci

From: Jiang Liu <liuj97@gmail.com>

As suggested by Bjorn Helgaas and Don Dutile in threads
http://www.spinics.net/lists/linux-pci/msg15663.html, we could improve access
to PCIe capabilities register in to way:
1) cache content of PCIe Capabilities Register into struct pce_dev to avoid
   repeatedly reading this register because it's read only.
2) provide access functions for PCIe Capabilities registers to hide differences
   among PCIe base specifications, so the caller don't need to handle those
   differences.

This patch set applies to
git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git pci-next

And you could pull the change set from
https://github.com/jiangliu/linux.git topic/pcie-cap

v2: 1) change return value to 0 when the register is not implemented by
       V1 PCIe devices.
    2) Change all driver in the source tree to use the new interfaces.

v3: 1) be more aggresive to remoce if (pci_is_pcie(dev)) check according to
       Don's suggestion.
    2) Don't cache MSI/MSI-x information in PCIe capabilities flag register
       according to Kenji's suggestion.
    3) add new pci_pcie_capability_change_word/dword() to reduce duplicated
       code.

Jiang Liu (29):
  PCI: add PCIe capabilities access functions to hide differences among
    PCIe specs
  PCI/core: use PCIe capabilities access functions to simplify
    implementation
  PCI/hotplug: use PCIe capabilities access functions to simplify
    implementation
  PCI/portdrv: use PCIe capabilities access functions to simplify
    implementation
  PCI/pciehp: use PCIe capabilities access functions to simplify
    implementation
  PCI/PME: use PCIe capabilities access functions to simplify
    implementation
  PCI/AER: use PCIe capabilities access functions to simplify
    implementation
  PCI/ASPM: use PCIe capabilities access functions to simplify
    implementation
  PCI/ARM: use PCIe capabilities access functions to simplify
    implementation
  PCI/MIPS: use PCIe capabilities access functions to simplify
    implementation
  PCI/tile: use PCIe capabilities access functions to simplify
    implementation
  PCI/r8169: use PCIe capabilities access functions to simplify
    implementation
  PCI/broadcom: use PCIe capabilities access functions to simplify
    implementation
  PCI/igb: use PCIe capabilities access functions to simplify
    implementation
  PCI/vxge: use PCIe capabilities access functions to simplify
    implementation
  PCI/mlx4: use PCIe capabilities access functions to simplify
    implementation
  PCI/niu: use PCIe capabilities access functions to simplify
    implementation
  PCI/myri10ge: use PCIe capabilities access functions to simplify
    implementation
  PCI/chelsio: use PCIe capabilities access functions to simplify
    implementation
  PCI/atl1c: use PCIe capabilities access functions to simplify
    implementation
  PCI/ath9k: use PCIe capabilities access functions to simplify
    implementation
  PCI/iwl: use PCIe capabilities access functions to simplify
    implementation
  PCI/mthca: use PCIe capabilities access functions to simplify
    implementation
  PCI/qib: use PCIe capabilities access functions to simplify
    implementation
  PCI/qla: use PCIe capabilities access functions to simplify
    implementation
  PCI/radeon: use PCIe capabilities access functions to simplify
    implementation
  PCI/tsi721: use PCIe capabilities access functions to simplify
    implementation
  PCI/et131x: use PCIe capabilities access functions to simplify
    implementation
  PCI/rtl8192e: use PCIe capabilities access functions to simplify
    implementation

Yijing Wang (3):
  PCI: add pcie_flags_reg into struct pci_dev to cache PCIe
    capabilities register
  PCI: introduce pci_pcie_type(dev) to replace pci_dev->pcie_type
  PCI: remove unused field pcie_type from struct pci_dev

 arch/arm/mach-tegra/pcie.c                         |   13 +-
 arch/mips/pci/pci-octeon.c                         |   15 +-
 arch/powerpc/platforms/powernv/pci-ioda.c          |    2 +-
 arch/tile/kernel/pci.c                             |   25 +-
 drivers/gpu/drm/radeon/evergreen.c                 |   10 +-
 drivers/infiniband/hw/mthca/mthca_reset.c          |    8 +-
 drivers/infiniband/hw/qib/qib_pcie.c               |   40 +--
 drivers/iommu/intel-iommu.c                        |    6 +-
 drivers/net/ethernet/atheros/atl1c/atl1c_main.c    |    2 +-
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c   |   25 +-
 drivers/net/ethernet/broadcom/tg3.c                |   60 ++--
 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c         |   19 +-
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c    |   11 +-
 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c         |   10 +-
 drivers/net/ethernet/intel/e1000e/netdev.c         |   27 +-
 drivers/net/ethernet/intel/igb/igb_main.c          |   12 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c      |    2 +-
 drivers/net/ethernet/mellanox/mlx4/reset.c         |    8 +-
 drivers/net/ethernet/myricom/myri10ge/myri10ge.c   |   39 +--
 drivers/net/ethernet/neterion/vxge/vxge-config.c   |    4 +-
 .../net/ethernet/qlogic/netxen/netxen_nic_main.c   |    2 +-
 drivers/net/ethernet/realtek/r8169.c               |   44 +--
 drivers/net/ethernet/sun/niu.c                     |   18 +-
 drivers/net/wireless/ath/ath9k/pci.c               |   21 +-
 drivers/net/wireless/iwlegacy/common.h             |    5 +-
 drivers/net/wireless/iwlwifi/iwl-trans-pcie.c      |    4 +-
 drivers/net/wireless/rtlwifi/pci.c                 |    8 +-
 drivers/pci/access.c                               |  195 ++++++++++++
 drivers/pci/hotplug/pciehp_acpi.c                  |    6 +-
 drivers/pci/hotplug/pciehp_hpc.c                   |   12 +-
 drivers/pci/hotplug/pcihp_slot.c                   |   20 +-
 drivers/pci/iov.c                                  |    6 +-
 drivers/pci/pci.c                                  |  324 ++++----------------
 drivers/pci/pcie/aer/aer_inject.c                  |    2 +-
 drivers/pci/pcie/aer/aerdrv.c                      |   24 +-
 drivers/pci/pcie/aer/aerdrv_acpi.c                 |    2 +-
 drivers/pci/pcie/aer/aerdrv_core.c                 |   47 +--
 drivers/pci/pcie/aspm.c                            |  111 +++----
 drivers/pci/pcie/pme.c                             |   28 +-
 drivers/pci/pcie/portdrv_bus.c                     |    2 +-
 drivers/pci/pcie/portdrv_core.c                    |   19 +-
 drivers/pci/pcie/portdrv_pci.c                     |   18 +-
 drivers/pci/probe.c                                |   29 +-
 drivers/pci/quirks.c                               |    9 +-
 drivers/pci/search.c                               |    2 +-
 drivers/rapidio/devices/tsi721.c                   |   19 +-
 drivers/scsi/qla2xxx/qla_init.c                    |    4 +-
 drivers/scsi/qla2xxx/qla_nx.c                      |    8 +-
 drivers/scsi/qla4xxx/ql4_nx.c                      |    4 +-
 drivers/staging/et131x/et131x.c                    |   19 +-
 drivers/staging/rtl8192e/rtl8192e/rtl_pci.c        |    8 +-
 include/linux/pci.h                                |   21 +-
 include/linux/pci_regs.h                           |    2 +
 53 files changed, 553 insertions(+), 828 deletions(-)

-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 60+ messages in thread

end of thread, other threads:[~2012-08-24 18:53 UTC | newest]

Thread overview: 60+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-01 15:54 [PATCH v3 00/32] provide interfaces to access PCIe capabilities registers Jiang Liu
2012-08-01 15:54 ` [PATCH v3 01/32] PCI: add pcie_flags_reg into struct pci_dev to cache PCIe capabilities register Jiang Liu
2012-08-01 15:54 ` [PATCH v3 02/32] PCI: introduce pci_pcie_type(dev) to replace pci_dev->pcie_type Jiang Liu
2012-08-01 15:54 ` [PATCH v3 03/32] PCI: remove unused field pcie_type from struct pci_dev Jiang Liu
2012-08-01 15:54 ` [PATCH v3 04/32] PCI: add PCIe capabilities access functions to hide differences among PCIe specs Jiang Liu
2012-08-01 15:54 ` [PATCH v3 05/32] PCI/core: use PCIe capabilities access functions to simplify implementation Jiang Liu
2012-08-01 15:54 ` [PATCH v3 06/32] PCI/hotplug: " Jiang Liu
2012-08-02  1:30   ` Kaneshige, Kenji
2012-08-01 15:54 ` [PATCH v3 07/32] PCI/portdrv: " Jiang Liu
2012-08-02  1:33   ` Kaneshige, Kenji
2012-08-01 15:54 ` [PATCH v3 08/32] PCI/pciehp: " Jiang Liu
2012-08-02  1:37   ` Kaneshige, Kenji
2012-08-01 15:54 ` [PATCH v3 09/32] PCI/PME: " Jiang Liu
2012-08-01 15:54 ` [PATCH v3 10/32] PCI/AER: " Jiang Liu
2012-08-01 15:54 ` [PATCH v3 11/32] PCI/ASPM: " Jiang Liu
2012-08-01 15:54 ` [PATCH v3 12/32] PCI/ARM: " Jiang Liu
2012-08-01 17:20   ` Stephen Warren
2012-08-02  5:58     ` Thierry Reding
2012-08-03 18:05   ` Stephen Warren
2012-08-01 15:54 ` [PATCH v3 13/32] PCI/MIPS: " Jiang Liu
2012-08-13 21:40   ` David Daney
2012-08-01 15:54 ` [PATCH v3 14/32] PCI/tile: " Jiang Liu
2012-08-01 21:07   ` Chris Metcalf
2012-08-01 15:54 ` [PATCH v3 15/32] PCI/r8169: " Jiang Liu
2012-08-01 15:54 ` [PATCH v3 16/32] PCI/broadcom: " Jiang Liu
2012-08-01 15:54 ` [PATCH v3 17/32] PCI/igb: " Jiang Liu
2012-08-02 22:12   ` Jeff Kirsher
2012-08-01 15:54 ` [PATCH v3 18/32] PCI/vxge: " Jiang Liu
2012-08-01 15:54 ` [PATCH v3 19/32] PCI/mlx4: " Jiang Liu
2012-08-01 15:54 ` [PATCH v3 20/32] PCI/niu: " Jiang Liu
2012-08-01 15:54 ` [PATCH v3 21/32] PCI/myri10ge: " Jiang Liu
2012-08-01 15:54 ` [PATCH v3 22/32] PCI/chelsio: " Jiang Liu
2012-08-01 15:54 ` [PATCH v3 23/32] PCI/atl1c: " Jiang Liu
2012-08-01 15:54 ` [PATCH v3 24/32] PCI/ath9k: " Jiang Liu
2012-08-01 15:54 ` [PATCH v3 25/32] PCI/iwl: " Jiang Liu
2012-08-01 15:54 ` [PATCH v3 26/32] PCI/mthca: " Jiang Liu
2012-08-02 21:46   ` Roland Dreier
2012-08-01 15:54 ` [PATCH v3 27/32] PCI/qib: " Jiang Liu
2012-08-01 17:30   ` Marciniszyn, Mike
2012-08-01 15:54 ` [PATCH v3 28/32] PCI/qla: " Jiang Liu
2012-08-01 15:54 ` [PATCH v3 29/32] PCI/radeon: " Jiang Liu
2012-08-01 16:04   ` Deucher, Alexander
2012-08-01 15:54 ` [PATCH v3 30/32] PCI/tsi721: " Jiang Liu
2012-08-09 14:16   ` Bounine, Alexandre
2012-08-01 15:54 ` [PATCH v3 31/32] PCI/et131x: " Jiang Liu
2012-08-01 15:54 ` [PATCH v3 32/32] PCI/rtl8192e: " Jiang Liu
2012-08-14  4:25 ` [PATCH v3 00/32] provide interfaces to access PCIe capabilities registers Bjorn Helgaas
2012-08-14 15:46   ` Jiang Liu
2012-08-20 15:26   ` Jiang Liu
2012-08-20 15:35     ` Bjorn Helgaas
2012-08-20 15:47       ` Jiang Liu
2012-08-20 16:10         ` Bjorn Helgaas
2012-08-20 22:13           ` Bjorn Helgaas
2012-08-21  4:40             ` Cui, Dexuan
2012-08-22 16:28               ` Bjorn Helgaas
2012-08-23  1:00                 ` Cui, Dexuan
2012-08-23  1:51                 ` Don Dutile
2012-08-21 15:59             ` Jiang Liu
2012-08-22 17:08               ` Bjorn Helgaas
2012-08-24 18:52     ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).