Commit dfb1cfbd authored by Martin Habets's avatar Martin Habets Committed by Jakub Kicinski
Browse files

siena: Make SRIOV support specific for Siena



Add a Siena Kconfig option and use it in stead of the sfc one.

Signed-off-by: default avatarMartin Habets <habetsm.xilinx@gmail.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 65d4b471
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ config SFC_MCDI_MON
	  This exposes the on-board firmware-managed sensors as a
	  hardware monitor device.
config SFC_SRIOV
	bool "Solarflare SFC9000/SFC9100-family SR-IOV support"
	bool "Solarflare SFC9100-family SR-IOV support"
	depends on SFC && PCI_IOV
	default y
	help
+8 −0
Original line number Diff line number Diff line
@@ -18,3 +18,11 @@ config SFC_SIENA_MTD
	  This exposes the on-board flash and/or EEPROM as MTD devices
	  (e.g. /dev/mtd1).  This is required to update the firmware or
	  the boot configuration under Linux.
config SFC_SIENA_SRIOV
	bool "Solarflare SFC9000-family SR-IOV support"
	depends on SFC_SIENA && PCI_IOV
	default n
	help
	  This enables support for the Single Root I/O Virtualization
	  features, allowing accelerated network performance in
	  virtualized environments.
+1 −1
Original line number Diff line number Diff line
@@ -6,6 +6,6 @@ sfc-siena-y += farch.o siena.o \
			   mcdi.o mcdi_port.o mcdi_port_common.o \
			   mcdi_mon.o
sfc-siena-$(CONFIG_SFC_SIENA_MTD)	+= mtd.o
sfc-siena-$(CONFIG_SFC_SRIOV)		+= siena_sriov.o
sfc-siena-$(CONFIG_SFC_SIENA_SRIOV)	+= siena_sriov.o

obj-$(CONFIG_SFC_SIENA)	+= sfc-siena.o
+6 −6
Original line number Diff line number Diff line
@@ -359,7 +359,7 @@ static int efx_probe_all(struct efx_nic *efx)
		goto fail3;
	}

#ifdef CONFIG_SFC_SRIOV
#ifdef CONFIG_SFC_SIENA_SRIOV
	rc = efx->type->vswitching_probe(efx);
	if (rc) /* not fatal; the PF will still work fine */
		netif_warn(efx, probe, efx->net_dev,
@@ -383,7 +383,7 @@ static int efx_probe_all(struct efx_nic *efx)
 fail5:
	efx_siena_remove_filters(efx);
 fail4:
#ifdef CONFIG_SFC_SRIOV
#ifdef CONFIG_SFC_SIENA_SRIOV
	efx->type->vswitching_remove(efx);
#endif
 fail3:
@@ -402,7 +402,7 @@ static void efx_remove_all(struct efx_nic *efx)

	efx_siena_remove_channels(efx);
	efx_siena_remove_filters(efx);
#ifdef CONFIG_SFC_SRIOV
#ifdef CONFIG_SFC_SIENA_SRIOV
	efx->type->vswitching_remove(efx);
#endif
	efx_remove_port(efx);
@@ -592,7 +592,7 @@ static const struct net_device_ops efx_netdev_ops = {
	.ndo_features_check	= efx_siena_features_check,
	.ndo_vlan_rx_add_vid	= efx_vlan_rx_add_vid,
	.ndo_vlan_rx_kill_vid	= efx_vlan_rx_kill_vid,
#ifdef CONFIG_SFC_SRIOV
#ifdef CONFIG_SFC_SIENA_SRIOV
	.ndo_set_vf_mac		= efx_sriov_set_vf_mac,
	.ndo_set_vf_vlan	= efx_sriov_set_vf_vlan,
	.ndo_set_vf_spoofchk	= efx_sriov_set_vf_spoofchk,
@@ -1108,7 +1108,7 @@ static int efx_pci_probe(struct pci_dev *pci_dev,
/* efx_pci_sriov_configure returns the actual number of Virtual Functions
 * enabled on success
 */
#ifdef CONFIG_SFC_SRIOV
#ifdef CONFIG_SFC_SIENA_SRIOV
static int efx_pci_sriov_configure(struct pci_dev *dev, int num_vfs)
{
	int rc;
@@ -1250,7 +1250,7 @@ static struct pci_driver efx_pci_driver = {
	.remove		= efx_pci_remove,
	.driver.pm	= &efx_pm_ops,
	.err_handler	= &efx_siena_err_handlers,
#ifdef CONFIG_SFC_SRIOV
#ifdef CONFIG_SFC_SIENA_SRIOV
	.sriov_configure = efx_pci_sriov_configure,
#endif
};
+1 −1
Original line number Diff line number Diff line
@@ -177,7 +177,7 @@ static inline void efx_siena_mtd_rename(struct efx_nic *efx) {}
static inline void efx_siena_mtd_remove(struct efx_nic *efx) {}
#endif

#ifdef CONFIG_SFC_SRIOV
#ifdef CONFIG_SFC_SIENA_SRIOV
static inline unsigned int efx_vf_size(struct efx_nic *efx)
{
	return 1 << efx->vi_scale;
Loading