let core reject the unsupported coalescing parameters (#5)

Set ethtool_ops->supported_coalesce_params to let the core reject unsupported coalescing parameters.

Required for Linux 5.7 support; otherwise, driver initialization will fail with 'couldn't register device' (errno 22).

See upstream kernel commit id 9000edb71ab29d184aa33f5a77fa6e52d8812bb9 for more pieces of info.
This commit is contained in:
Michael Enßlin
2020-06-16 12:04:46 +02:00
committed by GitHub
parent 3427c6acef
commit 1ae92418ba
+3
View File
@@ -17134,6 +17134,9 @@ static int rtl8152_set_ringparam(struct net_device *netdev,
} }
static const struct ethtool_ops ops = { static const struct ethtool_ops ops = {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)
.supported_coalesce_params = ETHTOOL_COALESCE_USECS,
#endif
.get_drvinfo = rtl8152_get_drvinfo, .get_drvinfo = rtl8152_get_drvinfo,
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,20,0) #if LINUX_VERSION_CODE < KERNEL_VERSION(4,20,0)
.get_settings = rtl8152_get_settings, .get_settings = rtl8152_get_settings,