Projects
home:bitstreamout: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 14
View file
r8168.changes
Changed
@@ -1,4 +1,15 @@ ------------------------------------------------------------------- +Thu Jan 21 15:49:06 UTC 2021 - Werner Fink <werner@suse.de> + +- Update to 8.048.03 + +------------------------------------------------------------------- +Thu Jan 21 15:47:05 UTC 2021 - Werner Fink <werner@suse.de> + +- Remove patch 83b957b4.patch as now we change to github for basic + download + +------------------------------------------------------------------- Tue Mar 31 06:40:50 UTC 2020 - Werner Fink <werner@suse.de> - Add patch 83b957b4.patch to get it build for kernel 5.6
View file
r8168.spec
Changed
@@ -18,20 +18,17 @@ #!BuildIgnore: enough-build-resources Name: r8168 -Version: 8.048.00 +Version: 8.048.03 Release: 0 Summary: Device driver for RealTek Gigabit Ethernet controllers License: GPL-2.0-or-later Group: System/Kernel -# Compare with https://github.com/mtorromeo/r8168 and -# http://www.realtek.com.tw/Downloads/downloadsView.aspx?Langid=1&PNid=13&PFid=5&Level=5&Conn=4&DownTypeID=3&GetDown=false#2 -URL: https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software -Source0: %{name}-%{version}.tar.bz2 +URL: https://github.com/mtorromeo/r8168 +Source0: https://github.com/mtorromeo/r8168/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: preamble Source2: Module.supported Patch0: r8168-kernel_version.patch Patch1: r8168-configuration.patch -Patch42: 83b957b4.patch BuildRequires: kernel-source BuildRequires: kernel-syms BuildRequires: libelf-devel @@ -60,7 +57,6 @@ %setup -q %patch0 -b .p0 %patch1 -b .p1 -%patch42 -p1 -b .p42 cp %{S:1} . cp %{S:2} .
View file
83b957b4.patch
Deleted
@@ -1,97 +0,0 @@ -From 83b957b43d320da29476c6782be55df1bfb62d94 Mon Sep 17 00:00:00 2001 -From: petehg <pherworth@gmail.com> -Date: Sun, 1 Mar 2020 09:38:25 +0000 -Subject: [PATCH] added patch for kernel-5.6 - ---- - src/r8168_n.c | 33 +++++++++++++++++++++++++++------ - 1 file changed, 27 insertions(+), 6 deletions(-) - -diff --git a/src/r8168_n.c b/src/r8168_n.c -index 0df6041..557823e 100755 ---- a/src/r8168_n.c -+++ b/src/r8168_n.c -@@ -456,7 +456,11 @@ static void rtl8168_hw_config(struct net_device *dev); - static void rtl8168_hw_start(struct net_device *dev); - static int rtl8168_close(struct net_device *dev); - static void rtl8168_set_rx_mode(struct net_device *dev); -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0) -+static void rtl8168_tx_timeout(struct net_device *dev, unsigned int new_mtu); -+#else - static void rtl8168_tx_timeout(struct net_device *dev); -+#endif - static struct net_device_stats *rtl8168_get_stats(struct net_device *dev); - static int rtl8168_rx_interrupt(struct net_device *, struct rtl8168_private *, napi_budget); - static int rtl8168_change_mtu(struct net_device *dev, int new_mtu); -@@ -1615,7 +1619,14 @@ static int rtl8168_proc_open(struct inode *inode, struct file *file) - - return single_open(file, show, dev); - } -- -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0) -+static const struct proc_ops rtl8168_proc_ops = { -+ .proc_open = rtl8168_proc_open, -+ .proc_read = seq_read, -+ .proc_lseek = seq_lseek, -+ .proc_release = single_release, -+}; -+#else - static const struct file_operations rtl8168_proc_fops = { - .open = rtl8168_proc_open, - .read = seq_read, -@@ -1623,6 +1634,7 @@ static const struct file_operations rtl8168_proc_fops = { - .release = single_release, - }; - #endif -+#endif - - /* - * Table of proc files we need to create. -@@ -1665,9 +1677,15 @@ static void rtl8168_proc_init(struct net_device *dev) - tp->proc_dir = dir; - proc_init_num++; - -- for (f = rtl8168_proc_files; f->name[0]; f++) { -- if (!proc_create_data(f->name, S_IFREG | S_IRUGO, dir, -- &rtl8168_proc_fops, f->show)) { -+ for (f = rtl8168_proc_files; f->name[0]; f++) { -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0) -+ if (!proc_create_data(f->name, S_IFREG | S_IRUGO, dir, -+ &rtl8168_proc_ops, f->show)) -+#else -+ if (!proc_create_data(f->name, S_IFREG | S_IRUGO, dir, -+ &rtl8168_proc_fops, f->show)) -+#endif -+ { - printk("Unable to initialize " - "/proc/net/%s/%s/%s\n", - MODULENAME, dev->name, f->name); -@@ -25881,7 +25899,6 @@ rtl8168_init_one(struct pci_dev *pdev, - #if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,22) - SET_ETHTOOL_OPS(dev, &rtl8168_ethtool_ops); - #endif -- - dev->watchdog_timeo = RTL8168_TX_TIMEOUT; - dev->irq = pdev->irq; - dev->base_addr = (unsigned long) ioaddr; -@@ -27817,7 +27834,7 @@ static void rtl8168_reset_task(struct work_struct *work) - #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24) - rtl8168_rx_interrupt(dev, tp, &budget); - #else -- rtl8168_rx_interrupt(dev, tp, budget); -+ rtl8168_rx_interrupt(dev, tp, budget); - #endif //LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24) - - spin_lock_irqsave(&tp->lock, flags); -@@ -27844,7 +27861,11 @@ static void rtl8168_reset_task(struct work_struct *work) - } - - static void -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0) -+rtl8168_tx_timeout(struct net_device *dev, unsigned int txqueue) -+#else - rtl8168_tx_timeout(struct net_device *dev) -+#endif - { - struct rtl8168_private *tp = netdev_priv(dev); - unsigned long flags;
View file
r8168-kernel_version.patch
Changed
@@ -18,7 +18,7 @@ #define vlan_tx_tag_present skb_vlan_tag_present --- src/r8168_n.c +++ src/r8168_n.c 2020-02-10 11:32:37.788832833 +0000 -@@ -28535,7 +28535,7 @@ process_pkt: +@@ -28655,7 +28655,7 @@ process_pkt: if (rtl8168_rx_vlan_skb(tp, desc, skb) < 0) rtl8168_rx_skb(tp, skb);
View file
r8168-8.048.00.tar.bz2/src/r8168.h -> r8168-8.048.03.tar.gz/src/r8168.h
Changed
@@ -4,7 +4,7 @@ # r8168 is the Linux device driver released for Realtek Gigabit Ethernet # controllers with PCI-Express interface. # -# Copyright(c) 2019 Realtek Semiconductor Corp. All rights reserved. +# Copyright(c) 2020 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 @@ -335,12 +335,12 @@ #define DASH_SUFFIX "" #endif -#define RTL8168_VERSION "8.048.00" NAPI_SUFFIX FIBER_SUFFIX REALWOW_SUFFIX DASH_SUFFIX +#define RTL8168_VERSION "8.048.03" NAPI_SUFFIX FIBER_SUFFIX REALWOW_SUFFIX DASH_SUFFIX #define MODULENAME "r8168" #define PFX MODULENAME ": " #define GPL_CLAIM "\ -r8168 Copyright (C) 2019 Realtek NIC software team <nicfae@realtek.com> \n \ +r8168 Copyright (C) 2020 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" @@ -359,9 +359,6 @@ #define R8168_MSG_DEFAULT \ (NETIF_MSG_DRV | NETIF_MSG_PROBE | NETIF_MSG_IFUP | NETIF_MSG_IFDOWN) -#define TX_BUFFS_AVAIL(tp) \ - (tp->dirty_tx + NUM_TX_DESC - tp->cur_tx - 1) - #ifdef CONFIG_R8168_NAPI #define rtl8168_rx_hwaccel_skb vlan_hwaccel_receive_skb #define rtl8168_rx_quota(count, quota) min(count, quota) @@ -437,6 +434,8 @@ #define SHORT_PACKET_PADDING_BUF_SIZE 256 +#define RTK_MAGIC_DEBUG_VALUE 0x0badbeef + /* write/read MMIO register */ #define RTL_W8(tp, reg, val8) writeb((val8), tp->mmio_addr + (reg)) #define RTL_W16(tp, reg, val16) writew((val16), tp->mmio_addr + (reg)) @@ -1572,6 +1571,8 @@ u32 HwFiberStat; u8 HwSwitchMdiToFiber; + u8 HwSuppSerDesPhyVer; + u8 HwSuppPhyOcpVer; u16 NicCustLedValue; @@ -1808,6 +1809,8 @@ void rtl8168_hw_disable_mac_mcu_bps(struct net_device *dev); #define HW_SUPPORT_CHECK_PHY_DISABLE_MODE(_M) ((_M)->HwSuppCheckPhyDisableModeVer > 0 ) +#define HW_SUPP_SERDES_PHY(_M) ((_M)->HwSuppSerDesPhyVer > 0) +#define HW_HAS_WRITE_PHY_MCU_RAM_CODE(_M) (((_M)->HwHasWrRamCodeToMicroP == TRUE) ? 1 : 0) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,34) #define netdev_mc_count(dev) ((dev)->mc_count)
View file
r8168-8.048.00.tar.bz2/src/r8168_asf.c -> r8168-8.048.03.tar.gz/src/r8168_asf.c
Changed
@@ -4,7 +4,7 @@ # r8168 is the Linux device driver released for Realtek Gigabit Ethernet # controllers with PCI-Express interface. # -# Copyright(c) 2019 Realtek Semiconductor Corp. All rights reserved. +# Copyright(c) 2020 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.048.00.tar.bz2/src/r8168_asf.h -> r8168-8.048.03.tar.gz/src/r8168_asf.h
Changed
@@ -4,7 +4,7 @@ # r8168 is the Linux device driver released for Realtek Gigabit Ethernet # controllers with PCI-Express interface. # -# Copyright(c) 2019 Realtek Semiconductor Corp. All rights reserved. +# Copyright(c) 2020 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.048.00.tar.bz2/src/r8168_dash.h -> r8168-8.048.03.tar.gz/src/r8168_dash.h
Changed
@@ -4,7 +4,7 @@ # r8168 is the Linux device driver released for Realtek Gigabit Ethernet # controllers with PCI-Express interface. # -# Copyright(c) 2019 Realtek Semiconductor Corp. All rights reserved. +# Copyright(c) 2020 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.048.00.tar.bz2/src/r8168_fiber.h -> r8168-8.048.03.tar.gz/src/r8168_fiber.h
Changed
@@ -4,7 +4,7 @@ # r8168 is the Linux device driver released for Realtek Gigabit Ethernet # controllers with PCI-Express interface. # -# Copyright(c) 2019 Realtek Semiconductor Corp. All rights reserved. +# Copyright(c) 2020 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,11 +55,12 @@ void rtl8168_hw_init_fiber_nic(struct net_device *dev); void rtl8168_hw_fiber_nic_d3_para(struct net_device *dev); void rtl8168_hw_fiber_phy_config(struct net_device *dev); -u32 rtl8168_hw_fiber_get_connect_status(struct net_device *dev); void rtl8168_hw_switch_mdi_to_fiber(struct net_device *dev); void rtl8168_hw_switch_mdi_to_nic(struct net_device *dev); unsigned int rtl8168_hw_fiber_link_ok(struct net_device *dev); void rtl8168_check_fiber_link_status(struct net_device *dev); +void rtl8168_check_hw_fiber_mode_support(struct net_device *dev); +void rtl8168_set_fiber_mode_software_variable(struct net_device *dev); #endif /* _LINUX_R8168_FIBER_H */
View file
r8168-8.048.00.tar.bz2/src/r8168_n.c -> r8168-8.048.03.tar.gz/src/r8168_n.c
Changed
@@ -4,7 +4,7 @@ # r8168 is the Linux device driver released for Realtek Gigabit Ethernet # controllers with PCI-Express interface. # -# Copyright(c) 2019 Realtek Semiconductor Corp. All rights reserved. +# Copyright(c) 2020 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 @@ -456,7 +456,11 @@ static void rtl8168_hw_start(struct net_device *dev); static int rtl8168_close(struct net_device *dev); static void rtl8168_set_rx_mode(struct net_device *dev); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0) +static void rtl8168_tx_timeout(struct net_device *dev, unsigned int txqueue); +#else static void rtl8168_tx_timeout(struct net_device *dev); +#endif static struct net_device_stats *rtl8168_get_stats(struct net_device *dev); static int rtl8168_rx_interrupt(struct net_device *, struct rtl8168_private *, napi_budget); static int rtl8168_change_mtu(struct net_device *dev, int new_mtu); @@ -881,6 +885,7 @@ seq_printf(m, "HwFiberModeVer\t0x%x\n", tp->HwFiberModeVer); seq_printf(m, "HwFiberStat\t0x%x\n", tp->HwFiberStat); seq_printf(m, "HwSwitchMdiToFiber\t0x%x\n", tp->HwSwitchMdiToFiber); + seq_printf(m, "HwSuppSerDesPhyVer\t0x%x\n", tp->HwSuppSerDesPhyVer); seq_printf(m, "NicCustLedValue\t0x%x\n", tp->NicCustLedValue); seq_printf(m, "RequiredSecLanDonglePatch\t0x%x\n", tp->RequiredSecLanDonglePatch); seq_printf(m, "HwSuppDashVer\t0x%x\n", tp->HwSuppDashVer); @@ -1190,6 +1195,7 @@ "HwFiberModeVer\t0x%x\n" "HwFiberStat\t0x%x\n" "HwSwitchMdiToFiber\t0x%x\n" + "HwSuppSerDesPhyVer\t0x%x\n" "NicCustLedValue\t0x%x\n" "RequiredSecLanDonglePatch\t0x%x\n" "HwSuppDashVer\t0x%x\n" @@ -1270,6 +1276,7 @@ tp->HwFiberModeVer, tp->HwFiberStat, tp->HwSwitchMdiToFiber, + tp->HwSuppSerDesPhyVer, tp->NicCustLedValue, tp->RequiredSecLanDonglePatch, tp->HwSuppDashVer, @@ -1616,6 +1623,14 @@ return single_open(file, show, dev); } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0) +static const struct proc_ops rtl8168_proc_fops = { + .proc_open = rtl8168_proc_open, + .proc_read = seq_read, + .proc_lseek = seq_lseek, + .proc_release = single_release, +}; +#else static const struct file_operations rtl8168_proc_fops = { .open = rtl8168_proc_open, .read = seq_read, @@ -1624,6 +1639,8 @@ }; #endif +#endif + /* * Table of proc files we need to create. */ @@ -2088,6 +2105,52 @@ return data16; } +static void +rtl8168_clear_and_set_mcu_ocp_bit( + struct rtl8168_private *tp, + u16 addr, + u16 clearmask, + u16 setmask +) +{ + u16 RegValue; + + RegValue = rtl8168_mac_ocp_read(tp, addr); + RegValue &= ~clearmask; + RegValue |= setmask; + rtl8168_mac_ocp_write(tp, addr, RegValue); +} + +/* +static void +rtl8168_clear_mcu_ocp_bit( + struct rtl8168_private *tp, + u16 addr, + u16 mask +) +{ + rtl8168_clear_and_set_mcu_ocp_bit(tp, + addr, + mask, + 0 + ); +} +*/ + +static void +rtl8168_set_mcu_ocp_bit( + struct rtl8168_private *tp, + u16 addr, + u16 mask +) +{ + rtl8168_clear_and_set_mcu_ocp_bit(tp, + addr, + 0, + mask + ); +} + static u32 real_ocp_read(struct rtl8168_private *tp, u16 addr, u8 len) { int i, val_shift, shift = 0; @@ -3699,10 +3762,6 @@ rtl8168_check_fiber_link_status(dev); #endif //ENABLE_FIBER_SUPPORT -#ifdef ENABLE_FIBER_SUPPORT - rtl8168_check_fiber_link_status(dev); -#endif //ENABLE_FIBER_SUPPORT - link_status_on = tp->link_ok(dev); if (tp->mcfg == CFG_METHOD_11) @@ -4483,7 +4542,7 @@ tp->wol_opts |= WAKE_MCAST; out_unlock: - tp->wol_enabled = (tp->wol_opts) ? WOL_ENABLED : WOL_DISABLED; + tp->wol_enabled = (tp->wol_opts || tp->dash_printer_enabled) ? WOL_ENABLED : WOL_DISABLED; spin_unlock_irqrestore(&tp->lock, flags); } @@ -4529,6 +4588,9 @@ RTL_W8(tp, cfg[i].reg, options); } + if (tp->dash_printer_enabled) + RTL_W8(tp, Config5, RTL_R8(tp, Config5) | LanWake); + rtl8168_disable_cfg9346_write(tp); } @@ -4601,6 +4663,9 @@ rtl8168_disable_cfg9346_write(tp); } + if (HW_SUPP_SERDES_PHY(tp)) + return; + rtl8168_mdio_write(tp, 0x1F, 0x0000); auto_nego = rtl8168_mdio_read(tp, MII_ADVERTISE); auto_nego &= ~(ADVERTISE_10HALF | ADVERTISE_10FULL @@ -4760,11 +4825,11 @@ tp->wol_opts = wol->wolopts; - tp->wol_enabled = (tp->wol_opts) ? WOL_ENABLED : WOL_DISABLED; + tp->wol_enabled = (tp->wol_opts || tp->dash_printer_enabled) ? WOL_ENABLED : WOL_DISABLED; spin_unlock_irqrestore(&tp->lock, flags); - device_set_wakeup_enable(&tp->pci_dev->dev, wol->wolopts); + device_set_wakeup_enable(&tp->pci_dev->dev, tp->wol_enabled); return 0; } @@ -6205,6 +6270,9 @@ return -EOPNOTSUPP; } + if (HW_SUPP_SERDES_PHY(tp) || !HW_HAS_WRITE_PHY_MCU_RAM_CODE(tp)) + return -EOPNOTSUPP; + spin_lock_irqsave(&tp->lock, flags); if (unlikely(tp->rtk_enable_diag)) { @@ -6861,6 +6929,21 @@ } static void +rtl8168_switch_to_sgmii_mode( + struct rtl8168_private *tp +) +{ + if (FALSE == HW_SUPP_SERDES_PHY(tp)) return; + + switch (tp->HwSuppSerDesPhyVer) { + case 1: + rtl8168_mac_ocp_write(tp, 0xEB00, 0x2); + rtl8168_set_mcu_ocp_bit(tp, 0xEB16, BIT_1);
View file
r8168-8.048.00.tar.bz2/src/r8168_realwow.h -> r8168-8.048.03.tar.gz/src/r8168_realwow.h
Changed
@@ -4,7 +4,7 @@ # r8168 is the Linux device driver released for Realtek Gigabit Ethernet # controllers with PCI-Express interface. # -# Copyright(c) 2019 Realtek Semiconductor Corp. All rights reserved. +# Copyright(c) 2020 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.048.00.tar.bz2/src/rtl_eeprom.c -> r8168-8.048.03.tar.gz/src/rtl_eeprom.c
Changed
@@ -4,7 +4,7 @@ # r8168 is the Linux device driver released for Realtek Gigabit Ethernet # controllers with PCI-Express interface. # -# Copyright(c) 2019 Realtek Semiconductor Corp. All rights reserved. +# Copyright(c) 2020 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.048.00.tar.bz2/src/rtl_eeprom.h -> r8168-8.048.03.tar.gz/src/rtl_eeprom.h
Changed
@@ -4,7 +4,7 @@ # r8168 is the Linux device driver released for Realtek Gigabit Ethernet # controllers with PCI-Express interface. # -# Copyright(c) 2019 Realtek Semiconductor Corp. All rights reserved. +# Copyright(c) 2020 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.048.00.tar.bz2/src/rtltool.c -> r8168-8.048.03.tar.gz/src/rtltool.c
Changed
@@ -4,7 +4,7 @@ # r8168 is the Linux device driver released for Realtek Gigabit Ethernet # controllers with PCI-Express interface. # -# Copyright(c) 2019 Realtek Semiconductor Corp. All rights reserved. +# Copyright(c) 2020 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.048.00.tar.bz2/src/rtltool.h -> r8168-8.048.03.tar.gz/src/rtltool.h
Changed
@@ -4,7 +4,7 @@ # r8168 is the Linux device driver released for Realtek Gigabit Ethernet # controllers with PCI-Express interface. # -# Copyright(c) 2019 Realtek Semiconductor Corp. All rights reserved. +# Copyright(c) 2020 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
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
.