linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] Bluetooth: btbcm: allow btbcm_read_verbose_config to fail on Apple
@ 2015-07-14 20:25 Chris Mason
  2015-07-14 20:56 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Mason @ 2015-07-14 20:25 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth

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.

Signed-off-by: Chris Mason <clm@fb.com>
cc: stable@vger.kernel.org # v4.1

---
 v2 Add stable cc
 drivers/bluetooth/btbcm.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c
index 4bba866..3f146c9 100644
--- a/drivers/bluetooth/btbcm.c
+++ b/drivers/bluetooth/btbcm.c
@@ -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);
 
-- 
2.4.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] Bluetooth: btbcm: allow btbcm_read_verbose_config to fail on Apple
  2015-07-14 20:25 [PATCH v2] Bluetooth: btbcm: allow btbcm_read_verbose_config to fail on Apple Chris Mason
@ 2015-07-14 20:56 ` Marcel Holtmann
  0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2015-07-14 20:56 UTC (permalink / raw)
  To: Chris Mason; +Cc: linux-bluetooth

Hi Chris,

> 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.
> 
> Signed-off-by: Chris Mason <clm@fb.com>
> cc: stable@vger.kernel.org # v4.1

patch has been applied to bluetooth-stable tree.

Regards

Marcel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-07-14 20:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-14 20:25 [PATCH v2] Bluetooth: btbcm: allow btbcm_read_verbose_config to fail on Apple Chris Mason
2015-07-14 20:56 ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).