summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/ef10_sriov.c
diff options
context:
space:
mode:
authorShradha Shah <sshah@solarflare.com>2015-05-06 00:58:14 +0100
committerDavid S. Miller <davem@davemloft.net>2015-05-09 16:16:47 -0400
commit02246a7f966c2e66ff0453d12d9b8d1bff895cf9 (patch)
tree81e42c59db4509aae03f30f76b4d195d238029f2 /drivers/net/ethernet/sfc/ef10_sriov.c
parent1cd9ecbbe6e9261578510962ad899415053acc1d (diff)
downloadlinux-02246a7f966c2e66ff0453d12d9b8d1bff895cf9.tar.bz2
sfc: Prepare to bind the sfc driver to the VF.
Added efx_nic_type structure for VF. Mapped a different BAR for VF as it uses BAR 0 for memory. Added functions sriov_init and sriov_fini. Signed-off-by: Shradha Shah <sshah@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/ef10_sriov.c')
-rw-r--r--drivers/net/ethernet/sfc/ef10_sriov.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/ef10_sriov.c b/drivers/net/ethernet/sfc/ef10_sriov.c
index 2aba7b7234ea..be74a7065bad 100644
--- a/drivers/net/ethernet/sfc/ef10_sriov.c
+++ b/drivers/net/ethernet/sfc/ef10_sriov.c
@@ -46,6 +46,23 @@ int efx_ef10_sriov_configure(struct efx_nic *efx, int num_vfs)
return efx_ef10_pci_sriov_enable(efx, num_vfs);
}
+int efx_ef10_sriov_init(struct efx_nic *efx)
+{
+ return 0;
+}
+
+void efx_ef10_sriov_fini(struct efx_nic *efx)
+{
+ int rc;
+
+ rc = efx_ef10_pci_sriov_disable(efx);
+ if (rc)
+ netif_dbg(efx, drv, efx->net_dev,
+ "Disabling SRIOV was not successful rc=%d\n", rc);
+ else
+ netif_dbg(efx, drv, efx->net_dev, "SRIOV disabled\n");
+}
+
static int efx_ef10_vswitch_alloc(struct efx_nic *efx, unsigned int port_id,
unsigned int vswitch_type)
{