From: Marcel Holtmann <marcel@holtmann.org>
To: Jesse Sung <jesse.sung@canonical.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 1/2] Implement broadcom patchram firmware loader
Date: Fri, 07 Sep 2012 13:32:13 -0700 [thread overview]
Message-ID: <1347049933.21200.141.camel@aeonflux> (raw)
In-Reply-To: <CAH10aOj2VP2W1MPxLztWR4-enOmaLF=oyC2zg898-f9vyf0sJQ@mail.gmail.com>
Hi Jesse,
> >> static int btusb_probe(struct usb_interface *intf,
> >> const struct usb_device_id *id)
> >> {
> >> @@ -1078,15 +1162,26 @@ static int btusb_probe(struct usb_interface *intf,
> >> }
> >> }
> >>
> >> + usb_set_intfdata(intf, data);
> >> +
> >> + if (id->driver_info & BTUSB_BCM_PATCHRAM) {
> >> + const struct usb_device_id *match;
> >> + match = usb_match_id(intf, patchram_table);
> >> + if (match) {
> >> + btusb_open(hdev);
> >> + load_patchram_fw(interface_to_usbdev(intf), match);
> >> + btusb_close(hdev);
> >> + }
> >> + }
> >> +
> >
> > So we are now blocking every other USB devices on that bus here? I
> > actually do not like this idea very much.
>
> Do you mean the usleep() in load_patchram_fw()? These only affects people
> who have this kind of device, so the impact should be limited.
and what about the global USB lock that is hold when probing devices.
> > Also the call of btusb_open() before hdev is actually registered is
> > kinda fishy to me. I am not even sure that works how you think it would.
>
> Humm.. If there are concerns about calling btusb_open() and btusb_close(),
> I'll try to find another way to hook usb callbacks.
They are callbacks exposed from hci_dev and not for direct calling.
I have been telling this before multiple times. If you require a
firmware patching stage, then integrate that into hci_dev directly and
use the core for driving this properly.
> > And why can't Broadcom just change the PID once the patchram has been
> > loaded to something else. That way we can nicely iterate through this.
>
> Unfortunately that's how they do it now, and these modules are already in
> users' machines.
Some companies never ever learn. Most funny is that we had the bcm203x
driver that was doing this correctly. And 8 years later they have
forgotten all about it.
Regards
Marcel
next prev parent reply other threads:[~2012-09-07 20:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-31 5:21 [PATCH 0/2] broadcom patchram firmware loader Jesse Sung
2012-08-31 5:21 ` [PATCH 1/2] Implement " Jesse Sung
2012-08-31 16:11 ` Marcel Holtmann
2012-09-07 8:07 ` Jesse Sung
2012-09-07 20:32 ` Marcel Holtmann [this message]
2012-08-31 5:21 ` [PATCH 2/2] Cache firmware images for later use Jesse Sung
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=1347049933.21200.141.camel@aeonflux \
--to=marcel@holtmann.org \
--cc=jesse.sung@canonical.com \
--cc=linux-bluetooth@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).