diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-04-12 03:41:30 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-04-12 03:41:30 +0100 |
commit | 623ee73d661e5ed8475cb264511f683407d87365 (patch) | |
tree | 993eb27c93ec7a2d2d19550300d888fc1fed9e69 /net-misc/r8168/files | |
parent | ceeeb463cc1eef97fd62eaee8bf2196ba04bc384 (diff) |
gentoo Easter resync : 12.04.2020
Diffstat (limited to 'net-misc/r8168/files')
-rw-r--r-- | net-misc/r8168/files/kernel56.patch | 50 | ||||
-rw-r--r-- | net-misc/r8168/files/linux-4.15-2.patch | 85 | ||||
-rw-r--r-- | net-misc/r8168/files/linux-5.4.patch | 12 |
3 files changed, 50 insertions, 97 deletions
diff --git a/net-misc/r8168/files/kernel56.patch b/net-misc/r8168/files/kernel56.patch new file mode 100644 index 000000000000..23bb3a1856aa --- /dev/null +++ b/net-misc/r8168/files/kernel56.patch @@ -0,0 +1,50 @@ +--- r8168-8.048.00/src/r8168_n.c 2019-11-26 08:32:35.000000000 +0000
++++ r8168-8.048.00/src/r8168_n.c 2020-03-16 12:34:04.893511463 +0000
+@@ -456,7 +456,13 @@ static void rtl8168_hw_config(struct net
+ 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);
++#else
++static void rtl8168_tx_timeout(struct net_device *dev, unsigned int txqueue);
++#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);
+@@ -1616,12 +1622,21 @@ static int rtl8168_proc_open(struct inod
+ return single_open(file, show, dev);
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
+ static const struct file_operations rtl8168_proc_fops = {
+ .open = rtl8168_proc_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = single_release,
+ };
++#else
++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,
++};
++#endif
+ #endif
+
+ /*
+@@ -27844,7 +27859,11 @@ static void rtl8168_reset_task(struct wo
+ }
+
+ static void
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
+ rtl8168_tx_timeout(struct net_device *dev)
++#else
++rtl8168_tx_timeout(struct net_device *dev, unsigned int txqueue)
++#endif
+ {
+ struct rtl8168_private *tp = netdev_priv(dev);
+ unsigned long flags;
\ No newline at end of file diff --git a/net-misc/r8168/files/linux-4.15-2.patch b/net-misc/r8168/files/linux-4.15-2.patch deleted file mode 100644 index 5f5f17c551ce..000000000000 --- a/net-misc/r8168/files/linux-4.15-2.patch +++ /dev/null @@ -1,85 +0,0 @@ -Author: Alois Nespor <info@aloisnespor.info> -Description: fix module build for Linux 4.15 -Origin: vendor, https://aur.archlinux.org/cgit/aur.git/tree/linux-4.15-2.patch?h=r8168-dkms - ---- a/src/r8168_n.c -+++ b/src/r8168_n.c -@@ -407,8 +407,14 @@ MODULE_VERSION(RTL8168_VERSION); - static void rtl8168_sleep_rx_enable(struct net_device *dev); - static void rtl8168_dsm(struct net_device *dev, int dev_state); - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0) -+static void rtl8168_esd_timer(struct timer_list *timer); -+static void rtl8168_link_timer(struct timer_list *timer); -+#else - static void rtl8168_esd_timer(unsigned long __opaque); - static void rtl8168_link_timer(unsigned long __opaque); -+#endif//LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0) -+ - static void rtl8168_tx_clear(struct rtl8168_private *tp); - static void rtl8168_rx_clear(struct rtl8168_private *tp); - -@@ -22964,7 +22970,11 @@ static inline void rtl8168_request_esd_t - struct rtl8168_private *tp = netdev_priv(dev); - struct timer_list *timer = &tp->esd_timer; - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0) -+ timer_setup(timer, rtl8168_esd_timer, 0); -+#else - setup_timer(timer, rtl8168_esd_timer, (unsigned long)dev); -+#endif//LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0) - mod_timer(timer, jiffies + RTL8168_ESD_TIMEOUT); - } - -@@ -22978,7 +22988,11 @@ static inline void rtl8168_request_link_ - struct rtl8168_private *tp = netdev_priv(dev); - struct timer_list *timer = &tp->link_timer; - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0) -+ timer_setup(timer, rtl8168_link_timer, 0); -+#else - setup_timer(timer, rtl8168_link_timer, (unsigned long)dev); -+#endif//LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0) - mod_timer(timer, jiffies + RTL8168_LINK_TIMEOUT); - } - -@@ -24717,12 +24731,19 @@ err_out: - #define PCI_DEVICE_SERIAL_NUMBER (0x0164) - - static void -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0) -+rtl8168_esd_timer(struct timer_list *timer) -+{ -+ struct rtl8168_private *tp = from_timer(tp, timer, esd_timer); -+ struct net_device *dev = tp->dev; -+#else - rtl8168_esd_timer(unsigned long __opaque) - { - struct net_device *dev = (struct net_device *)__opaque; - struct rtl8168_private *tp = netdev_priv(dev); -- struct pci_dev *pdev = tp->pci_dev; - struct timer_list *timer = &tp->esd_timer; -+#endif//LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0) -+ struct pci_dev *pdev = tp->pci_dev; - unsigned long timeout = RTL8168_ESD_TIMEOUT; - unsigned long flags; - u8 cmd; -@@ -24856,11 +24877,18 @@ rtl8168_esd_timer(unsigned long __opaque - } - - static void -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0) -+rtl8168_link_timer(struct timer_list *timer) -+{ -+ struct rtl8168_private *tp = from_timer(tp, timer, link_timer); -+ struct net_device *dev = tp->dev; -+#else - rtl8168_link_timer(unsigned long __opaque) - { - struct net_device *dev = (struct net_device *)__opaque; - struct rtl8168_private *tp = netdev_priv(dev); - struct timer_list *timer = &tp->link_timer; -+#endif//LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0) - unsigned long flags; - - spin_lock_irqsave(&tp->lock, flags); diff --git a/net-misc/r8168/files/linux-5.4.patch b/net-misc/r8168/files/linux-5.4.patch deleted file mode 100644 index 197983597be7..000000000000 --- a/net-misc/r8168/files/linux-5.4.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur r8168-8.047.05.orig/src/r8168_n.c r8168-8.047.05/src/r8168_n.c ---- r8168-8.047.05.orig/src/r8168_n.c 2019-07-23 10:22:09.000000000 +0800 -+++ r8168-8.047.05/src/r8168_n.c 2019-12-23 00:55:34.121947346 +0800 -@@ -56,7 +56,7 @@ - #include <linux/rtnetlink.h> - #include <linux/completion.h> - --#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) && LINUX_VERSION_CODE < KERNEL_VERSION(5,4,0) - #include <linux/pci-aspm.h> - #endif - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,37) |