Fix compilation on Linux kernel 6.16+#1
Open
philiplinden wants to merge 2 commits intoTime-Appliances-Project:masterfrom
Open
Fix compilation on Linux kernel 6.16+#1philiplinden wants to merge 2 commits intoTime-Appliances-Project:masterfrom
philiplinden wants to merge 2 commits intoTime-Appliances-Project:masterfrom
Conversation
Add ccflags-y declarations alongside EXTRA_CFLAGS for modern kernel build system compatibility. Resolves incompatible pointer type error in ethtool get_ts_info callback.
Author
|
@ahmadexp anything else to do here before it can be merged? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add ccflags-y declarations alongside EXTRA_CFLAGS for modern kernel build system compatibility. Resolves incompatible pointer type error in ethtool get_ts_info callback.
AX88279 Driver Compilation Fix for Linux Kernel 6.16+
Problem Summary
The ASIX AX88279 USB Ethernet driver (v3.5.16) with PTP support fails to compile on Arch Linux 6.16.8-arch3-1. Two compatibility issues were identified:
EXTRA_CFLAGSwhich is deprecated in newer kernel build systemsget_ts_infocallback signature changed in recent kernelsError Messages
Required Changes
1. Makefile (Add ccflags-y alongside EXTRA_CFLAGS)
Update the Makefile to use both
EXTRA_CFLAGS(for older kernels) andccflags-y(for newer kernels). Addccflags-ydeclarations for all conditional compilation flags:Line 19-20: Add ccflags-y initialization
For each ENABLE_* flag, add ccflags-y alongside EXTRA_CFLAGS
Example pattern:
Apply this pattern to all flags:
ENABLE_IOCTL_DEBUGENABLE_AUTODETACH_FUNCENABLE_MAC_PASSENABLE_INT_AGGRESSIVEENABLE_INT_POLLINGENABLE_AUTOSUSPENDENABLE_TX_TASKLETENABLE_RX_TASKLETENABLE_PTP_FUNCENABLE_PTP_DEBUGENABLE_QUEUE_PRIORITYENABLE_AX882792. ax88179a_772d.c (Fix ethtool API signature)
Change the function signature at line 468-469:
BEFORE:
AFTER:
Verification
After changes, compilation should succeed:
make clean && makeExpected output should show successful compilation of
ax_usb_nic.kowithout errors.Impact