From: "Stefan Strogin" <steils@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-wireless/broadcom-sta/, net-wireless/broadcom-sta/files/
Date: Mon, 1 Jun 2020 22:02:35 +0000 (UTC) [thread overview]
Message-ID: <1591048883.3742de12e9abd41eebaa87c724b49dc39f7d4ce5.steils@gentoo> (raw)
commit: 3742de12e9abd41eebaa87c724b49dc39f7d4ce5
Author: Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com>
AuthorDate: Mon Jun 1 16:09:39 2020 +0000
Commit: Stefan Strogin <steils <AT> gentoo <DOT> org>
CommitDate: Mon Jun 1 22:01:23 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3742de12
net-wireless/broadcom-sta: linux 5.6 support
Add patch that resolves compilation error described in #717320.
Closes: https://bugs.gentoo.org/717320
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/16043
Signed-off-by: Stefan Strogin <steils <AT> gentoo.org>
.../broadcom-sta-6.30.223.271-r5.ebuild | 3 +-
.../broadcom-sta-6.30.223.271-r5-linux-5.6.patch | 88 ++++++++++++++++++++++
2 files changed, 90 insertions(+), 1 deletion(-)
diff --git a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r5.ebuild b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r5.ebuild
index 91581b52a4e..b84669a9969 100644
--- a/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r5.ebuild
+++ b/net-wireless/broadcom-sta/broadcom-sta-6.30.223.271-r5.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -84,6 +84,7 @@ PATCHES=(
"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.12.patch"
"${FILESDIR}/${PN}-6.30.223.271-r4-linux-4.15.patch"
"${FILESDIR}/${PN}-6.30.223.271-r5-linux-5.1.patch"
+ "${FILESDIR}/${PN}-6.30.223.271-r5-linux-5.6.patch"
)
src_install() {
diff --git a/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r5-linux-5.6.patch b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r5-linux-5.6.patch
new file mode 100644
index 00000000000..71264346f86
--- /dev/null
+++ b/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r5-linux-5.6.patch
@@ -0,0 +1,88 @@
+From: Herman van Hazendonk <github.com@herrie.org>
+Date: Tue, 31 Mar 2020 17:09:55 +0200
+Subject: [PATCH] Add fixes for 5.6 kernel
+Origin: https://salsa.debian.org/Herrie82-guest/broadcom-sta/-/merge_requests/1
+
+Use ioremap instead of ioremap_nocache and proc_ops instead of
+file_operations on Linux kernel 5.6 and above.
+
+<rosh> Patch amended to adapt i386 arch.
+---
+ src/shared/linux_osl.c | 6 +++++-
+ src/wl/sys/wl_linux.c | 21 ++++++++++++++++++++-
+ 2 files changed, 25 insertions(+), 2 deletions(-)
+
+diff --git a/src/shared/linux_osl.c b/src/shared/linux_osl.c
+index b24a973..9bce9b1 100644
+--- a/src/shared/linux_osl.c
++++ b/src/shared/linux_osl.c
+@@ -946,7 +946,11 @@ osl_getcycles(void)
+ void *
+ osl_reg_map(uint32 pa, uint size)
+ {
+- return (ioremap_nocache((unsigned long)pa, (unsigned long)size));
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
++ return (ioremap((unsigned long)pa, (unsigned long)size));
++ #else
++ return (ioremap_nocache((unsigned long)pa, (unsigned long)size));
++ #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) */
+ }
+
+ void
+diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
+index ab7b883..10621c2 100644
+--- a/src/wl/sys/wl_linux.c
++++ b/src/wl/sys/wl_linux.c
+@@ -590,10 +590,17 @@ wl_attach(uint16 vendor, uint16 device, ulong regs,
+ }
+ wl->bcm_bustype = bustype;
+
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
++ if ((wl->regsva = ioremap(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {
++ WL_ERROR(("wl%d: ioremap() failed\n", unit));
++ goto fail;
++ }
++ #else
+ if ((wl->regsva = ioremap_nocache(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {
+ WL_ERROR(("wl%d: ioremap() failed\n", unit));
+ goto fail;
+ }
++ #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) */
+
+ wl->bar1_addr = bar1_addr;
+ wl->bar1_size = bar1_size;
+@@ -780,8 +787,13 @@ wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+ if ((val & 0x0000ff00) != 0)
+ pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
+ bar1_size = pci_resource_len(pdev, 2);
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
++ bar1_addr = (uchar *)ioremap(pci_resource_start(pdev, 2),
++ bar1_size);
++ #else
+ bar1_addr = (uchar *)ioremap_nocache(pci_resource_start(pdev, 2),
+ bar1_size);
++ #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) */
+ wl = wl_attach(pdev->vendor, pdev->device, pci_resource_start(pdev, 0), PCI_BUS, pdev,
+ pdev->irq, bar1_addr, bar1_size);
+
+@@ -3354,12 +3366,19 @@ wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t
+ }
+
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
++static const struct proc_ops wl_fops = {
++ .proc_read = wl_proc_read,
++ .proc_write = wl_proc_write,
++};
++#else
+ static const struct file_operations wl_fops = {
+ .owner = THIS_MODULE,
+ .read = wl_proc_read,
+ .write = wl_proc_write,
+ };
+-#endif
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) */
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) */
+
+ static int
+ wl_reg_proc_entry(wl_info_t *wl)
next reply other threads:[~2020-06-01 22:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-01 22:02 Stefan Strogin [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-02-24 9:26 [gentoo-commits] repo/gentoo:master commit in: net-wireless/broadcom-sta/, net-wireless/broadcom-sta/files/ Florian Schmaus
2021-04-11 8:09 Joonas Niilola
2019-08-20 11:47 Louis Sautier
2018-03-25 22:07 Gilles Dartiguelongue
2015-11-02 17:31 Matt Turner
2015-08-22 19:19 Matt Turner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1591048883.3742de12e9abd41eebaa87c724b49dc39f7d4ce5.steils@gentoo \
--to=steils@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox