Updated Kernel Kills Ethernet Detection
Slackware 14.2 received a 4.4.111 kernel update related to the recent Meltdown and Spectre uproar. Everything seemed to be working fine for several days.
Then I connected my Thinkpad T400 laptop with Ethernet. The system failed to detect the change and remained on wireless. The laptop detected the cable when connected during booting, but any disconnect thereafter failed to toggle a state change.
Reverting to 4.4.88 resolved the problem.
My Thinkpad T400 uses the e1000e kernel module. With a little digging I found the following in the 4.4.12 change log:
commit cf9f240627b4b732c9aedfcdcf54ffcdcda911ad Date: Mon Dec 11 16:26:40 2017 +0900 e1000e: Fix e1000_check_for_copper_link_ich8lan return value. commit 4110e02eb45ea447ec6f5459c9934de0a273fb91 upstream. e1000e_check_for_copper_link() and e1000_check_for_copper_link_ich8lan() are the two functions that may be assigned to mac.ops.check_for_link when phy.media_type == e1000_media_type_copper. Commit 19110cfbb34d ("e1000e: Separate signaling for link check/link up") changed the meaning of the return value of check_for_link for copper media but only adjusted the first function. This patch adjusts the second function likewise.
Commit 19110cfbb34d was introduced in 4.4.103.
I compiled the latest (4.4.13) kernel and the problem again resolved. I could repeatedly toggle the state of the Ethernet cable and the change was reliably detected.
A temporary work-around is to open a terminal and use
nmcli c up to force using the desired Ethernet configuration. Likewise when pulling the cable to force using a wireless config.
I reported the bug on January 26. An updated 4.4.115 kernel was released for Slackware 14.2 February 7 to address Spectre issues. The 4.4.115 kernel included the fix for the e1000e bug.