diff -Nru r8125-9.009.01/debian/changelog r8125-9.009.01/debian/changelog --- r8125-9.009.01/debian/changelog 2022-06-10 14:01:51.000000000 +0000 +++ r8125-9.009.01/debian/changelog 2022-07-18 13:53:38.000000000 +0000 @@ -1,3 +1,10 @@ +r8125 (9.009.01-1ubuntu1) kinetic; urgency=medium + + * Support linux >= 5.18 (LP: #1981993): + - debian/patches/0001-support-linux-5.18.patch + + -- Andrea Righi Mon, 18 Jul 2022 13:53:38 +0000 + r8125 (9.009.01-1) unstable; urgency=medium * New upstream version 9.009.01 diff -Nru r8125-9.009.01/debian/control r8125-9.009.01/debian/control --- r8125-9.009.01/debian/control 2022-06-10 14:01:51.000000000 +0000 +++ r8125-9.009.01/debian/control 2022-07-18 13:53:38.000000000 +0000 @@ -1,7 +1,8 @@ Source: r8125 Section: non-free/kernel Priority: optional -Maintainer: Hideki Yamane +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Hideki Yamane Build-Depends: debhelper-compat (= 13), dh-sequence-dkms, diff -Nru r8125-9.009.01/debian/patches/0001-support-linux-5.18.patch r8125-9.009.01/debian/patches/0001-support-linux-5.18.patch --- r8125-9.009.01/debian/patches/0001-support-linux-5.18.patch 1970-01-01 00:00:00.000000000 +0000 +++ r8125-9.009.01/debian/patches/0001-support-linux-5.18.patch 2022-07-18 13:53:29.000000000 +0000 @@ -0,0 +1,33 @@ +From: Andrea Righi +Subject: support kernels >= 5.18 + +Index: r8125-9.009.01/src/r8125_n.c +=================================================================== +--- r8125-9.009.01.orig/src/r8125_n.c ++++ r8125-9.009.01/src/r8125_n.c +@@ -93,6 +93,25 @@ + #define FIRMWARE_8125A_3 "rtl_nic/rtl8125a-3.fw" + #define FIRMWARE_8125B_2 "rtl_nic/rtl8125b-2.fw" + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) ++static inline int pci_set_dma_mask(struct pci_dev *dev, u64 mask) ++{ ++ return dma_set_mask(&dev->dev, mask); ++} ++ ++static inline int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask) ++{ ++ return dma_set_coherent_mask(&dev->dev, mask); ++} ++ ++static inline void netif_set_gso_max_size(struct net_device *dev, ++ unsigned int size) ++{ ++ /* dev->gso_max_size is read locklessly from sk_setup_caps() */ ++ WRITE_ONCE(dev->gso_max_size, size); ++} ++#endif ++ + /* Maximum number of multicast addresses to filter (vs. Rx-all-multicast). + The RTL chips use a 64 element hash table based on the Ethernet CRC. */ + static const int multicast_filter_limit = 32; diff -Nru r8125-9.009.01/debian/patches/series r8125-9.009.01/debian/patches/series --- r8125-9.009.01/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ r8125-9.009.01/debian/patches/series 2022-07-18 13:53:12.000000000 +0000 @@ -0,0 +1 @@ +0001-support-linux-5.18.patch