From: Marcel Holtmann <marcel@holtmann.org>
To: Takashi Iwai <tiwai@suse.de>
Cc: Johan Hedberg <johan.hedberg@gmail.com>,
Hans de Goede <hdegoede@redhat.com>,
BlueZ development <linux-bluetooth@vger.kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Bluetooth: Apply QCA Rome patches for some ATH3012 models
Date: Tue, 22 May 2018 09:03:10 +0200 [thread overview]
Message-ID: <A4990AB0-0D75-4943-AB32-86CF96FC577D@holtmann.org> (raw)
In-Reply-To: <20180521203452.9705-1-tiwai@suse.de>
Hi Takashi,
> In commit f44cb4b19ed4 ("Bluetooth: btusb: Fix quirk for Atheros
> 1525/QCA6174") we tried to address the non-working Atheros BT devices
> by changing the quirk from BTUSB_ATH3012 to BTUSB_QCA_ROME. This made
> such devices working while it turned out to break other existing chips
> with the very same USB ID, hence it was reverted afterwards.
>
> This is another attempt to tackle the issue. The essential point to
> use BTUSB_QCA_ROME is to apply the btusb_setup_qca() and do RAM-
> patching. And the previous attempt failed because btusb_setup_qca()
> returns -ENODEV if the ROM version doesn't match with the expected
> ones. For some devices that have already the "correct" ROM versions,
> we may just skip the setup procedure and continue the rest.
>
> So, the first fix we'll need is to add a check of the ROM version in
> the function to skip the setup if the ROM version looks already sane,
> so that it can be applied for all ath devices.
>
> However, the world is a bit more complex than that simple solution.
> Since BTUSB_ATH3012 quirk checks the bcdDevice and bails out when it's
> 0x0001 at the beginning of probing, so the device probe always aborts
> here.
>
> In this patch, we add another check of ROM version again, and if the
> device needs patching, the probe continues. For that, a slight
> refactoring of btusb_qca_send_vendor_req() was required so that the
> probe function can pass usb_device pointer directly before allocating
> hci_dev stuff.
>
> Fixes: commit f44cb4b19ed4 ("Bluetooth: btusb: Fix quirk for Atheros 1525/QCA6174")
> Bugzilla: http://bugzilla.opensuse.org/show_bug.cgi?id=1082504
> Tested-by: Ivan Levshin <ivan.levshin@microfocus.com>
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
>
> ---
> drivers/bluetooth/btusb.c | 32 +++++++++++++++++++++++++-------
> 1 file changed, 25 insertions(+), 7 deletions(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel
prev parent reply other threads:[~2018-05-22 7:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-21 20:34 Takashi Iwai
2018-05-22 7:03 ` Marcel Holtmann [this message]
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=A4990AB0-0D75-4943-AB32-86CF96FC577D@holtmann.org \
--to=marcel@holtmann.org \
--cc=hdegoede@redhat.com \
--cc=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tiwai@suse.de \
/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
all inboxes | Powered by JetHome®