Skip to contentSkip to conversation

Bluetooth: btbcm: allow btbcm_read_verbose_config to fail on Apple

PATCH In review Chris Mason 2 participants 2 messages Jul 14, 2015 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Bluetooth: btbcm: allow btbcm_read_verbose_config to fail on Apple

Commit 1c8ba6d013 moved around the setup code for broadcomm chips, and also added btbcm_read_verbose_config() to read extra information about the hardware. It's returning errors on some macbooks:

Bluetooth: hci0: BCM: Read verbose config info failed (-16)

Which makes us error out of the setup function. Since this probe isn't critical to operate the chip, this patch just changes things to carry on when it fails.

---
v2 Add stable cc

 drivers/bluetooth/btbcm.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
drivers/bluetooth/btbcm.c +5 -6
index 4bba866..3f146c9 100644
@@ -378,12 +378,11 @@ int btbcm_setup_apple(struct hci_dev *hdev)
 
 	/* Read Verbose Config Version Info */
 	skb = btbcm_read_verbose_config(hdev);
-	if (IS_ERR(skb))
-		return PTR_ERR(skb);
-
-	BT_INFO("%s: BCM: chip id %u build %4.4u", hdev->name, skb->data[1],
-		get_unaligned_le16(skb->data + 5));
-	kfree_skb(skb);
+	if (!IS_ERR(skb)) {
+		BT_INFO("%s: BCM: chip id %u build %4.4u", hdev->name, skb->data[1],
+			get_unaligned_le16(skb->data + 5));
+		kfree_skb(skb);
+	}
 
 	set_bit(HCI_QUIRK_STRICT_DUPLICATE_FILTER, &hdev->quirks);
 
Signature · 1 line
2.4.5
maintainer
#1 lore raw

Hi Chris,

Quoted 4 lines

Commit 1c8ba6d013 moved around the setup code for broadcomm chips, and also added btbcm_read_verbose_config() to read extra information about the hardware. It's returning errors on some macbooks:

Quoted 8 lines

Bluetooth: hci0: BCM: Read verbose config info failed (-16)

Which makes us error out of the setup function. Since this probe isn't critical to operate the chip, this patch just changes things to carry on when it fails.

patch has been applied to bluetooth-stable tree.

Regards

Marcel