Files
nixpkgs/pkgs/os-specific/linux/yt6801/kernel_6_16_fix.patch
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

34 lines
1.4 KiB
Diff

--- a/src/fuxi-gmac-phy.c 2025-08-03 00:00:00.000000000 +0000
+++ b/src/fuxi-gmac-phy.c 2025-08-03 00:00:00.000000000 +0000
@@ -322,8 +322,10 @@
static void fxgmac_phy_link_poll(unsigned long data)
#endif
{
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,16,0))
+ struct fxgmac_pdata *pdata = container_of(t, struct fxgmac_pdata, expansion.phy_poll_tm);
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
struct fxgmac_pdata *pdata = from_timer(pdata, t, expansion.phy_poll_tm);
#else
struct fxgmac_pdata *pdata = (struct fxgmac_pdata*)data;
#endif
@@ -350,13 +352,17 @@
int fxgmac_phy_timer_init(struct fxgmac_pdata *pdata)
{
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,16,0))
+ timer_setup(&pdata->expansion.phy_poll_tm, fxgmac_phy_link_poll, 0);
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
init_timer_key(&pdata->expansion.phy_poll_tm, NULL, 0, "fuxi_phy_link_update_timer", NULL);
#else
init_timer_key(&pdata->expansion.phy_poll_tm, 0, "fuxi_phy_link_update_timer", NULL);
#endif
pdata->expansion.phy_poll_tm.expires = jiffies + HZ / 2;
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(6,16,0))
pdata->expansion.phy_poll_tm.function = (void *)(fxgmac_phy_link_poll);
+#endif
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0))
pdata->expansion.phy_poll_tm.data = (unsigned long)pdata;
#endif