Message ID | 1350983101-11956-1-git-send-email-jesse.sung@canonical.com |
---|---|
State | New |
Headers | show |
On 10/23/2012 02:05 AM, Jesse Sung wrote: > From: Wen-chien Jesse Sung <jesse.sung@canonical.com> > > BugLink: https://launchpad.net/bugs/1065400 > > Since the matched rule could be specified by > USB_VENDOR_AND_INTERFACE_INFO() instead of USB_DEVICE(), > use the ID in descriptor to make sure we can really get > the correct one. > > Signed-off-by: Wen-chien Jesse Sung <jesse.sung@canonical.com> > --- > drivers/bluetooth/btusb.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c > index 96baae6..ba88eb4 100644 > --- a/drivers/bluetooth/btusb.c > +++ b/drivers/bluetooth/btusb.c > @@ -944,7 +944,8 @@ static void btusb_load_firmware(struct hci_dev *hdev) > return; > > snprintf(filename, PATCHRAM_NAME_LEN, "fw-%04x_%04x.hcd", > - id->idVendor, id->idProduct); > + le16_to_cpu(udev->descriptor.idVendor), > + le16_to_cpu(udev->descriptor.idProduct)); > if (request_firmware(&fw, (const char *) filename, &udev->dev) < 0) { > BT_INFO("can't load firmware, may not work correctly"); > return; > Have these patches been sent upstream?
2012/10/23 Brad Figg <brad.figg@canonical.com>: > On 10/23/2012 02:05 AM, Jesse Sung wrote: >> >> From: Wen-chien Jesse Sung <jesse.sung@canonical.com> >> >> BugLink: https://launchpad.net/bugs/1065400 >> >> Since the matched rule could be specified by >> USB_VENDOR_AND_INTERFACE_INFO() instead of USB_DEVICE(), >> use the ID in descriptor to make sure we can really get >> the correct one. >> >> Signed-off-by: Wen-chien Jesse Sung <jesse.sung@canonical.com> >> --- >> drivers/bluetooth/btusb.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c >> index 96baae6..ba88eb4 100644 >> --- a/drivers/bluetooth/btusb.c >> +++ b/drivers/bluetooth/btusb.c >> @@ -944,7 +944,8 @@ static void btusb_load_firmware(struct hci_dev *hdev) >> return; >> >> snprintf(filename, PATCHRAM_NAME_LEN, "fw-%04x_%04x.hcd", >> - id->idVendor, id->idProduct); >> + le16_to_cpu(udev->descriptor.idVendor), >> + le16_to_cpu(udev->descriptor.idProduct)); >> if (request_firmware(&fw, (const char *) filename, &udev->dev) < >> 0) { >> BT_INFO("can't load firmware, may not work correctly"); >> return; >> > > Have these patches been sent upstream? These are against previous broadcom patchram patches, which are rejected by upstream [1]. So they will not be sent upstream. [1] http://marc.info/?t=134933604300005&r=1&w=2
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 96baae6..ba88eb4 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -944,7 +944,8 @@ static void btusb_load_firmware(struct hci_dev *hdev) return; snprintf(filename, PATCHRAM_NAME_LEN, "fw-%04x_%04x.hcd", - id->idVendor, id->idProduct); + le16_to_cpu(udev->descriptor.idVendor), + le16_to_cpu(udev->descriptor.idProduct)); if (request_firmware(&fw, (const char *) filename, &udev->dev) < 0) { BT_INFO("can't load firmware, may not work correctly"); return;