Disable YT6801 private ioctl interface
This commit is contained in:
1 parent
6774df1001
commit
c08171e544
3 files changed
+66
-68
No files matched your search
@@ -1,10 +1,9 @@
|
||||
diff --git a/src/dkms.conf b/src/dkms.conf
|
||||
index 78eaf8b..9d93675 100644
|
||||
--- a/src/dkms.conf
|
||||
+++ b/src/dkms.conf
|
||||
@@ -1,8 +1,5 @@
|
||||
PACKAGE_NAME="yt6801"
|
||||
PACKAGE_VERSION="1.0.31"
|
||||
PACKAGE_VERSION="1.0.34"
|
||||
-CLEAN="make clean"
|
||||
-MAKE[0]="make"
|
||||
BUILT_MODULE_NAME[0]="yt6801"
|
||||
@@ -12,67 +11,58 @@ index 78eaf8b..9d93675 100644
|
||||
AUTOINSTALL="yes"
|
||||
-REMAKE_INITRD="yes"
|
||||
diff --git a/src/fuxi-gmac-net.c b/src/fuxi-gmac-net.c
|
||||
index 3e643f9..fea4c97 100644
|
||||
--- a/src/fuxi-gmac-net.c
|
||||
+++ b/src/fuxi-gmac-net.c
|
||||
@@ -771,7 +771,9 @@ static void fxgmac_tx_hang_timer_handler(struct timer_list *t)
|
||||
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;
|
||||
diff --git a/src/fuxi-gmac-phy.c b/src/fuxi-gmac-phy.c
|
||||
index 36d4fb3..8bd9533 100644
|
||||
--- a/src/fuxi-gmac-phy.c
|
||||
+++ b/src/fuxi-gmac-phy.c
|
||||
@@ -324,7 +324,9 @@ static void fxgmac_phy_link_poll(struct timer_list *t)
|
||||
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;
|
||||
@@ -352,7 +354,9 @@ static void fxgmac_phy_link_poll(unsigned long data)
|
||||
|
||||
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);
|
||||
@@ -370,6 +374,10 @@ int fxgmac_phy_timer_init(struct fxgmac_pdata *pdata)
|
||||
|
||||
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");
|
||||
}
|
||||
diff --git a/src/fuxi-gmac.h b/src/fuxi-gmac.h
|
||||
index 539b507..2435f0c 100644
|
||||
--- 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
|
||||
@@ -2133,41 +2133,0 @@
|
||||
-/*
|
||||
- * cmd = [0x89F0, 0x89FF]
|
||||
- * When using it, we must pay attention to the thread synchronization
|
||||
- * of this interface. Because it's an external call that isn't
|
||||
- * initiated by the OS.
|
||||
- */
|
||||
-static int fxgmac_ioctl(struct net_device *netdev,
|
||||
- struct ifreq *ifr, int cmd)
|
||||
-{
|
||||
- struct file f;
|
||||
- int ret = FXGMAC_SUCCESS;
|
||||
- struct fxgmac_pdata *pdata = netdev_priv(netdev);
|
||||
-
|
||||
- if (!netif_running(netdev) ||
|
||||
- pdata->expansion.dev_state != FXGMAC_DEV_START)
|
||||
- return -ENODEV;
|
||||
-
|
||||
- f.private_data = pdata;
|
||||
-
|
||||
- switch (cmd) {
|
||||
- case FXGMAC_DEV_CMD:
|
||||
- ret = fxgmac_netdev_ops_ioctl(&f, FXGMAC_IOCTL_DFS_COMMAND, (unsigned long)(ifr->ifr_data));
|
||||
- break;
|
||||
- default:
|
||||
- ret = -EINVAL;
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
- return ret;
|
||||
-}
|
||||
-
|
||||
-#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(5,15,0) )
|
||||
-static int fxgmac_siocdevprivate(struct net_device *dev,
|
||||
- struct ifreq *ifr,
|
||||
- void __user *data,
|
||||
- int cmd)
|
||||
-{
|
||||
- return fxgmac_ioctl(dev, ifr, cmd);
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
@@ -2369,4 +2328,0 @@
|
||||
- .ndo_do_ioctl = fxgmac_ioctl,
|
||||
-#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(5,15,0) )
|
||||
- .ndo_siocdevprivate = fxgmac_siocdevprivate,
|
||||
-#endif
|
||||
diff --git a/src/Makefile b/src/Makefile
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -70 +70 @@
|
||||
-yt6801-objs := fuxi-gmac-common.o fuxi-gmac-desc.o fuxi-gmac-ethtool.o fuxi-gmac-hw.o fuxi-gmac-net.o fuxi-gmac-pci.o fuxi-gmac-phy.o fuxi-efuse.o fuxi-gmac-ioctl.o
|
||||
+yt6801-objs := fuxi-gmac-common.o fuxi-gmac-desc.o fuxi-gmac-ethtool.o fuxi-gmac-hw.o fuxi-gmac-net.o fuxi-gmac-pci.o fuxi-gmac-phy.o fuxi-efuse.o
|
||||
Reference in new issue
Block a user