bcmwl fails to build on the latest kinetic kernel 5.19

Bug #1981968 reported by Andrea Righi
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bcmwl (Ubuntu)
Fix Released
Medium
Andrea Righi
Jammy
Fix Released
Undecided
Unassigned
Kinetic
Fix Released
Medium
Andrea Righi

Bug Description

[Impact]

bcmwl fails to build on kernel 5.19 with the following errors:

/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/shared/linux_osl.c:603:14: error: implicit declaration of function ‘pci_alloc_consistent’; did you mean ‘osl_dma_alloc_consistent’? [-Werror=implicit-function-declaration]
  603 | va = pci_alloc_consistent(osh->pdev, size, (dma_addr_t*)pap);
      | ^~~~~~~~~~~~~~~~~~~~
      | osl_dma_alloc_consistent

/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.c:3307:26: error: implicit declaration of function ‘PDE_DATA’; did you mean ‘NODE_DATA’? [-Werror=implicit-function-declaration]
 3307 | wl_info_t * wl = PDE_DATA(file_inode(filp));
      | ^~~~~~~~
      | NODE_DATA

/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/shared/linux_osl.c: In function ‘osl_dma_map’:
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/shared/linux_osl.c:626:38: error: ‘PCI_DMA_TODEVICE’ undeclared (first use in this function); did you mean ‘DMA_TO_DEVICE’?
  626 | dir = (direction == DMA_TX)? PCI_DMA_TODEVICE: PCI_DMA_FROMDEVICE;
      | ^~~~~~~~~~~~~~~~
      | DMA_TO_DEVICE
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/shared/linux_osl.c:626:38: note: each undeclared identifier is reported only once for each function it appears in
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/shared/linux_osl.c:626:56: error: ‘PCI_DMA_FROMDEVICE’ undeclared (first use in this function); did you mean ‘DMA_FROM_DEVICE’?
  626 | dir = (direction == DMA_TX)? PCI_DMA_TODEVICE: PCI_DMA_FROMDEVICE;
      | ^~~~~~~~~~~~~~~~~~
      | DMA_FROM_DEVICE
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/shared/linux_osl.c:659:17: error: implicit declaration of function ‘pci_map_single’; did you mean ‘dma_map_single’? [-Werror=implicit-function-declaration]
  659 | return (pci_map_single(osh->pdev, va, size, dir));
      | ^~~~~~~~~~~~~~
      | dma_map_single
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/shared/linux_osl.c: In function ‘osl_dma_unmap’:
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/shared/linux_osl.c:668:38: error: ‘PCI_DMA_TODEVICE’ undeclared (first use in this function); did you mean ‘DMA_TO_DEVICE’?
  668 | dir = (direction == DMA_TX)? PCI_DMA_TODEVICE: PCI_DMA_FROMDEVICE;
      | ^~~~~~~~~~~~~~~~
      | DMA_TO_DEVICE
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/shared/linux_osl.c:668:56: error: ‘PCI_DMA_FROMDEVICE’ undeclared (first use in this function); did you mean ‘DMA_FROM_DEVICE’?
  668 | dir = (direction == DMA_TX)? PCI_DMA_TODEVICE: PCI_DMA_FROMDEVICE;
      | ^~~~~~~~~~~~~~~~~~
      | DMA_FROM_DEVICE
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/shared/linux_osl.c:669:9: error: implicit declaration of function ‘pci_unmap_single’; did you mean ‘dma_unmap_single’? [-Werror=implicit-function-declaration]
  669 | pci_unmap_single(osh->pdev, (uint32)pa, size, dir);
      | ^~~~~~~~~~~~~~~~
      | dma_unmap_single

[Test case]

$ sudo apt install bcmwl-kernel-source

[Fix]

Patch bcmwl to support the new 5.18+ kernel ABI (PCI/DMA-related functions).

[Regression potential]

We may experience regressions with bcmwl in kernels >= 5.18.

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

Fix to properly support kernels >= 5.18 in attach.

tags: added: patch
Changed in bcmwl (Ubuntu Kinetic):
assignee: nobody → Andrea Righi (arighi)
status: New → In Progress
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bcmwl - 6.30.223.271+bdcom-0ubuntu9

---------------
bcmwl (6.30.223.271+bdcom-0ubuntu9) kinetic; urgency=medium

  * debian/dkms.conf.in,
    debian/patches/0040-add-support-for-linux-5.18.patch (LP: #1981968):
    - Add support for Linux 5.18.

 -- Andrea Righi <email address hidden> Mon, 18 Jul 2022 08:40:44 +0000

Changed in bcmwl (Ubuntu Kinetic):
status: In Progress → Fix Released
Revision history for this message
satmandu (satadru-umich) wrote :
Download full text (6.2 KiB)

This patch is incomplete.

The patches necessary are a combination of these:

https://gist.github.com/joanbm/37fd0590f30b41e7e89ade6e242ca16e
https://gist.github.com/joanbm/052d8e951ba63d5eb5b6960bfe4e031a

(with those patches applied, I don't get any errors in my dmesg and the wireless card works in 5.19-rc8.)

With 6.30.223.271+bdcom-0ubuntu9 I'm getting this error:

[ 11.155980] netdevice: wlp3s0: Incorrect netdev->dev_addr
[ 11.155994] WARNING: CPU: 5 PID: 1767 at net/core/dev_addr_lists.c:519 dev_addr_check.cold+0x65/0x9f
[ 11.156000] Modules linked in: qrtr cmac algif_hash algif_skcipher af_alg bnep nls_iso8859_1 intel_rapl_msr intel_rapl_common x86_pkg_temp_thermal snd_hda_codec_cirrus intel_powerclamp snd_hda_codec_generic ledtrig_audio snd_hda_codec_hdmi snd_hda_intel snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec kvm_intel snd_hda_core btusb snd_hwdep btrtl btbcm sch_fq_codel kvm snd_pcm sbs btintel rapl sbshc mei_pxp btmtk joydev mei_hdcp applesmc snd_seq_midi wl(POE) intel_cstate snd_seq_midi_event bluetooth snd_rawmidi input_leds snd_seq cmdlinepart ecdh_generic snd_seq_device ecc spi_nor bcm5974 apple_mfi_fastcharge snd_timer snd cfg80211 mei_me soundcore mei acpi_als industrialio_triggered_buffer kfifo_buf industrialio apple_gmux mac_hid apple_bl facetimehd(OE) videobuf2_dma_sg videobuf2_memops videobuf2_v4l2 videobuf2_common videodev mc coretemp ipmi_devintf ipmi_msghandler msr parport_pc ppdev lp parport ramoops reed_solomon pstore_blk pstore_zone mtd efi_pstore ip_tables x_tables autofs4
[ 11.156079] zfs(POE) zunicode(POE) zzstd(OE) zlua(OE) zavl(POE) icp(POE) zcommon(POE) znvpair(POE) spl(OE) z3fold lz4 lz4_compress hid_apple hid_generic uas usbhid hid usb_storage i915 nouveau mxm_wmi wmi drm_buddy i2c_algo_bit drm_ttm_helper ttm drm_display_helper cec rc_core drm_kms_helper syscopyarea sysfillrect crct10dif_pclmul spi_intel_platform crc32_pclmul ghash_clmulni_intel spi_intel aesni_intel sysimgblt i2c_i801 fb_sys_fops crypto_simd nvme cryptd i2c_smbus drm nvme_core thunderbolt lpc_ich xhci_pci xhci_pci_renesas video
[ 11.156144] Unloaded tainted modules: mtdpstore():1 chromeos_pstore():1 chromeos_pstore():1 mtdpstore():1 chromeos_pstore():1 mtdpstore():1 fjes():1 asus_ec_sensors():1 chromeos_pstore():1 mtdpstore():1 asus_ec_sensors():1 fjes():1 mtdpstore():1 chromeos_pstore():1 fjes():1 fjes():1
[ 11.156165] CPU: 5 PID: 1767 Comm: NetworkManager Tainted: P OE 5.19.0-rc8 #1
[ 11.156168] Hardware name: Apple Inc. MacBookPro11,3/Mac-2BD1B31983FE1663, BIOS 432.60.3.0.0 10/27/2021
[ 11.156170] RIP: 0010:dev_addr_check.cold+0x65/0x9f
[ 11.156174] Code: 01 e8 2d 00 f6 ff 0f 0b 49 c7 c4 4c 9b 65 ac 80 3b 00 75 30 48 c7 c6 57 9b 65 ac 4c 89 e2 48 c7 c7 38 ff 6e ac e8 09 00 f6 ff <0f> 0b e9 13 af d5 ff 4c 8b 24 c5 80 96 35 ac eb d4 49 c7 c4 4c 9b
[ 11.156176] RSP: 0018:ffffb9e987a676e8 EFLAGS: 00010282
[ 11.156179] RAX: 0000000000000000 RBX: ffff917280fa5000 RCX: 0000000000000027
[ 11.156181] RDX: ffff9175ef360568 RSI: 0000000000000001 RDI: ffff9175ef360560
[ 11.156183] RBP: ffffb9e987a676f8 R08: 0000000000000003 R09: fffffffffffd4b30
[ 11.156184] R10: ffffffffffffffff R11: 00000000000000...

Read more...

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

I included the extra fixes in the attached debdiff to properly support 5.19 in jammy, I'll create a separate bug tracker to fix the issue reported by satadru-umich in kinetic... thanks and sorry I'm noticing it only now!

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

Opened LP: #2002634 for the other issue (kernel warning) in kinetic.

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

new debdiff for jammy (v2) with the proper changelog entry.

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Andrea, or anyone else affected,

Accepted bcmwl into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/bcmwl/6.30.223.271+bdcom-0ubuntu10~22.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-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. 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 bcmwl (Ubuntu Jammy):
status: New → Fix Committed
tags: added: verification-needed verification-needed-jammy
Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

Confirmed that bcmwl-kernel-source (6.30.223.271+bdcom-0ubuntu10~22.04.1) can be installed and built on a jammy system running the hwe-5.19 kernel:

=======================================
Setting up bcmwl-kernel-source (6.30.223.271+bdcom-0ubuntu10~22.04.1) ...
Loading new bcmwl-6.30.223.271+bdcom DKMS files...
Building for 5.19.0-32-generic
Building for architecture x86_64
Building initial module for 5.19.0-32-generic
Done.

wl.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.19.0-32-generic/updates/dkms/

depmod...
=======================================

The module can be loaded but not fully tested due to lack of hardware.

ADT tests were also successful with the GA 5.15 kernel:

- amd64: https://autopkgtest.ubuntu.com/results/autopkgtest-jammy/jammy/amd64/b/bcmwl/20230119_194034_a1080@/log.gz

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

This bug was fixed in the package bcmwl - 6.30.223.271+bdcom-0ubuntu10~22.04.1

---------------
bcmwl (6.30.223.271+bdcom-0ubuntu10~22.04.1) jammy; urgency=medium

  * Backport dkms support for HWE kernels.

bcmwl (6.30.223.271+bdcom-0ubuntu10) lunar; urgency=medium

  * debian/dkms.conf.in,
    debian/patches/0041-dev-addr-access.patch (LP: #1998039):
    - Fix netdev->dev_addr access with kernels >= 5.17.
  * debian/dkms.conf.in,
    debian/patches/0042-add-support-for-linux-6.x.patch (LP: #1999009):
    - Support linux >= 6.1

bcmwl (6.30.223.271+bdcom-0ubuntu9) kinetic; urgency=medium

  * debian/dkms.conf.in,
    debian/patches/0040-add-support-for-linux-5.18.patch (LP: #1981968):
    - Add support for Linux 5.18.

 -- Dimitri John Ledkov <email address hidden> Mon, 16 Jan 2023 11:12:48 +0000

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

The verification of the Stable Release Update for bcmwl 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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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