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

sfc/siena: Rename functions in nic_common.h to avoid conflicts with sfc



For siena use efx_siena_ as the function prefix.
efx_nic_update_stats_atomic is only used in efx_common.c, so move
it there.
efx_nic_copy_stats is not used in Siena, so it is removed.

Signed-off-by: default avatarMartin Habets <habetsm.xilinx@gmail.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 4d49e5cd
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -830,7 +830,7 @@ static void efx_pci_remove_main(struct efx_nic *efx)

	efx_siena_disable_interrupts(efx);
	efx_siena_clear_interrupt_affinity(efx);
	efx_nic_fini_interrupt(efx);
	efx_siena_fini_interrupt(efx);
	efx_fini_port(efx);
	efx->type->fini(efx);
	efx_siena_fini_napi(efx);
@@ -939,7 +939,7 @@ static int efx_pci_probe_main(struct efx_nic *efx)
		goto fail4;
	}

	rc = efx_nic_init_interrupt(efx);
	rc = efx_siena_init_interrupt(efx);
	if (rc)
		goto fail5;

@@ -952,7 +952,7 @@ static int efx_pci_probe_main(struct efx_nic *efx)

 fail6:
	efx_siena_clear_interrupt_affinity(efx);
	efx_nic_fini_interrupt(efx);
	efx_siena_fini_interrupt(efx);
 fail5:
	efx_fini_port(efx);
 fail4:
+9 −1
Original line number Diff line number Diff line
@@ -597,6 +597,14 @@ void efx_siena_stop_all(struct efx_nic *efx)
	efx_stop_datapath(efx);
}

static size_t efx_siena_update_stats_atomic(struct efx_nic *efx, u64 *full_stats,
					    struct rtnl_link_stats64 *core_stats)
{
	if (efx->type->update_stats_atomic)
		return efx->type->update_stats_atomic(efx, full_stats, core_stats);
	return efx->type->update_stats(efx, full_stats, core_stats);
}

/* Context: process, dev_base_lock or RTNL held, non-blocking. */
void efx_siena_net_stats(struct net_device *net_dev,
			 struct rtnl_link_stats64 *stats)
@@ -604,7 +612,7 @@ void efx_siena_net_stats(struct net_device *net_dev,
	struct efx_nic *efx = netdev_priv(net_dev);

	spin_lock_bh(&efx->stats_lock);
	efx_nic_update_stats_atomic(efx, NULL, stats);
	efx_siena_update_stats_atomic(efx, NULL, stats);
	spin_unlock_bh(&efx->stats_lock);
}

+2 −2
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ static int efx_ethtool_phys_id(struct net_device *net_dev,

static int efx_ethtool_get_regs_len(struct net_device *net_dev)
{
	return efx_nic_get_regs_len(netdev_priv(net_dev));
	return efx_siena_get_regs_len(netdev_priv(net_dev));
}

static void efx_ethtool_get_regs(struct net_device *net_dev,
@@ -64,7 +64,7 @@ static void efx_ethtool_get_regs(struct net_device *net_dev,
	struct efx_nic *efx = netdev_priv(net_dev);

	regs->version = efx->type->revision;
	efx_nic_get_regs(efx, buf);
	efx_siena_get_regs(efx, buf);
}

/*
+2 −2
Original line number Diff line number Diff line
@@ -233,7 +233,7 @@ static int efx_alloc_special_buffer(struct efx_nic *efx,
#endif
	len = ALIGN(len, EFX_BUF_SIZE);

	if (efx_nic_alloc_buffer(efx, &buffer->buf, len, GFP_KERNEL))
	if (efx_siena_alloc_buffer(efx, &buffer->buf, len, GFP_KERNEL))
		return -ENOMEM;
	buffer->entries = len / EFX_BUF_SIZE;
	BUG_ON(buffer->buf.dma_addr & (EFX_BUF_SIZE - 1));
@@ -269,7 +269,7 @@ efx_free_special_buffer(struct efx_nic *efx, struct efx_special_buffer *buffer)
		  (u64)buffer->buf.dma_addr, buffer->buf.len,
		  buffer->buf.addr, (u64)virt_to_phys(buffer->buf.addr));

	efx_nic_free_buffer(efx, &buffer->buf);
	efx_siena_free_buffer(efx, &buffer->buf);
	buffer->entries = 0;
}

+4 −5
Original line number Diff line number Diff line
@@ -336,8 +336,7 @@ int efx_siena_mcdi_mon_probe(struct efx_nic *efx)
	if (n_sensors == 0)
		return 0;

	rc = efx_nic_alloc_buffer(
		efx, &hwmon->dma_buf,
	rc = efx_siena_alloc_buffer(efx, &hwmon->dma_buf,
			n_sensors * MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_LEN,
			GFP_KERNEL);
	if (rc)
@@ -526,7 +525,7 @@ void efx_siena_mcdi_mon_remove(struct efx_nic *efx)
		hwmon_device_unregister(hwmon->device);
	kfree(hwmon->attrs);
	kfree(hwmon->group.attrs);
	efx_nic_free_buffer(efx, &hwmon->dma_buf);
	efx_siena_free_buffer(efx, &hwmon->dma_buf);
}

#endif /* CONFIG_SFC_MCDI_MON */
Loading