linuxPackages.yt6801: 1.0.29-20240812 -> 1.0.30-20250430; fix build (#430555)

authored by Sandro and committed by GitHub d9da6cda c725419c

+42 -5
+9 -5
pkgs/os-specific/linux/yt6801/default.nix
··· 12 12 in 13 13 stdenv.mkDerivation (finalAttrs: { 14 14 pname = "yt6801"; 15 - version = "1.0.29-20240812"; 15 + version = "1.0.30-20250430"; 16 16 17 17 src = 18 18 let ··· 23 23 fetchzip { 24 24 stripRoot = false; 25 25 url = "https://www.motor-comm.com/Public/Uploads/uploadfile/files/${uploadDate}/yt6801-linux-driver-${versionName}.zip"; 26 - sha256 = "sha256-oz6CeOUN6QWKXxe3WUZljhGDTFArsknjzBuQ4IchGeU="; 26 + sha256 = "sha256-6HeU3bbTaKOCy3X+nMpC9/bBc+0c4Ip5TdG+LGUGTKk="; 27 27 }; 28 28 29 29 nativeBuildInputs = kernel.moduleBuildDependencies ++ [ kmod ]; 30 30 31 - patches = lib.optionals (lib.versionAtLeast kernel.version "6.15") [ 32 - ./kernel_6.15_fix.patch 33 - ]; 31 + patches = 32 + lib.optionals (lib.versionAtLeast kernel.version "6.15") [ 33 + ./kernel_6.15_fix.patch 34 + ] 35 + ++ lib.optionals (lib.versionAtLeast kernel.version "6.16") [ 36 + ./kernel_6_16_fix.patch 37 + ]; 34 38 35 39 postPatch = '' 36 40 substituteInPlace src/Makefile \
+33
pkgs/os-specific/linux/yt6801/kernel_6_16_fix.patch
··· 1 + --- a/src/fuxi-gmac-phy.c 2025-08-03 00:00:00.000000000 +0000 2 + +++ b/src/fuxi-gmac-phy.c 2025-08-03 00:00:00.000000000 +0000 3 + @@ -322,8 +322,10 @@ 4 + static void fxgmac_phy_link_poll(unsigned long data) 5 + #endif 6 + { 7 + -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)) 8 + +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,16,0)) 9 + + struct fxgmac_pdata *pdata = container_of(t, struct fxgmac_pdata, expansion.phy_poll_tm); 10 + +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)) 11 + struct fxgmac_pdata *pdata = from_timer(pdata, t, expansion.phy_poll_tm); 12 + #else 13 + struct fxgmac_pdata *pdata = (struct fxgmac_pdata*)data; 14 + #endif 15 + @@ -350,13 +352,17 @@ 16 + 17 + int fxgmac_phy_timer_init(struct fxgmac_pdata *pdata) 18 + { 19 + -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)) 20 + +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,16,0)) 21 + + timer_setup(&pdata->expansion.phy_poll_tm, fxgmac_phy_link_poll, 0); 22 + +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)) 23 + init_timer_key(&pdata->expansion.phy_poll_tm, NULL, 0, "fuxi_phy_link_update_timer", NULL); 24 + #else 25 + init_timer_key(&pdata->expansion.phy_poll_tm, 0, "fuxi_phy_link_update_timer", NULL); 26 + #endif 27 + pdata->expansion.phy_poll_tm.expires = jiffies + HZ / 2; 28 + +#if (LINUX_VERSION_CODE < KERNEL_VERSION(6,16,0)) 29 + pdata->expansion.phy_poll_tm.function = (void *)(fxgmac_phy_link_poll); 30 + +#endif 31 + #if (LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0)) 32 + pdata->expansion.phy_poll_tm.data = (unsigned long)pdata; 33 + #endif