aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/vxge/vxge-main.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-06-18 14:07:15 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-18 14:07:15 -0700
commitd2aa4550379f92e929af7ed1dd4f55e6a1e331f8 (patch)
tree5ef0fc69a507f0d701fd157b6652427eabd5efdd /drivers/net/vxge/vxge-main.c
parent9e3e4b1d2d13bead8d52703c82a02b55f108b491 (diff)
parentcb2107be43d2fc5eadec58b92b54bf32c00bfff3 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (55 commits) netxen: fix tx ring accounting netxen: fix detection of cut-thru firmware mode forcedeth: fix dma api mismatches atm: sk_wmem_alloc initial value is one net: correct off-by-one write allocations reports via-velocity : fix no link detection on boot Net / e100: Fix suspend of devices that cannot be power managed TI DaVinci EMAC : Fix rmmod error net: group address list and its count ipv4: Fix fib_trie rebalancing, part 2 pkt_sched: Update drops stats in act_police sky2: version 1.23 sky2: add GRO support sky2: skb recycling sky2: reduce default transmit ring sky2: receive counter update sky2: fix shutdown synchronization sky2: PCI irq issues sky2: more receive shutdown sky2: turn off pause during shutdown ... Manually fix trivial conflict in net/core/skbuff.c due to kmemcheck
Diffstat (limited to 'drivers/net/vxge/vxge-main.c')
-rw-r--r--drivers/net/vxge/vxge-main.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c
index 6c838b3e063..6034497536a 100644
--- a/drivers/net/vxge/vxge-main.c
+++ b/drivers/net/vxge/vxge-main.c
@@ -4203,6 +4203,16 @@ vxge_probe(struct pci_dev *pdev, const struct pci_device_id *pre)
max_vpath_supported++;
}
+ /* Enable SRIOV mode, if firmware has SRIOV support and if it is a PF */
+ if ((VXGE_HW_FUNCTION_MODE_SRIOV ==
+ ll_config.device_hw_info.function_mode) &&
+ (max_config_dev > 1) && (pdev->is_physfn)) {
+ ret = pci_enable_sriov(pdev, max_config_dev - 1);
+ if (ret)
+ vxge_debug_ll_config(VXGE_ERR,
+ "Failed to enable SRIOV: %d \n", ret);
+ }
+
/*
* Configure vpaths and get driver configured number of vpaths
* which is less than or equal to the maximum vpaths per function.
@@ -4366,6 +4376,7 @@ _exit6:
vxge_device_unregister(hldev);
_exit5:
+ pci_disable_sriov(pdev);
vxge_hw_device_terminate(hldev);
_exit4:
iounmap(attr.bar1);
@@ -4429,6 +4440,8 @@ vxge_remove(struct pci_dev *pdev)
iounmap(vdev->bar0);
iounmap(vdev->bar1);
+ pci_disable_sriov(pdev);
+
/* we are safe to free it now */
free_netdev(dev);