1. 31 3月, 2015 7 次提交
  2. 20 11月, 2014 1 次提交
  3. 17 9月, 2014 1 次提交
  4. 30 5月, 2014 1 次提交
  5. 20 2月, 2014 1 次提交
  6. 11 1月, 2014 1 次提交
  7. 23 11月, 2013 1 次提交
    • E
      PCI: Clear NumVFs when disabling SR-IOV in sriov_init() · 045cc22e
      ethan.zhao 提交于
      When SR-IOV is disabled (VF Enable is cleared), NumVFs is not very useful,
      so this patch clears it out to prevent confusing lspci output like that
      below.  We already clear NumVFs in sriov_disable(), and this does the same
      when we disable SR-IOV as part of parsing the SR-IOV capability.
      
        $ lspci -vvv -s 13:00.0
        13:00.0 Ethernet controller: Intel Corporation 82599EB 10-Gigabit SFI/SFP+ Network Connection (rev 01)
            Capabilities: [160 v1] Single Root I/O Virtualization (SR-IOV)
                IOVCtl: Enable- Migration- Interrupt- MSE- ARIHierarchy+
                Initial VFs: 64, Total VFs: 64, Number of VFs: 64, ...
      
      [bhelgaas: changelog]
      Signed-off-by: Nethan.zhao <ethan.kernel@gmail.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      045cc22e
  8. 15 11月, 2013 1 次提交
  9. 01 8月, 2013 1 次提交
  10. 31 7月, 2013 1 次提交
  11. 26 7月, 2013 1 次提交
  12. 15 6月, 2013 2 次提交
  13. 06 6月, 2013 1 次提交
    • G
      PCI: Convert alloc_pci_dev(void) to pci_alloc_dev(bus) · 8b1fce04
      Gu Zheng 提交于
      Use the new pci_alloc_dev(bus) to replace the existing using of
      alloc_pci_dev(void).
      
      [bhelgaas: drop pci_bus ref later in pci_release_dev()]
      Signed-off-by: NGu Zheng <guz.fnst@cn.fujitsu.com>
      Signed-off-by: NJiang Liu <jiang.liu@huawei.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Neela Syam Kolli <megaraidlinux@lsi.com>
      Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      8b1fce04
  14. 01 6月, 2013 1 次提交
    • X
      PCI: Finish SR-IOV VF setup before adding the device · fbf33f51
      Xudong Hao 提交于
      Commit 4f535093 "PCI: Put pci_dev in device tree as early as possible"
      moves device registering from pci_bus_add_devices() to pci_device_add().
      That causes problems for virtual functions because device_add(&virtfn->dev)
      is called before setting the virtfn->is_virtfn flag, which then causes Xen
      to report PCI virtual functions as PCI physical functions.
      
      Fix it by setting virtfn->is_virtfn before calling pci_device_add().
      
      [Jiang Liu]: Move the setting of virtfn->is_virtfn ahead further for better
      readability and modify changelog.
      Signed-off-by: NXudong Hao <xudong.hao@intel.com>
      Signed-off-by: NJiang Liu <jiang.liu@huawei.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Cc: stable@vger.kernel.org	# v3.9+
      fbf33f51
  15. 25 4月, 2013 1 次提交
  16. 02 2月, 2013 1 次提交
  17. 26 1月, 2013 1 次提交
    • Y
      PCI: Put pci_dev in device tree as early as possible · 4f535093
      Yinghai Lu 提交于
      We want to put pci_dev structs in the device tree as soon as possible so
      for_each_pci_dev() iteration will not miss them, but driver attachment
      needs to be delayed until after pci_assign_unassigned_resources() to make
      sure all devices have resources assigned first.
      
      This patch moves device registering from pci_bus_add_devices() to
      pci_device_add(), which happens earlier, leaving driver attachment in
      pci_bus_add_devices().
      
      It also removes unattached child bus handling in pci_bus_add_devices().
      That's not needed because child bus via pci_add_new_bus() is already
      in parent bus children list.
      
      [bhelgaas: changelog]
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      4f535093
  18. 11 1月, 2013 1 次提交
  19. 10 11月, 2012 3 次提交
  20. 21 9月, 2012 1 次提交
    • B
      Revert "PCI: Use hotplug-safe pci_get_domain_bus_and_slot()" · 94bb3464
      Bjorn Helgaas 提交于
      This reverts commit 433efd22.
      
      When we remove an SR-IOV device, we have this call chain:
      
          driver .remove() method
              pci_disable_sriov()
                  sriov_disable()
                      virtfn_remove()
                          pci_get_domain_bus_and_slot()
      
      sriov_disable() is only called for PFs, not for VFs.  When it's called
      for a PF, it loops through all the VFs and calls virtfn_remove() for
      each.  But we stop and remove VFs before PFs, so by the time we get
      to virtfn_remove(), the VFs have already been stopped and deleted
      from the device list.  Now pci_get_domain_bus_and_slot(), which uses
      bus_find_device() and relies on that device list, doesn't find the
      VFs, so the VF references aren't released correctly.
      Reported-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      94bb3464
  21. 13 9月, 2012 1 次提交
  22. 23 8月, 2012 1 次提交
  23. 14 6月, 2012 2 次提交
  24. 28 2月, 2012 1 次提交
  25. 18 2月, 2012 1 次提交
  26. 11 2月, 2012 1 次提交
  27. 07 1月, 2012 2 次提交
    • R
      PCI: delay configuration of SRIOV capability · afd24ece
      Ram Pai 提交于
      The SRIOV capability, namely page size and total_vfs of a device are
      configured during enumeration phase of the device.  This can potentially
      interfere with the PCI operations of the platform, if the IOV capability
      of the device is not enabled.
      
      The following patch postpones the configuration of the IOV capability of
      the device to a later point, when the IOV capability is explicitly
      enabled by the device driver.
      
      The patch is tested on x86 and power platform.
      Tested-by: NDonald Dutile <ddutile@redhat.com>
      Signed-off-by: NRam Pai <linuxram@us.ibm.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      afd24ece
    • J
      PCI: Rework config space blocking services · fb51ccbf
      Jan Kiszka 提交于
      pci_block_user_cfg_access was designed for the use case that a single
      context, the IPR driver, temporarily delays user space accesses to the
      config space via sysfs. This assumption became invalid by the time
      pci_dev_reset was added as locking instance. Today, if you run two loops
      in parallel that reset the same device via sysfs, you end up with a
      kernel BUG as pci_block_user_cfg_access detect the broken assumption.
      
      This reworks the pci_block_user_cfg_access to a sleeping service
      pci_cfg_access_lock and an atomic-compatible variant called
      pci_cfg_access_trylock. The former not only blocks user space access as
      before but also waits if access was already locked. The latter service
      just returns false in this case, allowing the caller to resolve the
      conflict instead of raising a BUG.
      
      Adaptions of the ipr driver were originally written by Brian King.
      Acked-by: NBrian King <brking@linux.vnet.ibm.com>
      Acked-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      fb51ccbf
  28. 06 12月, 2011 1 次提交
    • R
      PCI: defer enablement of SRIOV BARS · bbef98ab
      Ram Pai 提交于
      All the PCI BARs of a device are enabled when the device is enabled
      using pci_enable_device().  This unnecessarily enables SRIOV BARs of the
      device.
      
      On some platforms, which do not support SRIOV as yet, the
      pci_enable_device() fails to enable the device if its SRIOV BARs are not
      allocated resources correctly.
      
      The following patch fixes the above problem. The SRIOV BARs are now
      enabled when IOV capability of the device is enabled in sriov_enable().
      
      NOTE: Note, there is subtle change in the pci_enable_device() API.  Any
      driver that depends on SRIOV BARS to be enabled in pci_enable_device()
      can fail.
      
      The patch has been touch tested on power and x86 platform.
      Tested-by: NMichael Wang <wangyun@linux.vnet.ibm.com>
      Signed-off-by: NRam Pai <linuxram@us.ibm.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      bbef98ab
  29. 01 11月, 2011 1 次提交