linux-t2-5.16.1

All the Bluetooth patches are now in upstream kernel!

This means only the BCM4377 Models (MBA9,1, MBP15,4, MBP16,3) don't have
Bluetooth working on upstream kernels. Asahilinux will probably write a
driver for the new PCIE Bluetooth
This commit is contained in:
Redecorating
2022-01-17 13:27:10 +11:00
parent 35f92bdb32
commit 9864ac39dc
4 changed files with 4 additions and 181 deletions
@@ -1,67 +0,0 @@
From 64dad24333ddb290f4e2f6c489abe03247030320 Mon Sep 17 00:00:00 2001
From: Orlando Chamberlain <redecorating@protonmail.com>
Date: Tue, 28 Sep 2021 20:41:35 +1000
Subject: [PATCH] bluetooth: add disable read tx power quirk
150 seems to be BCM4364b3
123 seems to be BCM4364b2 (doesn't have this issue)
133 seems to be BCM4355c1
---
drivers/bluetooth/btbcm.c | 4 ++++
include/net/bluetooth/hci.h | 9 +++++++++
net/bluetooth/hci_core.c | 3 ++-
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c
index e4182acee488..4ecc50d93107 100644
--- a/drivers/bluetooth/btbcm.c
+++ b/drivers/bluetooth/btbcm.c
@@ -353,6 +353,10 @@ static int btbcm_read_info(struct hci_dev *hdev)
return PTR_ERR(skb);
bt_dev_info(hdev, "BCM: chip id %u", skb->data[1]);
+
+ if ((skb->data[1] == 150)||(skb->data[1] == 133))
+ set_bit(HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER, &hdev->quirks);
+
kfree_skb(skb);
/* Read Controller Features */
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index b80415011dcd..9ce46cb8564d 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -246,6 +246,15 @@ enum {
* HCI after resume.
*/
HCI_QUIRK_NO_SUSPEND_NOTIFIER,
+
+ /*
+ * When this quirk is set, LE tx power is not queried on startup
+ * and the min/max tx power values default to HCI_TX_POWER_INVALID.
+ *
+ * This quirk can be set before hci_register_dev is called or
+ * during the hdev->setup vendor callback.
+ */
+ HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER,
};
/* HCI device flags */
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 8a47a3017d61..9a23fe7c8d67 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -742,7 +742,8 @@ static int hci_init3_req(struct hci_request *req, unsigned long opt)
hci_req_add(req, HCI_OP_LE_READ_ADV_TX_POWER, 0, NULL);
}
- if (hdev->commands[38] & 0x80) {
+ if (hdev->commands[38] & 0x80 &&
+ !test_bit(HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER, &hdev->quirks)) {
/* Read LE Min/Max Tx Power*/
hci_req_add(req, HCI_OP_LE_READ_TRANSMIT_POWER,
0, NULL);
--
2.33.0
@@ -1,43 +0,0 @@
From 64dad24333ddb290f4e2f6c489abe03247030320 Mon Sep 17 00:00:00 2001
From: Orlando Chamberlain <redecorating@protonmail.com>
Date: Wed, 24 Nov 2021 09:19:44 +0000
Subject: [PATCHv2] mfd: intel-lpss-pci: fix clock speed for 38a8 UART
This device is found in the MacBookPro16,2, and as the MacBookPro16,1 is
from the same generation of MacBooks and has a UART with bxt_uart_info,
it was incorrectly assumed that the MacBookPro16,2's UART would have the
same info.
This led to the wrong clock speed being used, and the Bluetooth
controller exposed by the UART receiving and sending random data, which
was incorrectly assumed to be an issue with the Bluetooth stuff, not an
error with the UART side of things.
Changing the info to spt_uart_info changes the clock speed and makes it
send and receive data correctly.
Fixes: ddb1ada416fd ("mfd: intel-lpss: Add support for MacBookPro16,2 ICL-N UART")
Signed-off-by: Orlando Chamberlain <redecorating@protonmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
v1 -> v2: Remove blank line in tag block, add Reviewed-by.
drivers/mfd/intel-lpss-pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/intel-lpss-pci.c b/drivers/mfd/intel-lpss-pci.c
index a872b4485eac..f70464ce8e3d 100644
--- a/drivers/mfd/intel-lpss-pci.c
+++ b/drivers/mfd/intel-lpss-pci.c
@@ -254,7 +254,7 @@ static const struct pci_device_id intel_lpss_pci_ids[] = {
{ PCI_VDEVICE(INTEL, 0x34eb), (kernel_ulong_t)&bxt_i2c_info },
{ PCI_VDEVICE(INTEL, 0x34fb), (kernel_ulong_t)&spt_info },
/* ICL-N */
- { PCI_VDEVICE(INTEL, 0x38a8), (kernel_ulong_t)&bxt_uart_info },
+ { PCI_VDEVICE(INTEL, 0x38a8), (kernel_ulong_t)&spt_uart_info },
/* TGL-H */
{ PCI_VDEVICE(INTEL, 0x43a7), (kernel_ulong_t)&bxt_uart_info },
{ PCI_VDEVICE(INTEL, 0x43a8), (kernel_ulong_t)&bxt_uart_info },
--
2.34.0
@@ -1,58 +0,0 @@
From: "Andy Shevchenko" <andriy.shevchenko@linux.intel.com>
To: "Andy Shevchenko" <andriy.shevchenko@linux.intel.com>, "Lee Jones" <lee.jones@linaro.org>, <linux-kernel@vger.kernel.org>
Cc: "Orlando Chamberlain" <redecorating@protonmail.com>, "Aditya Garg" <gargaditya08@live.com>
Subject: [PATCH v2 1/1] mfd: intel-lpss: Fix too early PM enablement in the ACPI ->probe()
Date: Tue, 02 Nov 2021 06:00:08 +1100
The runtime PM callback may be called as soon as the runtime PM facility
is enabled and activated. It means that ->suspend() may be called before
we finish probing the device in the ACPI case. Hence, NULL pointer
dereference:
intel-lpss INT34BA:00: IRQ index 0 not found
BUG: kernel NULL pointer dereference, address: 0000000000000030
...
Workqueue: pm pm_runtime_work
RIP: 0010:intel_lpss_suspend+0xb/0x40 [intel_lpss]
To fix this, first try to register the device and only after that enable
runtime PM facility.
Fixes: 4b45efe85263 ("mfd: Add support for Intel Sunrisepoint LPSS devices")
Reported-by: Orlando Chamberlain <redecorating@protonmail.com>
Reported-by: Aditya Garg <gargaditya08@live.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/mfd/intel-lpss-acpi.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/mfd/intel-lpss-acpi.c b/drivers/mfd/intel-lpss-acpi.c
index 3f1d976eb67c..be81507afb5e 100644
--- a/drivers/mfd/intel-lpss-acpi.c
+++ b/drivers/mfd/intel-lpss-acpi.c
@@ -136,6 +136,7 @@ static int intel_lpss_acpi_probe(struct platform_device *pdev)
{
struct intel_lpss_platform_info *info;
const struct acpi_device_id *id;
+ int ret;
id = acpi_match_device(intel_lpss_acpi_ids, &pdev->dev);
if (!id)
@@ -149,10 +150,14 @@ static int intel_lpss_acpi_probe(struct platform_device *pdev)
info->mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
info->irq = platform_get_irq(pdev, 0);
+ ret = intel_lpss_probe(&pdev->dev, info);
+ if (ret)
+ return ret;
+
pm_runtime_set_active(&pdev->dev);
pm_runtime_enable(&pdev->dev);
- return intel_lpss_probe(&pdev->dev, info);
+ return 0;
}
static int intel_lpss_acpi_remove(struct platform_device *pdev)
--
2.33.0
+4 -13
View File
@@ -4,9 +4,9 @@
# Contributor: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> # Contributor: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
pkgbase=linux-t2 pkgbase=linux-t2
pkgver=5.16 pkgver=5.16.1
_srcname=linux-${pkgver} _srcname=linux-${pkgver}
pkgrel=4 pkgrel=1
pkgdesc='Linux kernel for T2 Macs' pkgdesc='Linux kernel for T2 Macs'
_srctag=v${pkgver%.*}-${pkgver##*.} _srctag=v${pkgver%.*}-${pkgver##*.}
url="https://git.archlinux.org/linux.git/log/?h=v$_srctag" url="https://git.archlinux.org/linux.git/log/?h=v$_srctag"
@@ -103,12 +103,6 @@ source=(
8033-brcmfmac-pcie-Load-and-provide-TxCap-blobs.patch 8033-brcmfmac-pcie-Load-and-provide-TxCap-blobs.patch
8034-brcmfmac-common-Add-support-for-external-calibration.patch 8034-brcmfmac-common-Add-support-for-external-calibration.patch
# Broadcom BT device support
9001-bluetooth-add-disable-read-tx-power-quirk.patch
9002-mfd-intel-lpss-pci-fix-clock-speed-for-38a8-UART.patch
9003-mfd-intel-lpss-Fix-too-early-PM-enablement-in-the-AC.patch
) )
validpgpkeys=( validpgpkeys=(
@@ -295,7 +289,7 @@ for _p in "${pkgname[@]}"; do
}" }"
done done
sha256sums=('027d7e8988bb69ac12ee92406c3be1fe13f990b1ca2249e226225cd1573308bb' sha256sums=('c7bf36231c6ea1e67283802a005430d14fe3f8a3498c0724ba3439afaf723545'
'SKIP' 'SKIP'
'7cbba374356a189faac71001c5344ce8f02434684b1ce1accefc0cc4bd6718e5' '7cbba374356a189faac71001c5344ce8f02434684b1ce1accefc0cc4bd6718e5'
'6b4da532421cac5600d09c0c52742aa52d848af098f7853abe60c02e9d0a3752' '6b4da532421cac5600d09c0c52742aa52d848af098f7853abe60c02e9d0a3752'
@@ -357,8 +351,5 @@ sha256sums=('027d7e8988bb69ac12ee92406c3be1fe13f990b1ca2249e226225cd1573308bb'
'8f9a6d47eaec7d9df9a822a146ab15ca7bee906866545493cac8621570237060' '8f9a6d47eaec7d9df9a822a146ab15ca7bee906866545493cac8621570237060'
'ecede30aa68ea4646d3efb0a7190466ff1784f4e93756a04bb58756536f28035' 'ecede30aa68ea4646d3efb0a7190466ff1784f4e93756a04bb58756536f28035'
'0bed877897873ae86e512d711b86fa11adc5b8e7fe35139e290e8d0a0133f6a5' '0bed877897873ae86e512d711b86fa11adc5b8e7fe35139e290e8d0a0133f6a5'
'23f4a7002632f95abb1ed75a4df0570b7a81e5cf4067a16da7101b16eb582a01' '23f4a7002632f95abb1ed75a4df0570b7a81e5cf4067a16da7101b16eb582a01')
'541043c30198baa7e026261d150748de057f0499720e6568da3cc4560090ff29'
'f2cff107e536fb7331994be0920632b60b3da42e3404a20919dcffcaeec79bdb'
'3bffb2bb84800453ba05676293de9b0b1619d0c19b6295e803f0d9c3a07be23a')
# vim:set ts=8 sts=2 sw=2 et: # vim:set ts=8 sts=2 sw=2 et: