backport-iwlwifi-dkms fails to build with kernel 5.15 jammy

Bug #1951580 reported by Andrea Righi
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
backport-iwlwifi-dkms (Ubuntu)
Fix Released
Undecided
Unassigned
Jammy
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

backport-iwlwifi-dkms fails to build on the latest jammy kernel 5.15:

CC [M] /tmp/backport-iwlwifi-dkms/drivers/net/wireless/intel/iwlwifi/mei/main.o
In file included from /tmp/backport-iwlwifi-dkms/backport-include/asm-generic/bug.h:3,
                 from ./arch/x86/include/asm/bug.h:84,
                 from ./include/linux/bug.h:5,
                 from /tmp/backport-iwlwifi-dkms/backport-include/linux/bug.h:3,
                 from /tmp/backport-iwlwifi-dkms/backport-include/linux/kernel.h:4,
                 from ./include/linux/skbuff.h:13,
                 from /tmp/backport-iwlwifi-dkms/backport-include/linux/skbuff.h:3,
                 from ./include/linux/if_ether.h:19,
                 from /tmp/backport-iwlwifi-dkms/backport-include/linux/if_ether.h:3,
                 from ./include/linux/etherdevice.h:20,
                 from /tmp/backport-iwlwifi-dkms/backport-include/linux/etherdevice.h:3,
                 from /tmp/backport-iwlwifi-dkms/drivers/net/wireless/intel/iwlwifi/mei/main.c:6:
/tmp/backport-iwlwifi-dkms/drivers/net/wireless/intel/iwlwifi/mei/main.c: In function ‘iwl_mei_free_shared_mem’:
/tmp/backport-iwlwifi-dkms/drivers/net/wireless/intel/iwlwifi/mei/main.c:243:17: error: implicit declaration of function ‘mei_cldev_dma_unmap’ [-Werror=implicit-function-declaration]
  243 | WARN_ON(mei_cldev_dma_unmap(cldev));
      | ^~~~~~~~~~~~~~~~~~~

[Test case]

sudo apt install backport-iwlwifi-dkms

[Fix]

The driver assumes that kernels > 5.13 provide mei_cldev_dma_map/unmap() when CONFIG_WLAN_VENDOR_INTEL_MEI is defined.

However these functions and the config option are not available at all in recent kernels.

So instead of relying on the specific kernel version simply rely on the availability of CONFIG_WLAN_VENDOR_INTEL_MEI to determine if the kernel has the required functions defined, or if the driver needs to provide a custom implementation of these functions.

[Regression potential]

We may see build errors in newer kernel if CONFIG_WLAN_VENDOR_INTEL_MEI is merged upstream and these functions are actually provided by recent kernels.

Tags: jammy patch
Revision history for this message
Andrea Righi (arighi) wrote :
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1951580

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: jammy
Revision history for this message
Andrea Righi (arighi) wrote :

Debdiff in attach seems to resolve the problem (tested on jammy with the latest 5.15 from -proposed).

Revision history for this message
Andrea Righi (arighi) wrote :

Actually... is this dkms really needed in jammy?

Now that the build is fixed I just noticed that I get this error if I try to install it on a 5.15 kernel:

iwlwifi.ko:
Running module version sanity check.

Module has been obsoleted due to being included
in kernel 5.14.0. We will avoid installing
for future kernels above 5.14.0.
You may override by specifying --force.

tags: added: patch
Revision history for this message
Andrea Righi (arighi) wrote :

It looks like this dkms is actually needed so ignore my previous comment.

description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package backport-iwlwifi-dkms - 9340-0ubuntu5

---------------
backport-iwlwifi-dkms (9340-0ubuntu5) jammy; urgency=medium

  [ Andrea Righi ]
  * Fix build error with Linux 5.15 (LP: #1951580)

  [ Dimitri John Ledkov ]
  * Bump obsoleted by to Linux 5.16

 -- Andrea Righi <email address hidden> Fri, 19 Nov 2021 11:59:00 +0000

Changed in backport-iwlwifi-dkms (Ubuntu Jammy):
status: New → Fix Released
Mathew Hodson (mhodson)
no longer affects: linux (Ubuntu)
no longer affects: linux (Ubuntu Jammy)
Revision history for this message
Chris Halse Rogers (raof) wrote : Proposed package upload rejected

An upload of backport-iwlwifi-dkms to focal-proposed has been rejected from the upload queue for the following reason: "Steve's question from 2022-05-07 on LP: #1962704 remains unanswered; rejecting from the queue in the hope that this either prompts someone to look at the bug, or that no-one cares about this anymore. Also: several of the bugs referenced in the changelog have subsequently been marked as Fix Released for focal, and don't seem to correspond to what the changelog describes as fixing anymore.".

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.