Add yt-6801-dkms

This commit is contained in:
Ryan Hughes
2026-02-04 12:53:31 -05:00
parent e4f59e7771
commit 6f6c4a800a
6 changed files with 92 additions and 0 deletions
+1
View File
@@ -30,6 +30,7 @@ walker
xdg-terminal-exec
yaru-icon-theme
yay
yt6801-dkms
# Drivers
nvidia-580xx-utils
+16
View File
@@ -0,0 +1,16 @@
pkgbase = yt6801-dkms
pkgdesc = Kernel module for Motorcomm YT6801 ethernet controller (DKMS)
pkgver = 1.0.31
pkgrel = 1
url = https://www.motor-comm.com/product/ethernet-control-chip
arch = x86_64
license = GPL-2.0-or-later
depends = dkms
source = yt6801-1.0.31.zip::https://www.motor-comm.com/Cn/Skippower/downloadFile.html?id=1817
source = fix.patch
source = drop-flags.patch
sha256sums = 9ea62182bd520483df5fd3ec320262cbdddcc763f3128ae37abd26905a97e14c
sha256sums = 3e850f2d35fd3da6d10035b5ea04e995a0d7962b1c02599b42f1f7a296822e78
sha256sums = 814c6a121b392f512ec4c8898dd9f6c50ae3ff9d946bc1d115135fa6f5c6a897
pkgname = yt6801-dkms
+5
View File
@@ -0,0 +1,5 @@
*.tar.*
*.zip
pkg/
src/
@@ -0,0 +1,11 @@
--- a/src/dkms.conf
+++ b/src/dkms.conf
@@ -1,8 +1,5 @@
PACKAGE_NAME="yt6801"
PACKAGE_VERSION="1.0.30"
-CLEAN="make clean"
-MAKE[0]="make"
BUILT_MODULE_NAME[0]="yt6801"
DEST_MODULE_LOCATION[0]="/kernel/drivers/net/ethernet/motorcomm"
AUTOINSTALL="yes"
-REMAKE_INITRD="yes"
+59
View File
@@ -0,0 +1,59 @@
--- a/src/fuxi-gmac-net.c
+++ b/src/fuxi-gmac-net.c
@@ -772,7 +772,9 @@
static void fxgmac_tx_hang_timer_handler(unsigned long data)
#endif
{
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,16,0))
+ struct fxgmac_channel *channel = timer_container_of(channel, t, expansion.tx_hang_timer);
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
struct fxgmac_channel *channel = from_timer(channel, t, expansion.tx_hang_timer);
#else
struct fxgmac_channel *channel = (struct fxgmac_channel *)data;
--- a/src/fuxi-gmac-phy.c
+++ b/src/fuxi-gmac-phy.c
@@ -322,7 +322,9 @@
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 = timer_container_of(pdata, t, 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;
@@ -350,7 +352,9 @@
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_init_key(&pdata->expansion.phy_poll_tm, NULL, 0, "fuxi_phy_link_update_timer", NULL);
+#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);
@@ -368,6 +372,10 @@
void fxgmac_phy_timer_destroy(struct fxgmac_pdata *pdata)
{
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,15,0))
+ timer_shutdown_sync(&pdata->expansion.phy_poll_tm);
+#else
del_timer_sync(&pdata->expansion.phy_poll_tm);
+#endif
DPRINTK("fxgmac_phy_timer removed\n");
}
--- a/src/fuxi-gmac.h
+++ b/src//fuxi-gmac.h
@@ -50,6 +50,8 @@
#define FXGMAC_NS_IFA_LOCAL_LINK 1
#define FXGMAC_NS_IFA_GLOBAL_UNICAST 2
+#define FXGMAC_INT_MODERATION_ENABLED 1
+
#define FXGMAX_ASPM_WAR_EN
/* Descriptor related parameters */
#if FXGMAC_TX_HANG_TIMER_ENABLED