Projects
Essentials
r8168
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 32
View file
r8168.changes
Changed
@@ -1,4 +1,19 @@ ------------------------------------------------------------------- +Thu Oct 15 13:31:06 UTC 2026 - Dr. Werner Fink <werner@suse.de> + +- Update to new version r8168-8.057.00 +- Port patches + * r8168-configuration.patch + * r8168-kernel_version.patch + * r8168-support-ethtool_keee.patch + * r8168-support-linux-L15.5.patch + +------------------------------------------------------------------- +Mon Feb 10 09:07:28 UTC 2025 - Dr. Werner Fink <werner@suse.de> + +- Clean up spec file + +------------------------------------------------------------------- Mon Nov 25 10:11:50 UTC 2024 - Dr. Werner Fink <werner@suse.de> - Make it build below SLE-15-SP7 even if kernel version 6.4
View file
r8168.spec
Changed
@@ -18,13 +18,13 @@ #!BuildIgnore: enough-build-resources Name: r8168 -Version: 8.053.00 +Version: 8.057.00 Release: 0 Summary: Device driver for RealTek Gigabit Ethernet controllers License: GPL-2.0-or-later Group: System/Kernel URL: https://github.com/mtorromeo/r8168 -Source0: https://github.com/mtorromeo/r8168/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +Source0: https://github.com/mtorromeo/r8168/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: preamble Source2: Module.supported Source3: https://github.com/mtorromeo/r8168/releases/download/%{version}/%{name}-%{version}.tar.gz.asc @@ -39,10 +39,14 @@ BuildRequires: kernel-syms BuildRequires: libelf-devel BuildRequires: module-init-tools +%if %{defined kernel_module_package_buildreqs} BuildRequires: %kernel_module_package_buildreqs +%endif Requires: r8168-kmp ExclusiveArch: %{ix86} x86_64 -%kernel_module_package -p preamble +%if %{defined kernel_module_package} +%kernel_module_package -n r8168 -p %_sourcedir/preamble +%endif %description This is the Linux device driver released for RealTek RTL8168B/8111B, @@ -52,7 +56,7 @@ %package blacklist-r8169 Summary: To favour r8168 blacklist the r8169 device driver Group: Hardware/Wifi -##BuildArch: noarch +BuildArch: noarch Requires: %{name}-kmp = %{version} %description blacklist-r8169
View file
r8168-configuration.patch
Changed
@@ -4,7 +4,7 @@ --- src/Makefile +++ src/Makefile 2022-05-10 10:26:59.851240712 +0000 -@@ -52,6 +52,7 @@ CONFIG_CTAP_SHORT_OFF = n +@@ -53,6 +53,7 @@ CONFIG_CTAP_SHORT_OFF = n ifneq ($(KERNELRELEASE),) obj-m := r8168.o r8168-objs := r8168_n.o r8168_asf.o rtl_eeprom.o rtltool.o
View file
r8168-kernel_version.patch
Changed
@@ -5,7 +5,7 @@ --- src/r8168.h +++ src/r8168.h 2024-03-13 11:51:59.011947503 +0000 -@@ -196,6 +196,10 @@ do { \ +@@ -273,6 +273,10 @@ do { \ } while (0) #endif //LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15) @@ -35,7 +35,7 @@ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,37) #include <linux/prefetch.h> #endif -@@ -586,8 +591,12 @@ static void rtl8168_set_rx_mode(struct n +@@ -614,8 +619,12 @@ static void rtl8168_set_rx_mode(struct n #if LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0) static void rtl8168_tx_timeout(struct net_device *dev, unsigned int txqueue); #else @@ -48,7 +48,7 @@ static struct net_device_stats *rtl8168_get_stats(struct net_device *dev); static int rtl8168_rx_interrupt(struct net_device *, struct rtl8168_private *, struct rtl8168_rx_ring *, napi_budget); #ifdef CONFIG_R8168_NAPI -@@ -30897,8 +30906,12 @@ static void +@@ -31287,8 +31296,12 @@ static void rtl8168_tx_timeout(struct net_device *dev, unsigned int txqueue) #else static void @@ -61,7 +61,7 @@ { struct rtl8168_private *tp = netdev_priv(dev); -@@ -31636,7 +31649,7 @@ rtl8168_rx_interrupt(struct net_device * +@@ -32051,7 +32064,7 @@ rtl8168_rx_interrupt(struct net_device * if (rtl8168_rx_vlan_skb(tp, desc, skb) < 0) rtl8168_rx_skb(tp, skb, ring_index);
View file
r8168-support-ethtool_keee.patch
Changed
@@ -13,26 +13,24 @@ rtl_ethtool_get_eee(struct net_device *net, struct ethtool_keee *edata) rtl_ethtool_set_eee(struct net_device *net, struct ethtool_keee *edata) --- - src/r8168_n.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ + src/r8168_n.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) -diff --git a/src/r8168_n.c b/src/r8168_n.c -index ad63f42..3d67641 100755 --- a/src/r8168_n.c -+++ b/src/r8168_n.c -@@ -7941,7 +7941,11 @@ rtl8168_device_lpi_t_to_ethtool_lpi_t(struct rtl8168_private *tp , u32 lpi_timer ++++ b/src/r8168_n.c 2026-10-15 13:25:45.175908700 +0000 +@@ -8183,7 +8183,11 @@ rtl8168_adv_to_linkmode(unsigned long *m } static int +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0) -+rtl_ethtool_get_eee(struct net_device *net, struct ethtool_keee *edata) + rtl_ethtool_get_eee(struct net_device *net, struct ethtool_keee *edata) +#else - rtl_ethtool_get_eee(struct net_device *net, struct ethtool_eee *edata) ++rtl_ethtool_get_eee(struct net_device *net, struct ethtool_eee *edata) +#endif { + __ETHTOOL_DECLARE_LINK_MODE_MASK(common); struct rtl8168_private *tp = netdev_priv(net); - struct ethtool_eee *eee = &tp->eee; -@@ -7975,9 +7979,15 @@ rtl_ethtool_get_eee(struct net_device *net, struct ethtool_eee *edata) +@@ -8311,9 +8315,15 @@ rtl_ethtool_get_eee(struct net_device *n edata->eee_enabled = !!val; edata->eee_active = !!(supported & adv & lp); @@ -48,7 +46,7 @@ edata->tx_lpi_enabled = edata->eee_enabled; edata->tx_lpi_timer = tx_lpi_timer; -@@ -7985,11 +7995,19 @@ rtl_ethtool_get_eee(struct net_device *net, struct ethtool_eee *edata) +@@ -8321,11 +8331,19 @@ rtl_ethtool_get_eee(struct net_device *n } static int @@ -68,7 +66,7 @@ int rc = 0; if (!rtl8168_support_eee(tp)) -@@ -8013,6 +8031,18 @@ rtl_ethtool_set_eee(struct net_device *net, struct ethtool_eee *edata) +@@ -8349,6 +8367,18 @@ rtl_ethtool_set_eee(struct net_device *n } advertising = tp->advertising; @@ -87,7 +85,7 @@ if (!edata->advertised) { edata->advertised = advertising & eee->supported; } else if (edata->advertised & ~advertising) { -@@ -8021,15 +8051,29 @@ rtl_ethtool_set_eee(struct net_device *net, struct ethtool_eee *edata) +@@ -8357,15 +8387,29 @@ rtl_ethtool_set_eee(struct net_device *n rc = -EINVAL; goto out; }
View file
r8168-support-linux-L15.5.patch
Changed
@@ -4,7 +4,7 @@ --- src/r8168_n.c +++ src/r8168_n.c 2024-03-13 12:10:07.947820999 +0000 -@@ -7234,7 +7234,7 @@ rtl8168_set_ring_size(struct rtl8168_pri +@@ -7437,7 +7437,7 @@ rtl8168_set_ring_size(struct rtl8168_pri } #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) @@ -13,7 +13,7 @@ static void rtl8168_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ring, struct kernel_ethtool_ringparam *kernel_ring, -@@ -7242,7 +7242,7 @@ static void rtl8168_get_ringparam(struct +@@ -7445,7 +7445,7 @@ static void rtl8168_get_ringparam(struct #else static void rtl8168_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ring) @@ -22,7 +22,7 @@ { struct rtl8168_private *tp = netdev_priv(dev); -@@ -7252,7 +7252,7 @@ static void rtl8168_get_ringparam(struct +@@ -7455,7 +7455,7 @@ static void rtl8168_get_ringparam(struct ring->tx_pending = tp->tx_ring0.num_tx_desc; } @@ -31,7 +31,7 @@ static int rtl8168_set_ringparam(struct net_device *dev, struct ethtool_ringparam *ring, struct kernel_ethtool_ringparam *kernel_ring, -@@ -7260,7 +7260,7 @@ static int rtl8168_set_ringparam(struct +@@ -7463,7 +7463,7 @@ static int rtl8168_set_ringparam(struct #else static int rtl8168_set_ringparam(struct net_device *dev, struct ethtool_ringparam *ring) @@ -40,7 +40,7 @@ { struct rtl8168_private *tp = netdev_priv(dev); u32 new_rx_count, new_tx_count; -@@ -26737,11 +26737,11 @@ rtl8168_release_board(struct pci_dev *pd +@@ -27072,11 +27072,11 @@ rtl8168_release_board(struct pci_dev *pd static void rtl8168_hw_address_set(struct net_device *dev, u8 mac_addrMAC_ADDR_LEN) {
View file
r8168-8.053.00.tar.gz.asc
Deleted
@@ -1,7 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iHUEABYKAB0WIQQMrarPcPZMZU4TGzERZ1x0NCnd7wUCZiUOBgAKCRARZ1x0NCnd -7zwaAP9/wR9UAKCbpYCVY4a527hxVnKbIskev0+SNUa++NYyKAD+KCZaGOKSVUOF -AUqJsVPNzKZkPn162vhgkJH9EOfBmQ0= -=DNig ------END PGP SIGNATURE-----
View file
r8168-8.057.00.tar.gz.asc
Added
@@ -0,0 +1,8 @@ +-----BEGIN PGP SIGNATURE----- + +iJYEABYKAD4WIQQMrarPcPZMZU4TGzERZ1x0NCnd7wUCaqMzvCAcbWFzc2ltaWxp +YW5vLnRvcnJvbWVvQGdtYWlsLmNvbQAKCRARZ1x0NCnd78/jAQD0IFg1fvgn2WKc +/TYcRNDoNtpe1V8zaPMIa1TNFmAG+AD+LaOdByqpWCTK6BJCX3Iy0YGOZo2RwjWu +6zIZAwmzCw4= +=gLfi +-----END PGP SIGNATURE-----
View file
r8168-8.053.00.tar.gz/Makefile -> r8168-8.057.00.tar.gz/Makefile
Changed
@@ -4,7 +4,7 @@ # r8168 is the Linux device driver released for Realtek Gigabit Ethernet # controllers with PCI-Express interface. # -# Copyright(c) 2024 Realtek Semiconductor Corp. All rights reserved. +# Copyright(c) 2026 Realtek Semiconductor Corp. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free
View file
r8168-8.053.00.tar.gz/autorun.sh -> r8168-8.057.00.tar.gz/autorun.sh
Changed
@@ -15,14 +15,14 @@ echo "Check old driver and unload it." check=`lsmod | grep r8169` if "$check" != "" ; then - echo "rmmod r8169" - /sbin/rmmod r8169 + echo "rmmod r8169" + /sbin/rmmod r8169 fi check=`lsmod | grep r8168` if "$check" != "" ; then - echo "rmmod r8168" - /sbin/rmmod r8168 + echo "rmmod r8168" + /sbin/rmmod r8168 fi echo "Build the module and install" @@ -52,6 +52,21 @@ mv $TARGET_PATH/r8169.ko $TARGET_PATH/r8169.bak fi fi + if test -e $TARGET_PATH/r8169.ko.zst ; then + echo "Backup r8169.ko.zst" + if test -e $TARGET_PATH/r8169.zst.bak ; then + i=0 + while test -e $TARGET_PATH/r8169.zst.bak$i + do + i=$(($i+1)) + done + echo "rename r8169.ko.zst to r8169.zst.bak$i" + mv $TARGET_PATH/r8169.ko.zst $TARGET_PATH/r8169.zst.bak$i + else + echo "rename r8169.ko.zst to r8169.zst.bak" + mv $TARGET_PATH/r8169.ko.zst $TARGET_PATH/r8169.zst.bak + fi + fi fi echo "DEPMOD $(uname -r)" @@ -84,4 +99,3 @@ echo "Completed." exit 0 -
View file
r8168-8.053.00.tar.gz/src/Makefile -> r8168-8.057.00.tar.gz/src/Makefile
Changed
@@ -4,7 +4,7 @@ # r8168 is the Linux device driver released for Realtek Gigabit Ethernet # controllers with PCI-Express interface. # -# Copyright(c) 2024 Realtek Semiconductor Corp. All rights reserved. +# Copyright(c) 2025 Realtek Semiconductor Corp. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free @@ -30,7 +30,7 @@ # US6,570,884, US6,115,776, and US6,327,625. ################################################################################ -CONFIG_SOC_LAN = n +CONFIG_SOC_LAN = y ENABLE_FIBER_SUPPORT = n ENABLE_REALWOW_SUPPORT = n ENABLE_DASH_SUPPORT = n @@ -48,6 +48,7 @@ ENABLE_RSS_SUPPORT = n ENABLE_LIB_SUPPORT = n DISABLE_WOL_SUPPORT = n +ENABLE_GIGA_LITE = y ifneq ($(KERNELRELEASE),) obj-m := r8168.o @@ -117,6 +118,12 @@ ifeq ($(DISABLE_WOL_SUPPORT), y) EXTRA_CFLAGS += -DDISABLE_WOL_SUPPORT endif + ifeq ($(ENABLE_GIGA_LITE), y) + EXTRA_CFLAGS += -DENABLE_GIGA_LITE + endif + + # Backward compatibility + ccflags-y += $(EXTRA_CFLAGS) else BASEDIR := /lib/modules/$(shell uname -r) KERNELDIR ?= $(BASEDIR)/build
View file
r8168-8.053.00.tar.gz/src/Makefile_linux24x -> r8168-8.057.00.tar.gz/src/Makefile_linux24x
Changed
@@ -4,7 +4,7 @@ # r8168 is the Linux device driver released for Realtek Gigabit Ethernet # controllers with PCI-Express interface. # -# Copyright(c) 2024 Realtek Semiconductor Corp. All rights reserved. +# Copyright(c) 2025 Realtek Semiconductor Corp. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free
View file
r8168-8.053.00.tar.gz/src/r8168.h -> r8168-8.057.00.tar.gz/src/r8168.h
Changed
@@ -5,7 +5,7 @@ # r8168 is the Linux device driver released for Realtek Gigabit Ethernet # controllers with PCI-Express interface. # -# Copyright(c) 2024 Realtek Semiconductor Corp. All rights reserved. +# Copyright(c) 2025 Realtek Semiconductor Corp. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free @@ -32,6 +32,9 @@ * US6,570,884, US6,115,776, and US6,327,625. ***********************************************************************************/ +#ifndef R8168_H +#define R8168_H + #include <linux/ethtool.h> #include <linux/interrupt.h> #include <linux/version.h> @@ -53,6 +56,68 @@ #define fallthrough #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) +#define netif_xmit_stopped netif_tx_queue_stopped +#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) */ + +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0) +#ifndef MDIO_AN_EEE_ADV_100TX +#define MDIO_AN_EEE_ADV_100TX 0x0002 /* Advertise 100TX EEE cap */ +#endif +#ifndef MDIO_AN_EEE_ADV_1000T +#define MDIO_AN_EEE_ADV_1000T 0x0004 /* Advertise 1000T EEE cap */ +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,6,0) +#define MDIO_EEE_100TX MDIO_AN_EEE_ADV_100TX /* 100TX EEE cap */ +#define MDIO_EEE_1000T MDIO_AN_EEE_ADV_1000T /* 1000T EEE cap */ +#define MDIO_EEE_10GT 0x0008 /* 10GT EEE cap */ +#define MDIO_EEE_1000KX 0x0010 /* 1000KX EEE cap */ +#define MDIO_EEE_10GKX4 0x0020 /* 10G KX4 EEE cap */ +#define MDIO_EEE_10GKR 0x0040 /* 10G KR EEE cap */ +#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,6,0) */ + +static inline u32 mmd_eee_adv_to_ethtool_adv_t(u16 eee_adv) +{ + u32 adv = 0; + + if (eee_adv & MDIO_EEE_100TX) + adv |= ADVERTISED_100baseT_Full; + if (eee_adv & MDIO_EEE_1000T) + adv |= ADVERTISED_1000baseT_Full; + if (eee_adv & MDIO_EEE_10GT) + adv |= ADVERTISED_10000baseT_Full; + if (eee_adv & MDIO_EEE_1000KX) + adv |= ADVERTISED_1000baseKX_Full; + if (eee_adv & MDIO_EEE_10GKX4) + adv |= ADVERTISED_10000baseKX4_Full; + if (eee_adv & MDIO_EEE_10GKR) + adv |= ADVERTISED_10000baseKR_Full; + + return adv; +} + +static inline u16 ethtool_adv_to_mmd_eee_adv_t(u32 adv) +{ + u16 reg = 0; + + if (adv & ADVERTISED_100baseT_Full) + reg |= MDIO_EEE_100TX; + if (adv & ADVERTISED_1000baseT_Full) + reg |= MDIO_EEE_1000T; + if (adv & ADVERTISED_10000baseT_Full) + reg |= MDIO_EEE_10GT; + if (adv & ADVERTISED_1000baseKX_Full) + reg |= MDIO_EEE_1000KX; + if (adv & ADVERTISED_10000baseKX4_Full) + reg |= MDIO_EEE_10GKX4; + if (adv & ADVERTISED_10000baseKR_Full) + reg |= MDIO_EEE_10GKR; + + return reg; +} +#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0) */ + #if LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0) static inline ssize_t strscpy(char *dest, const char *src, size_t count) @@ -103,6 +168,18 @@ static inline void netdev_tx_reset_queue(struct netdev_queue *q) {} #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,8,0) +static inline void fsleep(unsigned long usecs) +{ + if (usecs <= 10) + udelay(usecs); + else if (usecs <= 20000) + usleep_range(usecs, 2 * usecs); + else + msleep(DIV_ROUND_UP(usecs, 1000)); +} +#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,8,0) */ + #if LINUX_VERSION_CODE < KERNEL_VERSION(5,2,0) #define netdev_xmit_more() (0) #endif @@ -238,7 +315,7 @@ #define ENABLE_R8168_PROCFS #endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0) #define ENABLE_R8168_SYSFS #endif @@ -274,6 +351,13 @@ #if !defined(HAVE_FREE_NETDEV) && (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0)) #define free_netdev(x) kfree(x) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) +#define RTL_NAPI_DEL(priv) +#else +#define RTL_NAPI_DEL(priv) netif_napi_del(&priv->napi) +#endif //LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) +#else +#define RTL_NAPI_DEL(priv) #endif #ifndef SET_NETDEV_DEV @@ -349,6 +433,13 @@ #define MDIO_EEE_1000T 0x0004 #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(6,9,0) +#define ethtool_keee ethtool_eee +#define rtl8168_ethtool_adv_to_mmd_eee_adv_cap1_t ethtool_adv_to_mmd_eee_adv_t +#else +#define rtl8168_ethtool_adv_to_mmd_eee_adv_cap1_t linkmode_to_mii_eee_cap1_t +#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(6,9,0) */ + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29) #ifdef CONFIG_NET_POLL_CONTROLLER #define RTL_NET_POLL_CONTROLLER dev->poll_controller=rtl8168_netpoll @@ -431,12 +522,12 @@ #define RSS_SUFFIX "" #endif -#define RTL8168_VERSION "8.053.00" NAPI_SUFFIX FIBER_SUFFIX REALWOW_SUFFIX DASH_SUFFIX RSS_SUFFIX +#define RTL8168_VERSION "8.057.00" NAPI_SUFFIX FIBER_SUFFIX REALWOW_SUFFIX DASH_SUFFIX RSS_SUFFIX #define MODULENAME "r8168" #define PFX MODULENAME ": " #define GPL_CLAIM "\ -r8168 Copyright (C) 2024 Realtek NIC software team <nicfae@realtek.com> \n \ +r8168 Copyright (C) 2026 Realtek NIC software team <nicfae@realtek.com> \n \ This program comes with ABSOLUTELY NO WARRANTY; for details, please see <http://www.gnu.org/licenses/>. \n \ This is free software, and you are welcome to redistribute it under certain conditions; see <http://www.gnu.org/licenses/>. \n" @@ -531,7 +622,7 @@ #define NUM_TX_DESC 1024 /* Number of Tx descriptor registers */ #define NUM_RX_DESC 1024 /* Number of Rx descriptor registers */ -#define RX_BUF_SIZE 0x05F2 /* 0x05F2 = 1522bye */ +#define RX_BUF_SIZE 0x05F2 /* 0x05F2 = 1522 bytes */ #define R8168_MAX_TX_QUEUES (2) #define R8168_MAX_RX_QUEUES (4) #define R8168_MAX_QUEUES R8168_MAX_RX_QUEUES @@ -613,6 +704,13 @@ #define ETH_MIN_MTU 68 #endif +#ifndef WRITE_ONCE +#define WRITE_ONCE(var, val) (*((volatile typeof(var) *)(&(var))) = (val)) +#endif +#ifndef READ_ONCE +#define READ_ONCE(var) (*((volatile typeof(var) *)(&(var)))) +#endif + /*****************************************************************************/ //#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,3) @@ -697,12 +795,6 @@ #define RTL_NAPI_DISABLE(dev, napi) napi_disable(napi) #endif //LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24) -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) -#define RTL_NAPI_DEL(priv) -#else -#define RTL_NAPI_DEL(priv) netif_napi_del(&priv->napi) -#endif //LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) - /*****************************************************************************/ #ifdef CONFIG_R8168_NAPI #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0) @@ -1179,10 +1271,17 @@ CounterAddrLow = 0x10, CounterAddrHigh = 0x14, CustomLED = 0x18, +#ifdef ENABLE_LIB_SUPPORT
View file
r8168-8.053.00.tar.gz/src/r8168_asf.c -> r8168-8.057.00.tar.gz/src/r8168_asf.c
Changed
@@ -5,7 +5,7 @@ # r8168 is the Linux device driver released for Realtek Gigabit Ethernet # controllers with PCI-Express interface. # -# Copyright(c) 2024 Realtek Semiconductor Corp. All rights reserved. +# Copyright(c) 2025 Realtek Semiconductor Corp. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free @@ -58,7 +58,7 @@ struct ifreq *ifr) { struct rtl8168_private *tp = netdev_priv(dev); - void *user_data = ifr->ifr_data; + void __user *user_data = ifr->ifr_data; struct asf_ioctl_struct asf_usrdata; if (tp->mcfg != CFG_METHOD_7 && tp->mcfg != CFG_METHOD_8) @@ -249,8 +249,10 @@ eeprom_off = 75; /* write the new IP address to EEPROM */ - rtl8168_eeprom_write_sc(tp, eeprom_off, (data1 << 8) | data0); - rtl8168_eeprom_write_sc(tp, eeprom_off + 1, (data3 << 8) | data2); + if (eeprom_off != 0) { + rtl8168_eeprom_write_sc(tp, eeprom_off, (data1 << 8) | data0); + rtl8168_eeprom_write_sc(tp, eeprom_off + 1, (data3 << 8) | data2); + } } }
View file
r8168-8.053.00.tar.gz/src/r8168_asf.h -> r8168-8.057.00.tar.gz/src/r8168_asf.h
Changed
@@ -5,7 +5,7 @@ # r8168 is the Linux device driver released for Realtek Gigabit Ethernet # controllers with PCI-Express interface. # -# Copyright(c) 2024 Realtek Semiconductor Corp. All rights reserved. +# Copyright(c) 2025 Realtek Semiconductor Corp. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free @@ -32,6 +32,9 @@ * US6,570,884, US6,115,776, and US6,327,625. ***********************************************************************************/ +#ifndef R8168_ASF_H +#define R8168_ASF_H + #define SIOCDEVPRIVATE_RTLASF SIOCDEVPRIVATE #define FUNCTION_ENABLE 1 @@ -280,16 +283,17 @@ int rtl8168_asf_ioctl(struct net_device *dev, struct ifreq *ifr); void rtl8168_asf_hbperiod(struct rtl8168_private *tp, int arg, unsigned int *data); void rtl8168_asf_wd16rst(struct rtl8168_private *tp, int arg, unsigned int *data); -void rtl8168_asf_console_mac(struct rtl8168_private *, int arg, unsigned int *data); -void rtl8168_asf_ip_address(struct rtl8168_private *, int arg, int offset, unsigned int *data); +void rtl8168_asf_console_mac(struct rtl8168_private *tp, int arg, unsigned int *data); +void rtl8168_asf_ip_address(struct rtl8168_private *tp, int arg, int offset, unsigned int *data); void rtl8168_asf_config_regs(struct rtl8168_private *tp, int arg, int offset, unsigned int *data); void rtl8168_asf_capability_masks(struct rtl8168_private *tp, int arg, int offset, unsigned int *data); void rtl8168_asf_community_string(struct rtl8168_private *tp, int arg, char *string); void rtl8168_asf_community_string_len(struct rtl8168_private *tp, int arg, unsigned int *data); -void rtl8168_asf_alert_resend_interval(struct rtl8168_private *tp, int arg, unsigned int *data); void rtl8168_asf_time_period(struct rtl8168_private *tp, int arg, int offset, unsigned int *data); -void rtl8168_asf_key_access(struct rtl8168_private *, int arg, int offset, unsigned int *data); +void rtl8168_asf_key_access(struct rtl8168_private *tp, int arg, int offset, unsigned int *data); void rtl8168_asf_rw_hexadecimal(struct rtl8168_private *tp, int arg, int offset, int len, unsigned int *data); void rtl8168_asf_rw_iana(struct rtl8168_private *tp, int arg, unsigned int *data); void rtl8168_asf_rw_uuid(struct rtl8168_private *tp, int arg, unsigned int *data); void rtl8168_asf_rw_systemid(struct rtl8168_private *tp, int arg, unsigned int *data); + +#endif /* R8168_ASF_H */
View file
r8168-8.053.00.tar.gz/src/r8168_dash.h -> r8168-8.057.00.tar.gz/src/r8168_dash.h
Changed
@@ -5,7 +5,7 @@ # r8168 is the Linux device driver released for Realtek Gigabit Ethernet # controllers with PCI-Express interface. # -# Copyright(c) 2024 Realtek Semiconductor Corp. All rights reserved. +# Copyright(c) 2025 Realtek Semiconductor Corp. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free @@ -32,10 +32,10 @@ * US6,570,884, US6,115,776, and US6,327,625. ***********************************************************************************/ -#ifndef _LINUX_R8168_DASH_H -#define _LINUX_R8168_DASH_H +#ifndef R8168_DASH_H +#define R8168_DASH_H -#define SIOCDEVPRIVATE_RTLDASH SIOCDEVPRIVATE+2 +#define SIOCDEVPRIVATE_RTLDASH (SIOCDEVPRIVATE+2) enum rtl_dash_cmd { RTL_DASH_ARP_NS_OFFLOAD = 0, @@ -60,7 +60,7 @@ RTL_FW_GET_WAKEUP_PATTERN, RTL_FW_DEL_WAKEUP_PATTERN, - RTLT_DASH_COMMAND_INVALID, + RTL_DASH_COMMAND_INVALID, }; struct rtl_dash_ip_mac { @@ -75,7 +75,7 @@ __u32 len; union { __u32 data; - void *data_buffer; + void __user *data_buffer; }; }; @@ -120,7 +120,7 @@ __le32 resv; __le64 BufferAddress; } -RX_DASH_FROM_FW_DESC, *PRX_DASH_FROM_FW_DESC; +__packed RX_DASH_FROM_FW_DESC, *PRX_DASH_FROM_FW_DESC; typedef struct _TX_DASH_SEND_FW_DESC { __le16 length; @@ -128,7 +128,7 @@ __le32 resv; __le64 BufferAddress; } -TX_DASH_SEND_FW_DESC, *PTX_DASH_SEND_FW_DESC; +__packed TX_DASH_SEND_FW_DESC, *PTX_DASH_SEND_FW_DESC; typedef struct _OSOOBHdr { __le32 len; @@ -137,13 +137,13 @@ u8 hostReqV; u8 res; } -OSOOBHdr, *POSOOBHdr; +__packed OSOOBHdr, *POSOOBHdr; typedef struct _RX_DASH_BUFFER_TYPE_2 { OSOOBHdr oobhdr; - u8 RxDataBuffer0; + u8 RxDataBuffer; } -RX_DASH_BUFFER_TYPE_2, *PRX_DASH_BUFFER_TYPE_2; +__packed RX_DASH_BUFFER_TYPE_2, *PRX_DASH_BUFFER_TYPE_2; #define ALIGN_8 (0x7) #define ALIGN_16 (0xf) @@ -160,7 +160,7 @@ #define OCP_REG_CR (0x36) #define OCP_REG_DMEMSTA (0x38) #define OCP_REG_GPHYAR (0x60) - +#define OCP_REG_FIRMWARE_MAJOR_VERSION (0x120) #define OCP_REG_CONFIG0_DASHEN BIT_15 #define OCP_REG_CONFIG0_OOBRESET BIT_14 @@ -175,6 +175,9 @@ #define HW_DASH_SUPPORT_TYPE_1(_M) ((_M)->HwSuppDashVer == 1) #define HW_DASH_SUPPORT_TYPE_2(_M) ((_M)->HwSuppDashVer == 2) #define HW_DASH_SUPPORT_TYPE_3(_M) ((_M)->HwSuppDashVer == 3) +#define HW_DASH_SUPPORT_CMAC(_M) (HW_DASH_SUPPORT_TYPE_2(_M) || HW_DASH_SUPPORT_TYPE_3(_M)) +#define HW_DASH_SUPPORT_GET_FIRMWARE_VERSION(_M) (HW_DASH_SUPPORT_TYPE_2(_M) || \ + HW_DASH_SUPPORT_TYPE_3(_M)) #define RECV_FROM_FW_BUF_SIZE (2048) #define SEND_TO_FW_BUF_SIZE (2048) @@ -202,7 +205,7 @@ #define SystemSlaveDescStartAddrLow (0xF8) #define SystemSlaveDescStartAddrHigh (0xFC) -//DASH Request Type +/* DASH Request Type */ #define WSMANREG 0x01 #define OSPUSHDATA 0x02 @@ -235,16 +238,16 @@ #define RTL8168FP_CMAC_IOBASE 0xBAF20000 #define RTL8168FP_KVM_BASE 0xBAF80400 #define CMAC_SYNC_REG 0x20 -#define CMAC_RXDESC_OFFSET 0x90 //RX: 0x90 - 0x98 -#define CMAC_TXDESC_OFFSET 0x98 //TX: 0x98 - 0x9F +#define CMAC_RXDESC_OFFSET 0x90 /* RX: 0x90 - 0x98 */ +#define CMAC_TXDESC_OFFSET 0x98 /* TX: 0x98 - 0x9F */ /* cmac write/read MMIO register */ -#define RTL_CMAC_W8(tp, reg, val8) writeb ((val8), tp->cmac_ioaddr + (reg)) -#define RTL_CMAC_W16(tp, reg, val16) writew ((val16), tp->cmac_ioaddr + (reg)) -#define RTL_CMAC_W32(tp, reg, val32) writel ((val32), tp->cmac_ioaddr + (reg)) -#define RTL_CMAC_R8(tp, reg) readb (tp->cmac_ioaddr + (reg)) -#define RTL_CMAC_R16(tp, reg) readw (tp->cmac_ioaddr + (reg)) -#define RTL_CMAC_R32(tp, reg) ((unsigned long) readl (tp->cmac_ioaddr + (reg))) +#define RTL_CMAC_W8(tp, reg, val8) writeb ((val8), (tp)->cmac_ioaddr + (reg)) +#define RTL_CMAC_W16(tp, reg, val16) writew ((val16), (tp)->cmac_ioaddr + (reg)) +#define RTL_CMAC_W32(tp, reg, val32) writel ((val32), (tp)->cmac_ioaddr + (reg)) +#define RTL_CMAC_R8(tp, reg) readb ((tp)->cmac_ioaddr + (reg)) +#define RTL_CMAC_R16(tp, reg) readw ((tp)->cmac_ioaddr + (reg)) +#define RTL_CMAC_R32(tp, reg) readl ((tp)->cmac_ioaddr + (reg)) int rtl8168_dash_ioctl(struct net_device *dev, struct ifreq *ifr); bool CheckDashInterrupt(struct net_device *dev, u16 status); @@ -252,6 +255,4 @@ int AllocateDashShareMemory(struct net_device *dev); void FreeAllocatedDashShareMemory(struct net_device *dev); void DashHwInit(struct net_device *dev); - - -#endif /* _LINUX_R8168_DASH_H */ +#endif /* R8168_DASH_H */
View file
r8168-8.053.00.tar.gz/src/r8168_fiber.h -> r8168-8.057.00.tar.gz/src/r8168_fiber.h
Changed
@@ -5,7 +5,7 @@ # r8168 is the Linux device driver released for Realtek Gigabit Ethernet # controllers with PCI-Express interface. # -# Copyright(c) 2024 Realtek Semiconductor Corp. All rights reserved. +# Copyright(c) 2025 Realtek Semiconductor Corp. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free @@ -32,8 +32,8 @@ * US6,570,884, US6,115,776, and US6,327,625. ***********************************************************************************/ -#ifndef _LINUX_R8168_FIBER_H -#define _LINUX_R8168_FIBER_H +#ifndef R8168_FIBER_H +#define R8168_FIBER_H enum { FIBER_MODE_NIC_ONLY = 0, @@ -72,4 +72,4 @@ void rtl8168_check_hw_fiber_mode_support(struct rtl8168_private *tp); void rtl8168_set_fiber_mode_software_variable(struct rtl8168_private *tp); -#endif /* _LINUX_R8168_FIBER_H */ +#endif /* R8168_FIBER_H */
View file
r8168-8.053.00.tar.gz/src/r8168_firmware.c -> r8168-8.057.00.tar.gz/src/r8168_firmware.c
Changed
@@ -5,7 +5,7 @@ # r8168 is the Linux device driver released for Realtek Gigabit Ethernet # controllers with PCI-Express interface. # -# Copyright(c) 2024 Realtek Semiconductor Corp. All rights reserved. +# Copyright(c) 2025 Realtek Semiconductor Corp. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free @@ -139,7 +139,7 @@ break; case PHY_BJMPN: - if (regno > index) + if (regno >= index) goto out; break; case PHY_READCOUNT_EQ_SKIP:
View file
r8168-8.053.00.tar.gz/src/r8168_firmware.h -> r8168-8.057.00.tar.gz/src/r8168_firmware.h
Changed
@@ -5,7 +5,7 @@ # r8168 is the Linux device driver released for Realtek 2.5Gigabit Ethernet # controllers with PCI-Express interface. # -# Copyright(c) 2024 Realtek Semiconductor Corp. All rights reserved. +# Copyright(c) 2025 Realtek Semiconductor Corp. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free @@ -32,8 +32,8 @@ * US6,570,884, US6,115,776, and US6,327,625. ***********************************************************************************/ -#ifndef _LINUX_RTL8168_FIRMWARE_H -#define _LINUX_RTL8168_FIRMWARE_H +#ifndef R8168_FIRMWARE_H +#define R8168_FIRMWARE_H #include <linux/device.h> #include <linux/firmware.h> @@ -65,4 +65,4 @@ void rtl8168_fw_release_firmware(struct rtl8168_fw *rtl_fw); void rtl8168_fw_write_firmware(struct rtl8168_private *tp, struct rtl8168_fw *rtl_fw); -#endif /* _LINUX_RTL8168_FIRMWARE_H */ +#endif /* R8168_FIRMWARE_H */
View file
r8168-8.053.00.tar.gz/src/r8168_n.c -> r8168-8.057.00.tar.gz/src/r8168_n.c
Changed
@@ -5,7 +5,7 @@ # r8168 is the Linux device driver released for Realtek Gigabit Ethernet # controllers with PCI-Express interface. # -# Copyright(c) 2024 Realtek Semiconductor Corp. All rights reserved. +# Copyright(c) 2025 Realtek Semiconductor Corp. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free @@ -478,8 +478,13 @@ #else static int disable_wol_support = 0; #endif +#ifdef ENABLE_GIGA_LITE +static int enable_giga_lite = 1; +#else +static int enable_giga_lite = 0; +#endif -MODULE_AUTHOR("Realtek and the Linux r8168 crew <netdev@vger.kernel.org>"); +MODULE_AUTHOR("Realtek and the Linux r8169 crew <netdev@vger.kernel.org>"); MODULE_DESCRIPTION("RealTek RTL-8168 Gigabit Ethernet driver"); module_param(speed_mode, uint, 0); @@ -498,7 +503,7 @@ MODULE_PARM_DESC(aspm, "Enable ASPM."); module_param(dynamic_aspm, int, 0); -MODULE_PARM_DESC(aspm, "Enable Software Dynamic ASPM."); +MODULE_PARM_DESC(dynamic_aspm, "Enable Software Dynamic ASPM."); module_param(s5wol, int, 0); MODULE_PARM_DESC(s5wol, "Enable Shutdown Wake On Lan."); @@ -527,11 +532,34 @@ module_param(disable_wol_support, int, 0); MODULE_PARM_DESC(disable_wol_support, "Disable PM support."); +module_param(enable_giga_lite, int, 0); +MODULE_PARM_DESC(enable_giga_lite, "Enable Giga Lite."); + #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0) module_param_named(debug, debug.msg_enable, int, 0); MODULE_PARM_DESC(debug, "Debug verbosity level (0=none, ..., 16=all)"); #endif//LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0) +static void rtl8168_init_module_params(struct rtl8168_private *tp) +{ + tp->use_dac = use_dac; + tp->timer_count = timer_count; + tp->dynamic_aspm_packet_threshold = dynamic_aspm_packet_threshold; + tp->speed_mode = speed_mode; + tp->duplex_mode = duplex_mode; + tp->autoneg_mode = autoneg_mode; + tp->advertising_mode = advertising_mode; + tp->aspm = aspm; + tp->dynamic_aspm = dynamic_aspm; + tp->s5wol = s5wol; + tp->s5_keep_curr_mac = s5_keep_curr_mac; + tp->s0_magic_packet = s0_magic_packet; + tp->disable_wol_support = disable_wol_support; + tp->enable_giga_lite = enable_giga_lite; + tp->hwoptimize = hwoptimize; + tp->eee.eee_enabled = eee_enable; +} + MODULE_LICENSE("GPL"); #ifdef ENABLE_USE_FIRMWARE_FILE MODULE_FIRMWARE(FIRMWARE_8168D_1); @@ -618,6 +646,9 @@ static int rtl8168_set_phy_mcu_patch_request(struct rtl8168_private *tp); static int rtl8168_clear_phy_mcu_patch_request(struct rtl8168_private *tp); +static u32 rtl8168_pci_config_read(struct rtl8168_private *tp, u32 addr); +static void rtl8168_pci_config_write(struct rtl8168_private *tp, u32 addr, u32 value); + #ifdef CONFIG_R8168_NAPI static int rtl8168_poll(napi_ptr napi, napi_budget budget); #endif @@ -992,7 +1023,7 @@ #endif } -static u32 rtl8168_convert_link_speed(u16 status) +static u32 rtl8168_convert_link_speed(struct rtl8168_private *tp, u16 status) { u32 speed = SPEED_UNKNOWN; @@ -1003,6 +1034,10 @@ speed = SPEED_100; else if (status & _10bps) speed = SPEED_10; + else { + if (tp->enable_giga_lite) + speed = SPEED_1000; + } } return speed; @@ -1038,7 +1073,7 @@ wait_cnt = 0; do { - mdelay(1); + fsleep(1000); val = rtl8168_mdio_read(tp, 0x11); wait_cnt++; } while (!(val & BIT_15) && (wait_cnt < 5000)); @@ -1280,18 +1315,19 @@ seq_printf(m, "DASH\t0x%x\n", tp->DASH); seq_printf(m, "dash_printer_enabled\t0x%x\n", tp->dash_printer_enabled); seq_printf(m, "HwSuppKCPOffloadVer\t0x%x\n", tp->HwSuppKCPOffloadVer); - seq_printf(m, "speed_mode\t0x%x\n", speed_mode); - seq_printf(m, "duplex_mode\t0x%x\n", duplex_mode); - seq_printf(m, "autoneg_mode\t0x%x\n", autoneg_mode); - seq_printf(m, "advertising_mode\t0x%x\n", advertising_mode); - seq_printf(m, "aspm\t0x%x\n", aspm); - seq_printf(m, "s5wol\t0x%x\n", s5wol); - seq_printf(m, "s5_keep_curr_mac\t0x%x\n", s5_keep_curr_mac); + seq_printf(m, "speed_mode\t0x%x\n", tp->speed_mode); + seq_printf(m, "duplex_mode\t0x%x\n", tp->duplex_mode); + seq_printf(m, "autoneg_mode\t0x%x\n", tp->autoneg_mode); + seq_printf(m, "advertising_mode\t0x%x\n", tp->advertising_mode); + seq_printf(m, "aspm\t0x%x\n", tp->aspm); + seq_printf(m, "s5wol\t0x%x\n", tp->s5wol); + seq_printf(m, "s5_keep_curr_mac\t0x%x\n", tp->s5_keep_curr_mac); seq_printf(m, "eee_enable\t0x%x\n", tp->eee.eee_enabled); - seq_printf(m, "hwoptimize\t0x%lx\n", hwoptimize); + seq_printf(m, "hwoptimize\t0x%lx\n", tp->hwoptimize); seq_printf(m, "proc_init_num\t0x%x\n", proc_init_num); - seq_printf(m, "s0_magic_packet\t0x%x\n", s0_magic_packet); - seq_printf(m, "disable_wol_support\t0x%x\n", disable_wol_support); + seq_printf(m, "s0_magic_packet\t0x%x\n", tp->s0_magic_packet); + seq_printf(m, "disable_wol_support\t0x%x\n", tp->disable_wol_support); + seq_printf(m, "enable_giga_lite\t0x%x\n", tp->enable_giga_lite); seq_printf(m, "HwSuppMagicPktVer\t0x%x\n", tp->HwSuppMagicPktVer); seq_printf(m, "HwSuppUpsVer\t0x%x\n", tp->HwSuppUpsVer); seq_printf(m, "HwSuppEsdVer\t0x%x\n", tp->HwSuppEsdVer); @@ -1503,16 +1539,16 @@ seq_printf(m, "\n0x%03x:\t", n); for (i = 0; i < 4 && n < max; i++, n+=4) { - pci_read_config_dword(tp->pci_dev, n, &dword_rd); + dword_rd = rtl8168_pci_config_read(tp, n); seq_printf(m, "%08x ", dword_rd); } } n = 0x110; - pci_read_config_dword(tp->pci_dev, n, &dword_rd); + dword_rd = rtl8168_pci_config_read(tp, n); seq_printf(m, "\n0x%03x:\t%08x ", n, dword_rd); n = 0x70c; - pci_read_config_dword(tp->pci_dev, n, &dword_rd); + dword_rd = rtl8168_pci_config_read(tp, n); seq_printf(m, "\n0x%03x:\t%08x ", n, dword_rd); rtnl_unlock(); @@ -1560,7 +1596,7 @@ status = RTL_R8(tp, PHYstatus); if (status & LinkStatus) seq_printf(m, "\nlink speed:%d", - rtl8168_convert_link_speed(status)); + rtl8168_convert_link_speed(tp, status)); else seq_puts(m, "\nlink status:off"); @@ -1701,26 +1737,35 @@ rtnl_lock(); - for (i=0; i<tp->HwSuppNumTxQueues; i++) { - struct rtl8168_tx_ring *ring = &tp->tx_ringi; - if (!ring->TxDescArray) - continue; - seq_printf(m, "\ndump Q%d tx desc:%d\n", i, ring->num_tx_desc); +#ifdef ENABLE_LIB_SUPPORT + (void)i; + if (tp->tx_ring0.TxDescArray) { + struct rtl8168_tx_ring *ring = &tp->tx_ring0; + + seq_printf(m, "\ndump rtk tx desc:%d\n", ring->num_tx_desc); _proc_dump_tx_desc(m, ring->TxDescArray, ring->TxDescAllocSize, ring->num_tx_desc); } -#ifdef ENABLE_LIB_SUPPORT - for (i=0; i<tp->HwSuppNumTxQueues; i++) { - struct rtl8168_ring *ring = &tp->lib_tx_ringi; - if (!ring->desc_addr) - continue; - seq_printf(m, "\ndump lib Q%d tx desc:%d\n", i, ring->ring_size); + if (tp->lib_tx_ring1.desc_addr) { + struct rtl8168_ring *ring = &tp->lib_tx_ring1; + + seq_printf(m, "\ndump lib tx desc:%d\n", ring->ring_size); _proc_dump_tx_desc(m, ring->desc_addr, ring->desc_size, ring->ring_size); }
View file
r8168-8.053.00.tar.gz/src/r8168_realwow.h -> r8168-8.057.00.tar.gz/src/r8168_realwow.h
Changed
@@ -5,7 +5,7 @@ # r8168 is the Linux device driver released for Realtek Gigabit Ethernet # controllers with PCI-Express interface. # -# Copyright(c) 2024 Realtek Semiconductor Corp. All rights reserved. +# Copyright(c) 2025 Realtek Semiconductor Corp. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free @@ -32,10 +32,10 @@ * US6,570,884, US6,115,776, and US6,327,625. ***********************************************************************************/ -#ifndef _LINUX_R8168_REALWOW_H -#define _LINUX_R8168_REALWOW_H +#ifndef R8168_REALWOW_H +#define R8168_REALWOW_H -#define SIOCDEVPRIVATE_RTLREALWOW SIOCDEVPRIVATE+3 +#define SIOCDEVPRIVATE_RTLREALWOW (SIOCDEVPRIVATE + 3) #define MAX_RealWoW_KCP_SIZE (100) #define MAX_RealWoW_Payload (64) @@ -43,12 +43,12 @@ #define KA_TX_PACKET_SIZE (100) #define KA_WAKEUP_PATTERN_SIZE (120) -//HwSuppKeepAliveOffloadVer +/* HwSuppKeepAliveOffloadVer */ #define HW_SUPPORT_KCP_OFFLOAD(_M) ((_M)->HwSuppKCPOffloadVer > 0) enum rtl_realwow_cmd { - RTL_REALWOW_SET_KCP_DISABLE=0, + RTL_REALWOW_SET_KCP_DISABLE = 0, RTL_REALWOW_SET_KCP_INFO, RTL_REALWOW_SET_KCP_CONTENT, @@ -56,7 +56,7 @@ RTL_REALWOW_SET_KCP_WPINFO, RTL_REALWOW_SET_KCPDHCP_TIMEOUT, - RTLT_REALWOW_COMMAND_INVALID + RTL_REALWOW_COMMAND_INVALID }; struct rtl_realwow_ioctl_struct { @@ -65,7 +65,7 @@ __u32 len; union { __u32 data; - void *data_buffer; + void __user *data_buffer; }; }; @@ -85,7 +85,7 @@ } MP_KCP_INFO, *PMP_KCP_INFO; typedef struct _KCPInfo { - u32 nId; // = id + u32 nId; /* = id */ u8 DIPv44; u8 MacID6; u16 UdpPort; @@ -93,26 +93,26 @@ } KCPInfo, *PKCPInfo; typedef struct _KCPContent { - u32 id; // = id - u32 mSec; // = msec - u32 size; // =size - u8 bPacketMAX_RealWoW_KCP_SIZE; // put packet here + u32 id; /* = id */ + u32 mSec; /* = msec */ + u32 size; /* = size */ + u8 bPacketMAX_RealWoW_KCP_SIZE; /* put packet here */ } KCPContent, *PKCPContent; typedef struct _RealWoWAckPktInfo { u16 ackLostCnt; - u16 patterntSize; + u16 patternSize; u8 patternMAX_RealWoW_Payload; -} RealWoWAckPktInfo,*PRealWoWAckPktInfo; +} RealWoWAckPktInfo, *PRealWoWAckPktInfo; typedef struct _RealWoWWPInfo { - u16 patterntSize; + u16 patternSize; u8 patternMAX_RealWoW_Payload; -} RealWoWWPInfo,*PRealWoWWPInfo; +} RealWoWWPInfo, *PRealWoWWPInfo; int rtl8168_realwow_ioctl(struct net_device *dev, struct ifreq *ifr); void rtl8168_realwow_hw_init(struct net_device *dev); void rtl8168_get_realwow_hw_version(struct net_device *dev); void rtl8168_set_realwow_d3_para(struct net_device *dev); -#endif /* _LINUX_R8168_REALWOW_H */ +#endif /* R8168_REALWOW_H */
View file
r8168-8.053.00.tar.gz/src/r8168_rss.c -> r8168-8.057.00.tar.gz/src/r8168_rss.c
Changed
@@ -5,7 +5,7 @@ # r8168 is the Linux device driver released for Realtek Gigabit Ethernet # controllers with PCI-Express interface. # -# Copyright(c) 2024 Realtek Semiconductor Corp. All rights reserved. +# Copyright(c) 2025 Realtek Semiconductor Corp. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free @@ -80,8 +80,6 @@ struct rtl8168_private *tp = netdev_priv(dev); int ret = -EOPNOTSUPP; - netif_info(tp, drv, tp->dev, "rss get rxnfc\n"); - if (!(dev->features & NETIF_F_RXHASH)) return ret; @@ -106,7 +104,7 @@ } #define RSS_MASK_BITS_OFFSET (8) -static int _rtl8168_set_rss_hash_opt(struct rtl8168_private *tp) +static void _rtl8168_set_rss_hash_opt(struct rtl8168_private *tp) { u32 hash_mask_len; u32 rss_ctrl; @@ -127,8 +125,6 @@ rss_ctrl |= hash_mask_len << RSS_MASK_BITS_OFFSET; rtl8168_eri_write(tp, RSS_CTRL_8168, 4, rss_ctrl, ERIAR_ExGMAC); - - return 0; } static int rtl8168_set_rss_hash_opt(struct rtl8168_private *tp, @@ -136,8 +132,6 @@ { u32 rss_flags = tp->rss_flags; - netif_info(tp, drv, tp->dev, "rss set hash\n"); - /* * RSS does not support anything other than hashing * to queues on src and dst IPs and ports @@ -205,8 +199,6 @@ struct rtl8168_private *tp = netdev_priv(dev); int ret = -EOPNOTSUPP; - netif_info(tp, drv, tp->dev, "rss set rxnfc\n"); - if (!(dev->features & NETIF_F_RXHASH)) return ret; @@ -230,8 +222,6 @@ { struct rtl8168_private *tp = netdev_priv(dev); - netif_info(tp, drv, tp->dev, "rss get key size\n"); - if (!(dev->features & NETIF_F_RXHASH)) return 0; @@ -242,8 +232,6 @@ { struct rtl8168_private *tp = netdev_priv(dev); - netif_info(tp, drv, tp->dev, "rss get indir tbl size\n"); - if (!(dev->features & NETIF_F_RXHASH)) return 0; @@ -301,11 +289,16 @@ { const u16 rss_key_reg = rtl8168_rss_key_reg(tp); u32 i, rss_key_size = _rtl8168_get_rxfh_key_size(tp); - u32 *rss_key = (u32*)tp->rss_key; - /* Write redirection table to HW */ - for (i = 0; i < rss_key_size; i+=4) - rtl8168_eri_write(tp, rss_key_reg + i, 4, *rss_key++, ERIAR_ExGMAC); + /* Write RSS hash key to HW */ + for (i = 0; i < rss_key_size; i += 4) { + u32 key_word = ((u32)tp->rss_keyi) | + ((u32)tp->rss_keyi + 1 << 8) | + ((u32)tp->rss_keyi + 2 << 16) | + ((u32)tp->rss_keyi + 3 << 24); + + rtl8168_eri_write(tp, rss_key_reg + i, 4, key_word, ERIAR_ExGMAC); + } } #if LINUX_VERSION_CODE >= KERNEL_VERSION(6,8,0) @@ -313,8 +306,6 @@ { struct rtl8168_private *tp = netdev_priv(dev); - netif_info(tp, drv, tp->dev, "rss get rxfh\n"); - if (!(dev->features & NETIF_F_RXHASH)) return -EOPNOTSUPP; @@ -336,8 +327,6 @@ u32 reta_entries = rtl8168_rss_indir_tbl_entries(tp); int i; - netif_info(tp, drv, tp->dev, "rss set rxfh\n"); - /* We require at least one supported parameter to be changed and no * change in any of the unsupported parameters */ @@ -373,8 +362,6 @@ { struct rtl8168_private *tp = netdev_priv(dev); - netif_info(tp, drv, tp->dev, "rss get rxfh\n"); - if (!(dev->features & NETIF_F_RXHASH)) return -EOPNOTSUPP; @@ -397,8 +384,6 @@ u32 reta_entries = rtl8168_rss_indir_tbl_entries(tp); int i; - netif_info(tp, drv, tp->dev, "rss set rxfh\n"); - /* We require at least one supported parameter to be changed and no * change in any of the unsupported parameters */ @@ -434,7 +419,7 @@ struct RxDescV2 *desc) { if (!desc->RSSResult) - udelay(1); + fsleep(1); return le32_to_cpu(desc->RSSResult); }
View file
r8168-8.053.00.tar.gz/src/r8168_rss.h -> r8168-8.057.00.tar.gz/src/r8168_rss.h
Changed
@@ -2,10 +2,10 @@ /* ################################################################################ # -# r8125 is the Linux device driver released for Realtek 2.5Gigabit Ethernet +# r8168 is the Linux device driver released for Realtek Gigabit Ethernet # controllers with PCI-Express interface. # -# Copyright(c) 2024 Realtek Semiconductor Corp. All rights reserved. +# Copyright(c) 2025 Realtek Semiconductor Corp. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free @@ -32,8 +32,8 @@ * US6,570,884, US6,115,776, and US6,327,625. ***********************************************************************************/ -#ifndef _LINUX_RTL8168_RSS_H -#define _LINUX_RTL8168_RSS_H +#ifndef RTL8168_RSS_H +#define RTL8168_RSS_H #include <linux/netdevice.h> #include <linux/types.h> @@ -69,4 +69,4 @@ u32 rtl8168_rss_indir_tbl_entries(struct rtl8168_private *tp); void rtl8168_disable_rss(struct rtl8168_private *tp); -#endif /* _LINUX_RTL8168_RSS_H */ +#endif /* RTL8168_RSS_H */
View file
r8168-8.053.00.tar.gz/src/rtl_eeprom.c -> r8168-8.057.00.tar.gz/src/rtl_eeprom.c
Changed
@@ -5,7 +5,7 @@ # r8168 is the Linux device driver released for Realtek Gigabit Ethernet # controllers with PCI-Express interface. # -# Copyright(c) 2024 Realtek Semiconductor Corp. All rights reserved. +# Copyright(c) 2025 Realtek Semiconductor Corp. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free @@ -46,10 +46,8 @@ //------------------------------------------------------------------- //rtl8168_eeprom_type(): -// tell the eeprom type -//return value: -// 0: the eeprom type is 93C46 -// 1: the eeprom type is 93C56 or 93C66 +// Probe and set the EEPROM type in tp->eeprom_type and tp->eeprom_len. +// Must be called before any EEPROM read/write operations. //------------------------------------------------------------------- void rtl8168_eeprom_type(struct rtl8168_private *tp) { @@ -58,12 +56,12 @@ if (tp->mcfg == CFG_METHOD_DEFAULT) goto out_no_eeprom; - if(RTL_R8(tp, 0xD2)&0x04) { + if (RTL_R8(tp, 0xD2) & 0x04) { //not support //tp->eeprom_type = EEPROM_TWSI; //tp->eeprom_len = 256; goto out_no_eeprom; - } else if(RTL_R32(tp, RxConfig) & RxCfg_9356SEL) { + } else if (RTL_R32(tp, RxConfig) & RxCfg_9356SEL) { tp->eeprom_type = EEPROM_TYPE_93C56; tp->eeprom_len = 256; } else { @@ -104,10 +102,10 @@ x = RTL_R8(tp, Cfg9346); if (x & Cfg9346_EEDO) { - udelay(RTL_CLOCK_RATE * 2 * 3); + fsleep(RTL_CLOCK_RATE * 2 * 3); return 0; } - udelay(1); + fsleep(1); } return -1; @@ -121,15 +119,15 @@ { int addr_sz = 6; u8 x; - u16 data; + u16 data = 0; - if(tp->eeprom_type == EEPROM_TYPE_NONE) { - return -1; + if (tp->eeprom_type == EEPROM_TYPE_NONE) { + return 0xFFFF; } - if (tp->eeprom_type==EEPROM_TYPE_93C46) + if (tp->eeprom_type == EEPROM_TYPE_93C46) addr_sz = 6; - else if (tp->eeprom_type==EEPROM_TYPE_93C56) + else if (tp->eeprom_type == EEPROM_TYPE_93C56) addr_sz = 8; x = Cfg9346_EEM1 | Cfg9346_EECS; @@ -157,13 +155,13 @@ int addr_sz = 6; int w_dummy_addr = 4; - if(tp->eeprom_type == EEPROM_TYPE_NONE) + if (tp->eeprom_type == EEPROM_TYPE_NONE) return; - if (tp->eeprom_type==EEPROM_TYPE_93C46) { + if (tp->eeprom_type == EEPROM_TYPE_93C46) { addr_sz = 6; w_dummy_addr = 4; - } else if (tp->eeprom_type==EEPROM_TYPE_93C56) { + } else if (tp->eeprom_type == EEPROM_TYPE_93C56) { addr_sz = 8; w_dummy_addr = 6; } @@ -178,19 +176,20 @@ rtl8168_shift_out_bits(tp, RTL_EEPROM_ERASE_OPCODE, 3); rtl8168_shift_out_bits(tp, reg, addr_sz); if (rtl8168_eeprom_cmd_done(tp) < 0) - return; + goto exit; rtl8168_stand_by(tp); rtl8168_shift_out_bits(tp, RTL_EEPROM_WRITE_OPCODE, 3); rtl8168_shift_out_bits(tp, reg, addr_sz); rtl8168_shift_out_bits(tp, data, 16); if (rtl8168_eeprom_cmd_done(tp) < 0) - return; + goto exit; rtl8168_stand_by(tp); rtl8168_shift_out_bits(tp, RTL_EEPROM_EWDS_OPCODE, 5); rtl8168_shift_out_bits(tp, reg, w_dummy_addr); +exit: rtl8168_eeprom_cleanup(tp); RTL_W8(tp, Cfg9346, 0); } @@ -199,23 +198,22 @@ { *x = *x | Cfg9346_EESK; RTL_W8(tp, Cfg9346, *x); - udelay(RTL_CLOCK_RATE); + fsleep(RTL_CLOCK_RATE); } void rtl8168_lower_clock(struct rtl8168_private *tp, u8 *x) { - *x = *x & ~Cfg9346_EESK; RTL_W8(tp, Cfg9346, *x); - udelay(RTL_CLOCK_RATE); + fsleep(RTL_CLOCK_RATE); } void rtl8168_shift_out_bits(struct rtl8168_private *tp, int data, int count) { u8 x; - int mask; + unsigned int mask; - mask = 0x01 << (count - 1); + mask = 0x01U << (count - 1); x = RTL_R8(tp, Cfg9346); x &= ~(Cfg9346_EEDI | Cfg9346_EEDO); @@ -226,11 +224,11 @@ x &= ~Cfg9346_EEDI; RTL_W8(tp, Cfg9346, x); - udelay(RTL_CLOCK_RATE); + fsleep(RTL_CLOCK_RATE); rtl8168_raise_clock(tp, &x); rtl8168_lower_clock(tp, &x); mask = mask >> 1; - } while(mask); + } while (mask); x &= ~Cfg9346_EEDI; RTL_W8(tp, Cfg9346, x); @@ -239,7 +237,8 @@ u16 rtl8168_shift_in_bits(struct rtl8168_private *tp) { u8 x; - u16 d, i; + u16 d; + int i; x = RTL_R8(tp, Cfg9346); x &= ~(Cfg9346_EEDI | Cfg9346_EEDO); @@ -269,7 +268,7 @@ x = RTL_R8(tp, Cfg9346); x &= ~(Cfg9346_EECS | Cfg9346_EESK); RTL_W8(tp, Cfg9346, x); - udelay(RTL_CLOCK_RATE); + fsleep(RTL_CLOCK_RATE); x |= Cfg9346_EECS; RTL_W8(tp, Cfg9346, x); @@ -280,7 +279,7 @@ RTL_W8(tp, Cfg9346, Cfg9346_EEM1); RTL_W8(tp, Cfg9346, Cfg9346_EEM1 | Cfg9346_EESK); - udelay(20); + fsleep(20); RTL_W8(tp, Cfg9346, Cfg9346_EEM1); }
View file
r8168-8.053.00.tar.gz/src/rtl_eeprom.h -> r8168-8.057.00.tar.gz/src/rtl_eeprom.h
Changed
@@ -5,7 +5,7 @@ # r8168 is the Linux device driver released for Realtek Gigabit Ethernet # controllers with PCI-Express interface. # -# Copyright(c) 2024 Realtek Semiconductor Corp. All rights reserved. +# Copyright(c) 2025 Realtek Semiconductor Corp. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free @@ -32,10 +32,14 @@ * US6,570,884, US6,115,776, and US6,327,625. ***********************************************************************************/ -//EEPROM opcodes -#define RTL_EEPROM_READ_OPCODE 06 -#define RTL_EEPROM_WRITE_OPCODE 05 -#define RTL_EEPROM_ERASE_OPCODE 07 +#ifndef RTL_EEPROM_H +#define RTL_EEPROM_H + + +/* EEPROM opcodes */ +#define RTL_EEPROM_READ_OPCODE 6 +#define RTL_EEPROM_WRITE_OPCODE 5 +#define RTL_EEPROM_ERASE_OPCODE 7 #define RTL_EEPROM_EWEN_OPCODE 19 #define RTL_EEPROM_EWDS_OPCODE 16 @@ -52,5 +56,4 @@ void rtl8168_stand_by(struct rtl8168_private *tp); void rtl8168_set_eeprom_sel_low(struct rtl8168_private *tp); - - +#endif /* RTL_EEPROM_H */
View file
r8168-8.053.00.tar.gz/src/rtltool.c -> r8168-8.057.00.tar.gz/src/rtltool.c
Changed
@@ -5,7 +5,7 @@ # r8168 is the Linux device driver released for Realtek Gigabit Ethernet # controllers with PCI-Express interface. # -# Copyright(c) 2024 Realtek Semiconductor Corp. All rights reserved. +# Copyright(c) 2025 Realtek Semiconductor Corp. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free @@ -55,6 +55,12 @@ ret = 0; switch (my_cmd.cmd) { case RTLTOOL_READ_MAC: + if (my_cmd.offset >= R8168_REGS_SIZE || + my_cmd.len > R8168_REGS_SIZE - my_cmd.offset) { + ret = -EINVAL; + break; + } + if (my_cmd.len==1) my_cmd.data = readb(tp->mmio_addr+my_cmd.offset); else if (my_cmd.len==2) @@ -72,6 +78,12 @@ } break; case RTLTOOL_WRITE_MAC: + if (my_cmd.offset >= R8168_REGS_SIZE || + my_cmd.len > R8168_REGS_SIZE - my_cmd.offset) { + ret = -EINVAL; + break; + } + if (my_cmd.len==1) writeb(my_cmd.data, tp->mmio_addr+my_cmd.offset); else if (my_cmd.len==2) @@ -162,6 +174,11 @@ } break; case RTLTOOL_READ_EEPROM: + if (my_cmd.offset > 0xFFFF) { + ret = -EINVAL; + break; + } + my_cmd.data = rtl8168_eeprom_read_sc(tp, my_cmd.offset); if (copy_to_user(ifr->ifr_data, &my_cmd, sizeof(my_cmd))) { ret = -EFAULT; @@ -169,9 +186,19 @@ } break; case RTLTOOL_WRITE_EEPROM: + if (my_cmd.offset > 0xFFFF) { + ret = -EINVAL; + break; + } + rtl8168_eeprom_write_sc(tp, my_cmd.offset, my_cmd.data); break; - case RTL_READ_OOB_MAC: + case RTLTOOL_READ_OOB_MAC: + if (my_cmd.offset > 0xFFFF) { + ret = -EINVAL; + break; + } + rtl8168_oob_mutex_lock(tp); my_cmd.data = rtl8168_ocp_read(tp, my_cmd.offset, 4); rtl8168_oob_mutex_unlock(tp); @@ -181,25 +208,39 @@ break; } break; - case RTL_WRITE_OOB_MAC: - if (my_cmd.len == 0 || my_cmd.len > 4) - return -EOPNOTSUPP; + case RTLTOOL_WRITE_OOB_MAC: + if (my_cmd.len == 0 || my_cmd.len > 4) { + ret = -EOPNOTSUPP; + break; + } + + if (my_cmd.offset > 0xFFFF) { + ret = -EINVAL; + break; + } rtl8168_oob_mutex_lock(tp); rtl8168_ocp_write(tp, my_cmd.offset, my_cmd.len, my_cmd.data); rtl8168_oob_mutex_unlock(tp); break; - case RTL_ENABLE_PCI_DIAG: + case RTLTOOL_ENABLE_PCI_DIAG: tp->rtk_enable_diag = 1; dprintk("enable rtk diag\n"); break; - case RTL_DISABLE_PCI_DIAG: + case RTLTOOL_DISABLE_PCI_DIAG: tp->rtk_enable_diag = 0; dprintk("disable rtk diag\n"); break; - case RTL_READ_MAC_OCP: - if (my_cmd.offset % 2) - return -EOPNOTSUPP; + case RTLTOOL_READ_MAC_OCP: + if (my_cmd.offset % 2) { + ret = -EOPNOTSUPP; + break; + } + + if (my_cmd.offset > 0xFFFF) { + ret = -EINVAL; + break; + } my_cmd.data = rtl8168_mac_ocp_read(tp, my_cmd.offset); if (copy_to_user(ifr->ifr_data, &my_cmd, sizeof(my_cmd))) { @@ -207,20 +248,27 @@ break; } break; - case RTL_WRITE_MAC_OCP: - if ((my_cmd.offset % 2) || (my_cmd.len != 2)) - return -EOPNOTSUPP; + case RTLTOOL_WRITE_MAC_OCP: + if ((my_cmd.offset % 2) || (my_cmd.len != 2)) { + ret = -EOPNOTSUPP; + break; + } + + if (my_cmd.offset > 0xFFFF) { + ret = -EINVAL; + break; + } rtl8168_mac_ocp_write(tp, my_cmd.offset, (u16)my_cmd.data); break; - case RTL_DIRECT_READ_PHY_OCP: + case RTLTOOL_DIRECT_READ_PHY_OCP: my_cmd.data = rtl8168_mdio_prot_direct_read_phy_ocp(tp, my_cmd.offset); if (copy_to_user(ifr->ifr_data, &my_cmd, sizeof(my_cmd))) { ret = -EFAULT; break; } break; - case RTL_DIRECT_WRITE_PHY_OCP: + case RTLTOOL_DIRECT_WRITE_PHY_OCP: rtl8168_mdio_prot_direct_write_phy_ocp(tp, my_cmd.offset, my_cmd.data); break; default:
View file
r8168-8.053.00.tar.gz/src/rtltool.h -> r8168-8.057.00.tar.gz/src/rtltool.h
Changed
@@ -5,7 +5,7 @@ # r8168 is the Linux device driver released for Realtek Gigabit Ethernet # controllers with PCI-Express interface. # -# Copyright(c) 2024 Realtek Semiconductor Corp. All rights reserved. +# Copyright(c) 2025 Realtek Semiconductor Corp. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free @@ -32,13 +32,15 @@ * US6,570,884, US6,115,776, and US6,327,625. ***********************************************************************************/ -#ifndef _LINUX_RTLTOOL_H -#define _LINUX_RTLTOOL_H +#ifndef RTLTOOL_H +#define RTLTOOL_H -#define SIOCRTLTOOL SIOCDEVPRIVATE+1 +#include <linux/types.h> + +#define SIOCRTLTOOL (SIOCDEVPRIVATE + 1) enum rtl_cmd { - RTLTOOL_READ_MAC=0, + RTLTOOL_READ_MAC = 0, RTLTOOL_WRITE_MAC, RTLTOOL_READ_PHY, RTLTOOL_WRITE_PHY, @@ -51,17 +53,17 @@ RTLTOOL_READ_EEPROM, RTLTOOL_WRITE_EEPROM, - RTL_READ_OOB_MAC, - RTL_WRITE_OOB_MAC, + RTLTOOL_READ_OOB_MAC, + RTLTOOL_WRITE_OOB_MAC, - RTL_ENABLE_PCI_DIAG, - RTL_DISABLE_PCI_DIAG, + RTLTOOL_ENABLE_PCI_DIAG, + RTLTOOL_DISABLE_PCI_DIAG, - RTL_READ_MAC_OCP, - RTL_WRITE_MAC_OCP, + RTLTOOL_READ_MAC_OCP, + RTLTOOL_WRITE_MAC_OCP, - RTL_DIRECT_READ_PHY_OCP, - RTL_DIRECT_WRITE_PHY_OCP, + RTLTOOL_DIRECT_READ_PHY_OCP, + RTLTOOL_DIRECT_WRITE_PHY_OCP, RTLTOOL_INVALID }; @@ -73,14 +75,8 @@ __u32 data; }; -enum mode_access { - MODE_NONE=0, - MODE_READ, - MODE_WRITE -}; - #ifdef __KERNEL__ int rtl8168_tool_ioctl(struct rtl8168_private *tp, struct ifreq *ifr); #endif -#endif /* _LINUX_RTLTOOL_H */ +#endif /* RTLTOOL_H */
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.