mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
ethernet: Add dummy driver for r8126
r8126 driver build is disabled on K6.9 and later. This is
causing the packaging failure where module is not available.
Add dummy driver when real driver is not available to make
packaging success.
Bug 4478230
Change-Id: I1b83fe1c3f30a9f825631650ca2520d720ef07c6
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3144344
(cherry picked from commit 4c39ed9cb5)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3158779
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
98c8d2f1ab
commit
36b50b7f27
@@ -2,4 +2,5 @@
|
||||
# Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved.
|
||||
|
||||
obj-m += r8168/
|
||||
obj-m += r8126/
|
||||
|
||||
|
||||
@@ -29,6 +29,14 @@
|
||||
# This product is covered by one or more of the following patents:
|
||||
# US6,570,884, US6,115,776, and US6,327,625.
|
||||
################################################################################
|
||||
LINUX_VERSION := $(shell expr $(VERSION) \* 256 + $(PATCHLEVEL))
|
||||
LINUX_VERSION_6_9 := $(shell expr 6 \* 256 + 9)
|
||||
|
||||
# Use dummy R8126 driver for K69 and later
|
||||
ifeq ($(shell test $(LINUX_VERSION) -ge $(LINUX_VERSION_6_9); echo $$?),0)
|
||||
obj-m := r8126.o
|
||||
r8126-objs := r8126_dummy.o
|
||||
else
|
||||
|
||||
CONFIG_SOC_LAN = n
|
||||
ENABLE_REALWOW_SUPPORT = n
|
||||
@@ -131,3 +139,5 @@ endif
|
||||
ifeq ($(ENABLE_RX_PACKET_FRAGMENT), y)
|
||||
EXTRA_CFLAGS += -DENABLE_RX_PACKET_FRAGMENT
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
15
drivers/net/ethernet/realtek/r8126/r8126_dummy.c
Normal file
15
drivers/net/ethernet/realtek/r8126/r8126_dummy.c
Normal file
@@ -0,0 +1,15 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
|
||||
#include <linux/module.h>
|
||||
|
||||
/* Dummy implementation for module */
|
||||
static int __init r8126_dummy_dummy_init(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
device_initcall(r8126_dummy_dummy_init);
|
||||
|
||||
MODULE_AUTHOR("Laxman Dewangan <ldewangan@nvidia.com>");
|
||||
MODULE_DESCRIPTION("Dummy R8126 dummy driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
Reference in New Issue
Block a user