mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
net: nvethernet: Allow driver to be built without NVPPS
The nvethernet driver has a dependency on the NVPPS driver which in turn has a dependency on the GTE driver. The GTE driver is being transitioned to the new upstream HTE driver and while this transition is on-going, allow the nvethernet driver to be distributed and built without NVPPS and GTE. Note that by default the dependency on the NVPPS driver is enabled by setting CONFIG_TEGRA_NVPPS to 'y'. Only if the user sets CONFIG_TEGRA_NVPPS to 'n' will it be disabled. Bug 3918941 Bug 3961133 Change-Id: I019e5ebfddfcb158b0a684d2eacc404231577166 Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2913273 Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com> Reviewed-by: Bhadram Varka <vbhadram@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
de1bf0e728
commit
6475ddcf3d
@@ -7,6 +7,12 @@ OSI_DMA := nvethernetrm/osi/dma
|
|||||||
|
|
||||||
obj-m += nvethernet.o
|
obj-m += nvethernet.o
|
||||||
|
|
||||||
|
# If CONFIG_TEGRA_NVPPS is not set, enable by default
|
||||||
|
CONFIG_TEGRA_NVPPS ?= y
|
||||||
|
ifeq ($(CONFIG_TEGRA_NVPPS),y)
|
||||||
|
ccflags-y += -DCONFIG_TEGRA_NVPPS
|
||||||
|
endif
|
||||||
|
|
||||||
# These CFLAGS must not be shared/used in OSI. These are local to Linux
|
# These CFLAGS must not be shared/used in OSI. These are local to Linux
|
||||||
ccflags-y += -DLINUX_OS -DNET30 -DNVPKCS_MACSEC -DLINUX_IVC -mno-outline-atomics \
|
ccflags-y += -DLINUX_OS -DNET30 -DNVPKCS_MACSEC -DLINUX_IVC -mno-outline-atomics \
|
||||||
-I$(srctree.nvidia-oot)/drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/include \
|
-I$(srctree.nvidia-oot)/drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/include \
|
||||||
|
|||||||
@@ -2912,8 +2912,10 @@ static int ether_close(struct net_device *ndev)
|
|||||||
/* TODO: purge the queues */
|
/* TODO: purge the queues */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if CONFIG_TEGRA_NVPPS
|
||||||
/* Unregister broadcasting MAC timestamp to clients */
|
/* Unregister broadcasting MAC timestamp to clients */
|
||||||
tegra_unregister_hwtime_source(ndev);
|
tegra_unregister_hwtime_source(ndev);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Stop workqueue to get further scheduled */
|
/* Stop workqueue to get further scheduled */
|
||||||
ether_stats_work_queue_stop(pdata);
|
ether_stats_work_queue_stop(pdata);
|
||||||
|
|||||||
@@ -395,7 +395,9 @@ int ether_handle_hwtstamp_ioctl(struct ether_priv_data *pdata,
|
|||||||
{
|
{
|
||||||
struct osi_core_priv_data *osi_core = pdata->osi_core;
|
struct osi_core_priv_data *osi_core = pdata->osi_core;
|
||||||
struct osi_dma_priv_data *osi_dma = pdata->osi_dma;
|
struct osi_dma_priv_data *osi_dma = pdata->osi_dma;
|
||||||
|
#if CONFIG_TEGRA_NVPPS
|
||||||
struct net_device *ndev = pdata->ndev;
|
struct net_device *ndev = pdata->ndev;
|
||||||
|
#endif
|
||||||
struct osi_ioctl ioctl_data = {};
|
struct osi_ioctl ioctl_data = {};
|
||||||
struct hwtstamp_config config;
|
struct hwtstamp_config config;
|
||||||
unsigned int hwts_rx_en = 1;
|
unsigned int hwts_rx_en = 1;
|
||||||
@@ -596,8 +598,10 @@ int ether_handle_hwtstamp_ioctl(struct ether_priv_data *pdata,
|
|||||||
dev_err(pdata->dev, "Failure to enable CONFIG_PTP\n");
|
dev_err(pdata->dev, "Failure to enable CONFIG_PTP\n");
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
|
#if CONFIG_TEGRA_NVPPS
|
||||||
/* Register broadcasting MAC timestamp to clients */
|
/* Register broadcasting MAC timestamp to clients */
|
||||||
tegra_register_hwtime_source(ether_get_hw_time, ndev);
|
tegra_register_hwtime_source(ether_get_hw_time, ndev);
|
||||||
|
#endif
|
||||||
#ifndef OSI_STRIPPED_LIB
|
#ifndef OSI_STRIPPED_LIB
|
||||||
ether_config_slot_function(pdata, OSI_ENABLE);
|
ether_config_slot_function(pdata, OSI_ENABLE);
|
||||||
#endif /* !OSI_STRIPPED_LIB */
|
#endif /* !OSI_STRIPPED_LIB */
|
||||||
|
|||||||
Reference in New Issue
Block a user