aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-08-23Merge branch 'pci/bjorn-cleanup-remove' into nextBjorn Helgaas11-261/+45
* pci/bjorn-cleanup-remove: PCI: Remove unused pci_dev_b() sgi-agp: Use list_for_each_entry() for bus->devices traversal parisc/PCI: Use list_for_each_entry() for bus->devices traversal parisc/PCI: Enable PERR/SERR on all devices frv/PCI: Use list_for_each_entry() for bus->devices traversal PCI: Leave normal LIST_POISON in deleted list entries PCI: Rename local variables to conventional names PCI: Remove unused, commented-out, code PCI: Stop and remove devices in one pass PCI: Fold stop and remove helpers into their callers PCI: Use list_for_each_entry() for bus->devices traversal PCI: Remove pci_stop_and_remove_behind_bridge() PCI: Don't export stop_bus_device and remove_bus_device interfaces pcmcia: Use common pci_stop_and_remove_bus_device() PCI: acpiphp: Use common pci_stop_and_remove_bus_device() PCI: acpiphp: Stop disabling bridges on remove
2012-08-23Merge branch 'pci/bjorn-find-next-ext-cap' into nextBjorn Helgaas3-10/+37
* pci/bjorn-find-next-ext-cap: PCI: Add Vendor-Specific Extended Capability header info PCI: Add pci_find_next_ext_capability() Conflicts: drivers/pci/pci.c
2012-08-23Merge branch 'pci/jiang-pcie-cap' into nextBjorn Helgaas52-823/+591
* pci/jiang-pcie-cap: (40 commits) rtl8192e: Use PCI Express Capability accessors et131x: Use PCI Express Capability accessors rapdio/tsi721: Use PCI Express Capability accessors drm/radeon: Use PCI Express Capability accessors [SCSI] qla4xxx: Use PCI Express Capability accessors [SCSI] qla4xxx: Use PCI Express Capability accessors IB/qib: Use PCI Express Capability accessors IB/mthca: Use PCI Express Capability accessors rtlwifi: Use PCI Express Capability accessors iwlwifi: Use PCI Express Capability accessors iwlegacy: Use PCI Express Capability accessors ath9k: Use PCI Express Capability accessors atl1c: Use PCI Express Capability accessors cxgb4: Use PCI Express Capability accessors cxgb3: Use PCI Express Capability accessors myri10ge: Use PCI Express Capability accessors niu: Use PCI Express Capability accessors mlx4: Use PCI Express Capability accessors vxge: Use PCI Express Capability accessors igb: Use PCI Express Capability accessors ...
2012-08-23rtl8192e: Use PCI Express Capability accessorsJiang Liu1-5/+3
Use PCI Express Capability access functions to simplify rtl8192e driver. Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2012-08-23et131x: Use PCI Express Capability accessorsJiang Liu1-14/+5
Use PCI Express Capability access functions to simplify et131x driver. Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2012-08-23rapdio/tsi721: Use PCI Express Capability accessorsJiang Liu1-12/+7
Use PCI Express Capability access functions to simplify tsi721 driver. [bhelgaas: use word (16-bit) accesses for PCI_EXP_DEVCTL, PCI_EXP_DEVCTL2] Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Alexandre Bounine <[email protected]>
2012-08-23drm/radeon: Use PCI Express Capability accessorsJiang Liu1-7/+3
Use PCI Express Capability access functions to simplify radeon driver. Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
2012-08-23[SCSI] qla4xxx: Use PCI Express Capability accessorsJiang Liu1-3/+1
Use PCI Express Capability access functions to simplify qla4xxx driver. Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2012-08-23[SCSI] qla4xxx: Use PCI Express Capability accessorsJiang Liu1-6/+2
Use PCI Express Capability access functions to simplify qla2xxx driver. Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2012-08-23IB/qib: Use PCI Express Capability accessorsJiang Liu1-23/+15
Use PCI Express Capability access functions to simplify qib driver. Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Yijing Wang <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Mike Marciniszyn <[email protected]>
2012-08-23IB/mthca: Use PCI Express Capability accessorsJiang Liu1-4/+4
Use PCI Express Capability access functions to simplify mthca driver. Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Yijing Wang <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Roland Dreier <[email protected]>
2012-08-23rtlwifi: Use PCI Express Capability accessorsJiang Liu1-5/+3
Use PCI Express Capability access functions to simplify rtlwifi driver. [bhelgaas: split iwlegacy, iwlwifi, rtlwifi into separate patches] Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2012-08-23iwlwifi: Use PCI Express Capability accessorsJiang Liu1-5/+2
Use PCI Express Capability access functions to simplify iwlwifi driver. [bhelgaas: split iwlegacy, iwlwifi, rtlwifi into separate patches] Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2012-08-23iwlegacy: Use PCI Express Capability accessorsJiang Liu1-3/+1
Use PCI Express Capability access functions to simplify iwlegacy driver. [bhelgaas: split iwlegacy, iwlwifi, rtlwifi into separate patches] Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2012-08-23ath9k: Use PCI Express Capability accessorsJiang Liu1-15/+6
Use PCI Express Capability access functions to simplify ath9k driver. Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2012-08-23atl1c: Use PCI Express Capability accessorsJiang Liu1-1/+1
Use PCI Express Capability access functions to simplify atl1c driver. Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2012-08-23cxgb4: Use PCI Express Capability accessorsJiang Liu2-13/+3
Use PCI Express Capability access functions to simplify cxgb4 driver. Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2012-08-23cxgb3: Use PCI Express Capability accessorsJiang Liu1-14/+8
Use PCI Express Capability access functions to simplify cxgb3 driver. [bhelgaas: split cxgb3 and cxgb4 into separate patches] Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2012-08-23myri10ge: Use PCI Express Capability accessorsJiang Liu1-23/+8
Use PCI Express Capability access functions to simplify myri10ge driver. [bhelgaas: fix myri10ge_toggle_relaxed() return value] Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Yijing Wang <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2012-08-23niu: Use PCI Express Capability accessorsJiang Liu1-12/+7
Use PCI Express Capability access functions to simplify niu driver. Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2012-08-23mlx4: Use PCI Express Capability accessorsJiang Liu1-4/+4
Use PCI Express Capability access functions to simplify mlx4 driver. Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2012-08-23vxge: Use PCI Express Capability accessorsJiang Liu1-2/+2
Use PCI Express Capability access functions to simplify vxge driver. Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2012-08-23igb: Use PCI Express Capability accessorsJiang Liu1-10/+2
Use PCI Express Capability access functions to simplify igb driver. [bhelgaas: split e1000e and igb into separate patches] Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Yijing Wang <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Jeff Kirsher <[email protected]>
2012-08-23e1000e: Use PCI Express Capability accessorsJiang Liu1-19/+8
Use PCI Express Capability access functions to simplify e1000e driver. [bhelgaas: split e1000e and igb into separate patches] Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Yijing Wang <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Jeff Kirsher <[email protected]>
2012-08-23tg3: Use PCI Express Capability accessorsJiang Liu1-37/+13
Use PCI Express Capability access functions to simplify tg3 driver. [bhelgaas: split bnx2x and tg3 into separate patches] Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2012-08-23bnx2x: Use PCI Express Capability accessorsJiang Liu1-20/+5
Use PCI Express Capability access functions to simplify bnx2x driver. [bhelgaas: split bnx2x and tg3 into separate patches] Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2012-08-23r8169: Preserve other Device Control bits when setting NOSNOOP_ENBjorn Helgaas1-2/+2
Previously, when we turned on the "Enable No Snoop Bit," we cleared all the other Device Control bits, including error reporting enables, Max_Payload_Size, Max_Read_Request_Size, etc. This patch preserves all the other bits. Signed-off-by: Bjorn Helgaas <[email protected]>
2012-08-23r8169: Use PCI Express Capability accessorsJiang Liu1-35/+9
Use PCI Express Capability access functions to simplify r8169 driver. Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Yijing Wang <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2012-08-23tile: PCI: Use PCI Express Capability accessorsJiang Liu1-20/+6
Use PCI Express Capability access functions to simplify Tile PCIe code. Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Chris Metcalf <[email protected]>
2012-08-23MIPS: PCI: Use PCI Express Capability accessorsJiang Liu1-10/+5
Use PCI Express Capability access functions to simplify MIPS PCIe code. Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: David Daney <[email protected]>
2012-08-23ARM: PCI: Use PCI Express Capability accessorsJiang Liu1-11/+1
Use PCI Express Capability access functions to simplify ARM PCIe code. Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Stephen Warren <[email protected]>
2012-08-23PCI/ASPM: Use PCI Express Capability accessorsJiang Liu1-51/+26
Use PCI Express Capability access functions to simplify PCIe ASPM. Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Yijing Wang <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2012-08-23PCI/AER: Use PCI Express Capability accessorsJiang Liu2-51/+17
Use PCI Express Capability access functions to simplify PCIe AER. Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Yijing Wang <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2012-08-23PCI/PME: Use PCI Express Capability accessorsJiang Liu1-17/+6
Use PCI Express Capability access functions to simplify PCIe PME. Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Yijing Wang <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2012-08-23PCI/pciehp: Use PCI Express Capability accessorsJiang Liu2-13/+5
Use PCI Express Capability access functions to simplify pciehp. Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Yijing Wang <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Kenji Kaneshige <[email protected]>
2012-08-23PCI/portdrv: Use PCI Express Capability accessorsJiang Liu2-18/+6
Use PCI Express Capability access functions to simplify portdrv. Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Yijing Wang <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Kenji Kaneshige <[email protected]>
2012-08-23PCI/hotplug: Use PCI Express Capability accessorsJiang Liu1-15/+5
Use PCI Express Capability access functions to simplify pcihp_slot.c. Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Kenji Kaneshige <[email protected]>
2012-08-23PCI: Wait for pending transactions to complete before 82599 FLRBjorn Helgaas1-1/+27
Before initiating an FLR, we should wait for completion of any outstanding non-posted requests. See PCIe spec r3.0, sec 6.6.2. This makes reset_intel_82599_sfp_virtfn() very similar to the generic pcie_flr(). The only difference is that the 82599 doesn't report FLR support in the VF Device Capability register. Signed-off-by: Bjorn Helgaas <[email protected]>
2012-08-23PCI/core: Use PCI Express Capability accessorsJiang Liu3-274/+66
Use PCI Express Capability access functions to simplify core. Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Yijing Wang <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2012-08-23PCI: Add accessors for PCI Express CapabilityJiang Liu3-0/+236
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: Jiang Liu <[email protected]> Signed-off-by: Yijing Wang <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2012-08-23PCI: Remove unused field pcie_type from struct pci_devYijing Wang2-2/+0
With introduction of pci_pcie_type(), pci_dev->pcie_type field becomes redundant, so remove it. Signed-off-by: Yijing Wang <[email protected]> Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2012-08-23PCI: Introduce pci_pcie_type(dev) to replace pci_dev->pcie_typeYijing Wang17-63/+67
Introduce an inline function pci_pcie_type(dev) to extract PCIe device type from pci_dev->pcie_flags_reg field, and prepare for removing pci_dev->pcie_type. Signed-off-by: Yijing Wang <[email protected]> Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2012-08-22PCI: Add Vendor-Specific Extended Capability header infoBjorn Helgaas1-0/+6
This adds the fields in the Vendor-Specific Header: ID, Rev, and Length. There may be multiple Vendor-Specific capabilities, so drivers should use the VSEC ID to identify the one of interest. Signed-off-by: Bjorn Helgaas <[email protected]>
2012-08-22PCI: Add pci_find_next_ext_capability()Bjorn Helgaas2-10/+31
Some extended capabilities, e.g., the vendor-specific capability, can occur several times. The existing pci_find_ext_capability() only finds the first occurrence. This adds pci_find_next_ext_capability(), which can iterate through all of them. Signed-off-by: Bjorn Helgaas <[email protected]>
2012-08-22PCI: Remove unused pci_dev_b()Bjorn Helgaas1-1/+0
All uses of pci_dev_b() have been replaced by list_for_each_entry(), so remove it. Tested-by: Yijing Wang <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Yinghai Lu <[email protected]>
2012-08-22sgi-agp: Use list_for_each_entry() for bus->devices traversalBjorn Helgaas1-3/+2
Replace list_for_each() + pci_dev_b() with the simpler list_for_each_entry(). Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Yinghai Lu <[email protected]> CC: David Airlie <[email protected]>
2012-08-22parisc/PCI: Use list_for_each_entry() for bus->devices traversalBjorn Helgaas2-12/+5
Replace list_for_each() + pci_dev_b() with the simpler list_for_each_entry(). Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Yinghai Lu <[email protected]> CC: [email protected]
2012-08-22parisc/PCI: Enable PERR/SERR on all devicesBjorn Helgaas1-1/+3
Previously, we enabled PERR & SERR for the first device on the bus, but left other devices alone. Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Yinghai Lu <[email protected]> CC: [email protected]
2012-08-22frv/PCI: Use list_for_each_entry() for bus->devices traversalBjorn Helgaas1-3/+1
Replace open-coded list traversal with list_for_each_entry(). Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Yinghai Lu <[email protected]> CC: David Howells <[email protected]>
2012-08-22PCI: Leave normal LIST_POISON in deleted list entriesBjorn Helgaas1-3/+0
list_del() already sets next/prev to LIST_POISON1/LIST_POISON2, so we don't need to do anything special here to prevent further list accesses. Tested-by: Yijing Wang <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Yinghai Lu <[email protected]>