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>
This commit is contained in:
Shradha Shah
2015-05-06 00:58:14 +01:00
committed by David S. Miller
parent 1cd9ecbbe6
commit 02246a7f96
9 changed files with 176 additions and 16 deletions

View File

@@ -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)
{