mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
net: nvethernet: Fix build for Linux v6.11
In Linux v6.11, the structure 'kernel_ethtool_ts_info' was added as a copy of the existing 'ethtool_ts_info' for the kernel and the various kernel functions were updated to use the new structure. This broke the build for the nvethernet driver, so add a test to the conftest script to detect the presence of this new strucutue and update the nvethernet driver accordingly. Bug 4749580 Change-Id: I2c5daa0132edee8c98eec3a66e19144484325ab0 Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3176868 GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com> Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
a6d19ed508
commit
9d6283ca4f
@@ -894,7 +894,11 @@ static int ether_set_pauseparam(struct net_device *ndev,
|
|||||||
* @return zero on success
|
* @return zero on success
|
||||||
*/
|
*/
|
||||||
static int ether_get_ts_info(struct net_device *ndev,
|
static int ether_get_ts_info(struct net_device *ndev,
|
||||||
|
#if defined(NV_ETHTOOL_KERNEL_ETHTOOL_TS_INFO_STRUCT_PRESENT) /* Linux v6.11 */
|
||||||
|
struct kernel_ethtool_ts_info *info)
|
||||||
|
#else
|
||||||
struct ethtool_ts_info *info)
|
struct ethtool_ts_info *info)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
struct ether_priv_data *pdata = netdev_priv(ndev);
|
struct ether_priv_data *pdata = netdev_priv(ndev);
|
||||||
|
|
||||||
|
|||||||
@@ -119,6 +119,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_fb_helper_struct_has_info_arg
|
|||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_mode_config_struct_has_fb_base_arg
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_mode_config_struct_has_fb_base_arg
|
||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_scdc_get_set_has_struct_drm_connector_arg
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_scdc_get_set_has_struct_drm_connector_arg
|
||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += ethtool_keee_struct_present
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += ethtool_keee_struct_present
|
||||||
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += ethtool_kernel_ethtool_ts_info_struct_present
|
||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += ethtool_ops_get_set_coalesce_has_coal_and_extack_args
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += ethtool_ops_get_set_coalesce_has_coal_and_extack_args
|
||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += ethtool_ops_get_set_ringparam_has_ringparam_and_extack_args
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += ethtool_ops_get_set_ringparam_has_ringparam_and_extack_args
|
||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += ethtool_ops_get_set_rxfh_has_rxfh_param_args
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += ethtool_ops_get_set_rxfh_has_rxfh_param_args
|
||||||
|
|||||||
@@ -7106,6 +7106,23 @@ compile_test() {
|
|||||||
compile_check_conftest "$CODE" "NV_ETHTOOL_KEEE_STRUCT_PRESENT" "" "types"
|
compile_check_conftest "$CODE" "NV_ETHTOOL_KEEE_STRUCT_PRESENT" "" "types"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
ethtool_kernel_ethtool_ts_info_struct_present)
|
||||||
|
#
|
||||||
|
# Determine if the 'struct kernel_ethtool_ts_info' is present.
|
||||||
|
#
|
||||||
|
# Commit 2111375b85ad ("net: Add struct kernel_ethtool_ts_info")
|
||||||
|
# replaced struct ethtool_ts_info with kernel_ethtool_ts_info in
|
||||||
|
# Linux v6.11.
|
||||||
|
#
|
||||||
|
CODE="
|
||||||
|
#include <linux/ethtool.h>
|
||||||
|
int conftest(struct kernel_ethtool_ts_info *info) {
|
||||||
|
return 0;
|
||||||
|
}"
|
||||||
|
|
||||||
|
compile_check_conftest "$CODE" "NV_ETHTOOL_KERNEL_ETHTOOL_TS_INFO_STRUCT_PRESENT" "" "types"
|
||||||
|
;;
|
||||||
|
|
||||||
ethtool_ops_get_set_coalesce_has_coal_and_extack_args)
|
ethtool_ops_get_set_coalesce_has_coal_and_extack_args)
|
||||||
#
|
#
|
||||||
# Determine if the 'get_coalesce' and 'set_coalesce' ethtool_ops
|
# Determine if the 'get_coalesce' and 'set_coalesce' ethtool_ops
|
||||||
|
|||||||
Reference in New Issue
Block a user