r8168-dkms 8.048.00-1: r8168 kernel module failed to build

Bug #1892089 reported by Brandon Mitchell
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
r8168 (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
Fix Released
Medium
Stefan Bader

Bug Description

[SRU Justification]

Impact: In kernel 5.6 there was a rename of a structure and change of arguments to a kernel interface function. The driver version in 20.04/Focal will fail to compile for the 5.8 HWE kernel once this is available.

Fix: Additional compatibility code which adjusted for the modified interfaces on kernel versions 5.6 and later was picked from a later version of the driver.

Testcase: dkms install -m r8168 -v 8.048.00 -k <kvers>

Regression Potential: As the code is unchanged for the release version of the kernel there is no potential for regression there. However for newer kernels there might be unknown issues but right now the driver does not compile in those cases. So being able to find those issues already is an improvement.

--- Original description ---

DKMS make.log for r8168-8.048.00 for kernel 5.6.0-1021-oem (x86_64)
Tue 18 Aug 2020 12:49:54 PM PDT
make: Entering directory '/usr/src/linux-headers-5.6.0-1021-oem'
  AR /var/lib/dkms/r8168/8.048.00/build/built-in.a
  CC [M] /var/lib/dkms/r8168/8.048.00/build/r8168_n.o
  CC [M] /var/lib/dkms/r8168/8.048.00/build/r8168_asf.o
  CC [M] /var/lib/dkms/r8168/8.048.00/build/rtl_eeprom.o
  CC [M] /var/lib/dkms/r8168/8.048.00/build/rtltool.o
/var/lib/dkms/r8168/8.048.00/build/r8168_n.c: In function ‘rtl8168_proc_init’:
/var/lib/dkms/r8168/8.048.00/build/r8168_n.c:1670:47: error: passing argument 4 of ‘proc_create_data’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 1670 | &rtl8168_proc_fops, f->show)) {
      | ^~~~~~~~~~~~~~~~~~
      | |
      | const struct file_operations *
In file included from /var/lib/dkms/r8168/8.048.00/build/r8168_n.c:92:
./include/linux/proc_fs.h:59:31: note: expected ‘const struct proc_ops *’ but argument is of type ‘const struct file_operations *’
   59 | extern struct proc_dir_entry *proc_create_data(const char *, umode_t,
      | ^~~~~~~~~~~~~~~~
/var/lib/dkms/r8168/8.048.00/build/r8168_n.c: At top level:
/var/lib/dkms/r8168/8.048.00/build/r8168_n.c:25825:31: error: initialization of ‘void (*)(struct net_device *, unsigned int)’ from incompatible pointer type ‘void (*)(struct net_device *)’ [-Werror=incompatible-pointer-types]
25825 | .ndo_tx_timeout = rtl8168_tx_timeout,
      | ^~~~~~~~~~~~~~~~~~
/var/lib/dkms/r8168/8.048.00/build/r8168_n.c:25825:31: note: (near initialization for ‘rtl8168_netdev_ops.ndo_tx_timeout’)
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:275: /var/lib/dkms/r8168/8.048.00/build/r8168_n.o] Error 1
make: *** [Makefile:1707: /var/lib/dkms/r8168/8.048.00/build] Error 2
make: Leaving directory '/usr/src/linux-headers-5.6.0-1021-oem'

ProblemType: Package
DistroRelease: Ubuntu 20.04
Package: r8168-dkms 8.048.00-1
ProcVersionSignature: Ubuntu 5.6.0-1020.20-oem 5.6.19
Uname: Linux 5.6.0-1020-oem x86_64
ApportVersion: 2.20.11-0ubuntu27.6
Architecture: amd64
CasperMD5CheckResult: skip
DKMSKernelVersion: 5.6.0-1020-oem
Date: Wed Aug 12 12:37:38 2020
DuplicateSignature: dkms:r8168-dkms:8.048.00-1:/var/lib/dkms/r8168/8.048.00/build/r8168_n.c:1670:47: error: passing argument 4 of ‘proc_create_data’ from incompatible pointer type [-Werror=incompatible-pointer-types]
InstallationDate: Installed on 2020-08-11 (6 days ago)
InstallationMedia: Ubuntu 20.04.1 LTS "Focal Fossa" - Release amd64 (20200731)
PackageArchitecture: all
PackageVersion: 8.048.00-1
Python3Details: /usr/bin/python3.8, Python 3.8.2, python3-minimal, 3.8.2-0ubuntu2
PythonDetails: N/A
RelatedPackageVersions:
 dpkg 1.19.7ubuntu3
 apt 2.0.2ubuntu0.1
SourcePackage: r8168
Title: r8168-dkms 8.048.00-1: r8168 kernel module failed to build
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Brandon Mitchell (bitbckt) wrote :
tags: removed: need-duplicate-check
Stefan Bader (smb)
Changed in r8168 (Ubuntu):
status: New → Fix Released
Changed in r8168 (Ubuntu Focal):
assignee: nobody → Stefan Bader (smb)
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Stefan Bader (smb) wrote :

Proposed cherry pick into focal/r8168. Build test in VM:

# dkms status
r8168, 8.048.00, 5.4.0-52-generic, x86_64: installed
r8168, 8.048.00, 5.8.0-25-generic, x86_64: installed

description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Brandon, or anyone else affected,

Accepted r8168 into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/r8168/8.048.00-1ubuntu0.20.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in r8168 (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

I can confirm that r8168 8.048.00-1ubuntu0.20.04.1 fixes the build issues with linux 5.8 on Focal while still working with linux 5.4.

$ dkms status
r8168, 8.048.00, 5.4.0-55-generic, x86_64: installed
r8168, 8.048.00, 5.8.0-30-generic, x86_64: installed

The module can also be successfully loaded on those kernels.

ADT also completed successfully for both linux-generic 5.4 and linux-hwe 5.8:

* linux 5.4:
- amd64: https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-focal/focal/amd64/r/r8168/20201118_151656_170eb@/log.gz
- arm64: https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-focal/focal/arm64/r/r8168/20201118_152826_47e2f@/log.gz
- armhf: https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-focal/focal/armhf/r/r8168/20201118_153928_5daa9@/log.gz
- ppc64el: https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-focal/focal/ppc64el/r/r8168/20201118_151856_47e2f@/log.gz
- s390x: https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-focal/focal/s390x/r/r8168/20201118_151246_59c8b@/log.gz

* linux-hwe 5.8:
- amd64: https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-focal/focal/amd64/r/r8168/20201118_151337_71da4@/log.gz
- arm64: https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-focal/focal/arm64/r/r8168/20201118_152753_35d8d@/log.gz
- armhf: https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-focal/focal/armhf/r/r8168/20201118_152838_bc352@/log.gz
- ppc64el: https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-focal/focal/ppc64el/r/r8168/20201118_151607_71da4@/log.gz
- s390x: https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-focal/focal/s390x/r/r8168/20201118_151231_bc352@/log.gz

tags: added: verification-done-focal
removed: verification-needed-focal
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package r8168 - 8.048.00-1ubuntu0.20.04.1

---------------
r8168 (8.048.00-1ubuntu0.20.04.1) focal; urgency=medium

  * Fix build for kernel version 5.6+ (LP: #1892089)
    - debian/patches/linux-5.6.patch (cherry picked from 8.048.02-1)

 -- Stefan Bader <email address hidden> Tue, 27 Oct 2020 14:57:56 +0100

Changed in r8168 (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for r8168 has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.