linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v2 00/32] provide interfaces to access PCIe capabilities registers
@ 2012-07-24 16:31 Jiang Liu
  2012-07-24 16:31 ` [RFC PATCH v2 01/32] PCI: add pcie_flags_reg into struct pci_dev to cache PCIe capabilities register Jiang Liu
                   ` (23 more replies)
  0 siblings, 24 replies; 34+ messages in thread
From: Jiang Liu @ 2012-07-24 16:31 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

These patch set is still RFC. It provides the new interfaces and has made the
major changes to adopt those new interfaces. But there are still several device
drivers left untouched. Any comments about the new interfaces are welcomed,
especially about function names:). Once we reach an agreement, I will send out
a formal version with all needed work done.

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.

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                         |    7 +-
 arch/mips/pci/pci-octeon.c                         |    7 +-
 arch/powerpc/platforms/powernv/pci-ioda.c          |    2 +-
 arch/tile/kernel/pci.c                             |   17 +-
 drivers/gpu/drm/radeon/evergreen.c                 |    9 +-
 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   |   24 +-
 drivers/net/ethernet/broadcom/tg3.c                |   46 ++--
 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c         |   19 +-
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c    |   10 +-
 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c         |    7 +-
 drivers/net/ethernet/intel/e1000e/netdev.c         |   20 +-
 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   |   21 +-
 drivers/net/ethernet/neterion/vxge/vxge-config.c   |    4 +-
 .../net/ethernet/qlogic/netxen/netxen_nic_main.c   |    2 +-
 drivers/net/ethernet/realtek/r8169.c               |   35 +--
 drivers/net/ethernet/sun/niu.c                     |    9 +-
 drivers/net/wireless/ath/ath9k/pci.c               |   18 +-
 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                               |  157 ++++++++++++
 drivers/pci/hotplug/pciehp_acpi.c                  |    6 +-
 drivers/pci/hotplug/pciehp_hpc.c                   |   10 +-
 drivers/pci/hotplug/pcihp_slot.c                   |   12 +-
 drivers/pci/iov.c                                  |    6 +-
 drivers/pci/pci.c                                  |  262 +++++---------------
 drivers/pci/pcie/aer/aer_inject.c                  |    2 +-
 drivers/pci/pcie/aer/aerdrv.c                      |   23 +-
 drivers/pci/pcie/aer/aerdrv_acpi.c                 |    2 +-
 drivers/pci/pcie/aer/aerdrv_core.c                 |   27 +-
 drivers/pci/pcie/aspm.c                            |  108 ++++----
 drivers/pci/pcie/pme.c                             |   23 +-
 drivers/pci/pcie/portdrv_bus.c                     |    2 +-
 drivers/pci/pcie/portdrv_core.c                    |   24 +-
 drivers/pci/pcie/portdrv_pci.c                     |   15 +-
 drivers/pci/probe.c                                |   29 +--
 drivers/pci/quirks.c                               |    9 +-
 drivers/pci/search.c                               |    2 +-
 drivers/rapidio/devices/tsi721.c                   |   13 +-
 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                    |    9 +-
 drivers/staging/rtl8192e/rtl8192e/rtl_pci.c        |    8 +-
 include/linux/pci.h                                |   17 +-
 include/linux/pci_regs.h                           |    2 +
 53 files changed, 510 insertions(+), 626 deletions(-)

-- 
1.7.9.5


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

end of thread, other threads:[~2012-07-29 16:22 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-24 16:31 [RFC PATCH v2 00/32] provide interfaces to access PCIe capabilities registers Jiang Liu
2012-07-24 16:31 ` [RFC PATCH v2 01/32] PCI: add pcie_flags_reg into struct pci_dev to cache PCIe capabilities register Jiang Liu
2012-07-25 15:12   ` Don Dutile
2012-07-26 13:47     ` Yijing Wang
2012-07-24 16:31 ` [RFC PATCH v2 02/32] PCI: introduce pci_pcie_type(dev) to replace pci_dev->pcie_type Jiang Liu
2012-07-24 16:31 ` [RFC PATCH v2 03/32] PCI: remove unused field pcie_type from struct pci_dev Jiang Liu
2012-07-24 16:31 ` [RFC PATCH v2 04/32] PCI: add PCIe capabilities access functions to hide differences among PCIe specs Jiang Liu
2012-07-24 21:12   ` Don Dutile
2012-07-29 16:22     ` Jiang Liu
2012-07-24 16:31 ` [RFC PATCH v2 05/32] PCI/core: use PCIe capabilities access functions to simplify implementation Jiang Liu
2012-07-25 21:12   ` Don Dutile
2012-07-29  2:12     ` Jiang Liu
2012-07-24 16:31 ` [RFC PATCH v2 06/32] PCI/hotplug: " Jiang Liu
2012-07-24 16:31 ` [RFC PATCH v2 07/32] PCI/portdrv: " Jiang Liu
2012-07-25  5:51   ` Kaneshige, Kenji
2012-07-25  9:44     ` Jiang Liu
2012-07-24 16:31 ` [RFC PATCH v2 08/32] PCI/pciehp: " Jiang Liu
2012-07-24 16:31 ` [RFC PATCH v2 09/32] PCI/PME: " Jiang Liu
2012-07-24 16:31 ` [RFC PATCH v2 10/32] PCI/AER: " Jiang Liu
2012-07-24 16:31 ` [RFC PATCH v2 11/32] PCI/ASPM: " Jiang Liu
2012-07-24 16:31 ` [RFC PATCH v2 12/32] PCI/ARM: " Jiang Liu
2012-07-24 16:31 ` [RFC PATCH v2 13/32] PCI/MIPS: " Jiang Liu
2012-07-24 16:31 ` [RFC PATCH v2 14/32] PCI/tile: " Jiang Liu
2012-07-24 16:31 ` [RFC PATCH v2 15/32] PCI/r8169: " Jiang Liu
2012-07-24 16:31 ` [RFC PATCH v2 16/32] PCI/broadcom: " Jiang Liu
2012-07-24 16:31 ` [RFC PATCH v2 17/32] PCI/igb: " Jiang Liu
2012-07-24 16:31 ` [RFC PATCH v2 18/32] PCI/vxge: " Jiang Liu
2012-07-24 16:31 ` [RFC PATCH v2 19/32] PCI/mlx4: " Jiang Liu
2012-07-24 16:31 ` [RFC PATCH v2 20/32] PCI/niu: " Jiang Liu
2012-07-24 16:31 ` [RFC PATCH v2 21/32] PCI/myri10ge: " Jiang Liu
2012-07-24 16:31 ` [RFC PATCH v2 22/32] PCI/chelsio: " Jiang Liu
2012-07-24 16:31 ` [RFC PATCH v2 23/32] PCI/atl1c: " Jiang Liu
2012-07-24 21:09 ` [RFC PATCH v2 00/32] provide interfaces to access PCIe capabilities registers Don Dutile
2012-07-29  2:26   ` Jiang Liu

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).