Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1012647: broadcom-sta-dkms: module does not compile for 5.18.0-1-amd64

834 views
Skip to first unread message

kjonca

unread,
Jun 11, 2022, 1:20:03 AM6/11/22
to
Package: broadcom-sta-dkms
Version: 6.30.223.271-19
Severity: normal

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

* What led up to the situation?
Instalaction of new kernel
* What exactly did you do (or not do) that was effective (or
ineffective)?
?
* What was the outcome of this action?

Compilation log with error

* What outcome did you expect instead?

Working module.
Below is compilation log.

DKMS make.log for broadcom-sta-6.30.223.271 for kernel 5.18.0-1-amd64 (x86_64)
Sat 11 Jun 07:00:34 CEST 2022
CFG80211 API is prefered for this kernel version
Makefile:89: Neither CFG80211 nor Wireless Extension is enabled in kernel
KBUILD_NOPEDANTIC=1 make -C /lib/modules/5.18.0-1-amd64/build M=`pwd`
make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
make[1]: Entering directory '/usr/src/linux-headers-5.18.0-1-amd64'
CFG80211 API is prefered for this kernel version
Using CFG80211 API
Kernel architecture is X86_64
CC [M] /var/lib/dkms/broadcom-sta/6.30.223.271/build/src/shared/linux_osl.o
/var/lib/dkms/broadcom-sta/6.30.223.271/build/src/shared/linux_osl.c: In function ‘osl_dma_alloc_consistent’:
/var/lib/dkms/broadcom-sta/6.30.223.271/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/broadcom-sta/6.30.223.271/build/src/shared/linux_osl.c:603:12: warning: assignment to ‘void *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
603 | va = pci_alloc_consistent(osh->pdev, size, (dma_addr_t*)pap);
| ^
/var/lib/dkms/broadcom-sta/6.30.223.271/build/src/shared/linux_osl.c: In function ‘osl_dma_free_consistent’:
/var/lib/dkms/broadcom-sta/6.30.223.271/build/src/shared/linux_osl.c:616:9: error: implicit declaration of function ‘pci_free_consistent’; did you mean ‘osl_dma_free_consistent’? [-Werror=implicit-function-declaration]
616 | pci_free_consistent(osh->pdev, size, va, (dma_addr_t)pa);
| ^~~~~~~~~~~~~~~~~~~
| osl_dma_free_consistent
/var/lib/dkms/broadcom-sta/6.30.223.271/build/src/shared/linux_osl.c: In function ‘osl_dma_map’:
/var/lib/dkms/broadcom-sta/6.30.223.271/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/broadcom-sta/6.30.223.271/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/broadcom-sta/6.30.223.271/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/broadcom-sta/6.30.223.271/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/broadcom-sta/6.30.223.271/build/src/shared/linux_osl.c: In function ‘osl_dma_unmap’:
/var/lib/dkms/broadcom-sta/6.30.223.271/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/broadcom-sta/6.30.223.271/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/broadcom-sta/6.30.223.271/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
cc1: some warnings being treated as errors
make[2]: *** [/usr/src/linux-headers-5.18.0-1-common/scripts/Makefile.build:293: /var/lib/dkms/broadcom-sta/6.30.223.271/build/src/shared/linux_osl.o] Error 1
make[1]: *** [/usr/src/linux-headers-5.18.0-1-common/Makefile:1858: /var/lib/dkms/broadcom-sta/6.30.223.271/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.18.0-1-amd64'
make: *** [Makefile:181: all] Error 2


-- System Information:
Debian Release: bookworm/sid
APT prefers oldoldstable
APT policy: (500, 'oldoldstable'), (500, 'unstable'), (500, 'oldstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.17.0-1-amd64 (SMP w/4 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=pl_PL.UTF-8, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages broadcom-sta-dkms depends on:
ii dkms 3.0.3-2

Versions of packages broadcom-sta-dkms recommends:
ii wireless-tools 30~pre9-13.1

broadcom-sta-dkms suggests no packages.

-- debconf-show failed

Drew Stephens

unread,
Jun 14, 2022, 2:50:04 AM6/14/22
to
Package: broadcom-sta-dkms
Version: 6.30.223.271-19

This is basically a duplicate of bug #1012481. It's been fixed with the
Arch Linux patch in 6.30.223.271-20, but the new version is still in sid
for another 7 days at most from June 13th, 2022. While I have not used
the sid package itself, I've applied the underlying Arch Linux patch
that fixed it in sid (see later in e-mail), and it's working fine. I
thing the newer version should be migrated to testing ASAP.

While waiting for the patched package to move into testing, I just
applied the Arch Linux patch as a work-around to get the driver to work.
For this, I did it again before upgrading to 5.18, and I had no issues
with the patch applied.


I'm also on amd64 Debian Bookworm, with dkms version 3.0.3-2,
wireless-tools version 30~pre9-13.1, and the i386 repositories enabled
for a few things. I was also on 5.17.0-1-amd64 before applying the Arch
patch and upgrading to 5.18.0-1-amd64.

The most convenient way to immediately fix it on a Debian testing system
is to just download the sid .deb directly from packages.debian.org and
install it (I see no clear dependency issues), but it's also possible to
directly apply the Arch Linux patch.

Here's the process I used for applying the Arch Linux patch:

1. Download the patch file to somewhere convenient.
Here's the link:
https://github.com/archlinux/svntogit-community/blob/packages/broadcom-wl-dkms/trunk/013-linux518.patch
Honestly, I'd recommend reading the patch just to be careful.

2. Then, I'd recommend backing up the original file before making any
changes. I did the following to make a copy called linux_osl.c.backup:
sudo cp /usr/src/broadcom-sta-6.30.223.271/src/shared/linux_osl.c
/usr/src/broadcom-sta-6.30.223.271/src/shared/linux_osl.c.backup

Note that I used sudo because I'm not doing this as root. If you are
root, you don't need to include sudo.

3. To apply, run:
sudo patch /usr/src/broadcom-sta-6.30.223.271/src/shared/linux_osl.c
/path/to/013-linux518.patch
(replacing /path/to/013-linux518.path with where you downloaded the file.)

This replaces some bits of the C code, which should make the file
compile properly when running apt --fix-broken install or the like.

The above worked fine for me.

Usually, after a little bit, the patch will be added to the driver, a
package manager update will be put out, and you shouldn't have to worry
about anything for a while.

In general, when running Debian with a Broadcom network card that
requires this package, I read the output of "apt list --upgradable" to
make sure there is no kernel update before I upgrade. If there is a
kernel update, I google if there are any problems with broadcom-sta-dkms
and the kernel version to be installed. If there are, I just check to
see if that Github repository has a patch and if so apply it before
upgrading.

Drew Stephens

unread,
Jun 25, 2022, 5:10:03 PM6/25/22
to
package: broadcom-sta-dkms
severity: minor

Dear Mr. Bloch,
At this point, 6.30.223.271-20 is in testing, which already had fixed
the bug in question. Thus, this bug report should should be closed, as
it is already fixed.
Thank you for your time. Have a great day.

S.

unread,
Jun 27, 2022, 10:10:04 PM6/27/22
to
Hi there, thanks very much for this speedy fix!
I confirm that broadcom-sta-dkms_6.30.223.271-20 from Testing also fixes the compilation issue on a Bullseye system with the 5.18 kernel from Backports. Would it be possible to send the fixed DKMS package to Bullseye-Backports as well?
Thanks again!
0 new messages