aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/vxge/vxge-config.c
diff options
context:
space:
mode:
authorSivakumar Subramani <Sivakumar.Subramani@neterion.com>2009-06-16 14:48:55 -0400
committerDavid S. Miller <davem@davemloft.net>2009-06-17 07:31:14 -0400
commit5dbc901172fb952409940cd7ca55d8e6e5a7cc2c (patch)
treedb90856015b0373b3b545901db2d98f88fef4039 /drivers/net/vxge/vxge-config.c
parenta42fc8f6943127787ad2a416436cf211d5531229 (diff)
vxge: Enable SRIOV support in the driver.
- Enabled SRIOV support in the driver. - Call __vxge_hw_verify_pci_e_info() for the PF only. This function verifies the negotiated link width and current link speed in the Link Status Register (offset 12h) which are reserved fields for VFs as per the SRIOV specification, section 3.5.8. - Implemented David Miller's comment to remove the #ifdef CONFIG_PCI_IOV as these intefaces have NOP versions declared when the defintion is not set. Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com> Signed-off-by: Rastapur Santosh <santosh.rastapur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vxge/vxge-config.c')
-rw-r--r--drivers/net/vxge/vxge-config.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/vxge/vxge-config.c b/drivers/net/vxge/vxge-config.c
index 26cde573af43..58d2551c78ed 100644
--- a/drivers/net/vxge/vxge-config.c
+++ b/drivers/net/vxge/vxge-config.c
@@ -454,7 +454,7 @@ __vxge_hw_verify_pci_e_info(struct __vxge_hw_device *hldev)
454 return VXGE_HW_OK; 454 return VXGE_HW_OK;
455} 455}
456 456
457static enum vxge_hw_status 457enum vxge_hw_status
458__vxge_hw_device_is_privilaged(struct __vxge_hw_device *hldev) 458__vxge_hw_device_is_privilaged(struct __vxge_hw_device *hldev)
459{ 459{
460 if ((hldev->host_type == VXGE_HW_NO_MR_NO_SR_NORMAL_FUNCTION || 460 if ((hldev->host_type == VXGE_HW_NO_MR_NO_SR_NORMAL_FUNCTION ||
@@ -676,10 +676,12 @@ enum vxge_hw_status __vxge_hw_device_initialize(struct __vxge_hw_device *hldev)
676{ 676{
677 enum vxge_hw_status status = VXGE_HW_OK; 677 enum vxge_hw_status status = VXGE_HW_OK;
678 678
679 /* Validate the pci-e link width and speed */ 679 if (VXGE_HW_OK == __vxge_hw_device_is_privilaged(hldev)) {
680 status = __vxge_hw_verify_pci_e_info(hldev); 680 /* Validate the pci-e link width and speed */
681 if (status != VXGE_HW_OK) 681 status = __vxge_hw_verify_pci_e_info(hldev);
682 goto exit; 682 if (status != VXGE_HW_OK)
683 goto exit;
684 }
683 685
684 vxge_hw_wrr_rebalance(hldev); 686 vxge_hw_wrr_rebalance(hldev);
685exit: 687exit: