Message ID | 1423719559-12497-1-git-send-email-adam.lee@canonical.com |
---|---|
State | New |
Headers | show |
On 12.02.2015 06:39, Adam Lee wrote: > BugLink: https://bugs.launchpad.net/bugs/1400215 > > ath3k devices fail to load firmwares on xHCI buses, but work well on > EHCI, this might be a compatibility issue between xHCI and ath3k chips. > As my testing result, those chips will work on xHCI buses again with > this patch. > > This workaround is from Qualcomm, they also did some workarounds in > Windows driver. > > Signed-off-by: Adam Lee <adam.lee@canonical.com> > Signed-off-by: Marcel Holtmann <marcel@holtmann.org> > (cherry picked from commit c561a5753dd631920c4459a067d22679b3d110d6) Would it not make sense to get this submitted for upstream stable? -Stefan > --- > drivers/bluetooth/ath3k.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c > index 429c672..2219378 100644 > --- a/drivers/bluetooth/ath3k.c > +++ b/drivers/bluetooth/ath3k.c > @@ -155,6 +155,8 @@ static const struct usb_device_id ath3k_blist_tbl[] = { > #define USB_REQ_DFU_DNLOAD 1 > #define BULK_SIZE 4096 > #define FW_HDR_SIZE 20 > +#define TIMEGAP_USEC_MIN 50 > +#define TIMEGAP_USEC_MAX 100 > > static int ath3k_load_firmware(struct usb_device *udev, > const struct firmware *firmware) > @@ -185,6 +187,9 @@ static int ath3k_load_firmware(struct usb_device *udev, > count -= 20; > > while (count) { > + /* workaround the compatibility issue with xHCI controller*/ > + usleep_range(TIMEGAP_USEC_MIN, TIMEGAP_USEC_MAX); > + > size = min_t(uint, count, BULK_SIZE); > pipe = usb_sndbulkpipe(udev, 0x02); > memcpy(send_buf, firmware->data + sent, size); > @@ -281,6 +286,9 @@ static int ath3k_load_fwfile(struct usb_device *udev, > count -= size; > > while (count) { > + /* workaround the compatibility issue with xHCI controller*/ > + usleep_range(TIMEGAP_USEC_MIN, TIMEGAP_USEC_MAX); > + > size = min_t(uint, count, BULK_SIZE); > pipe = usb_sndbulkpipe(udev, 0x02); > >
On Thu, Feb 12, 2015 at 10:13:14AM +0100, Stefan Bader wrote: > On 12.02.2015 06:39, Adam Lee wrote: > > BugLink: https://bugs.launchpad.net/bugs/1400215 > > > > ath3k devices fail to load firmwares on xHCI buses, but work well on > > EHCI, this might be a compatibility issue between xHCI and ath3k chips. > > As my testing result, those chips will work on xHCI buses again with > > this patch. > > > > This workaround is from Qualcomm, they also did some workarounds in > > Windows driver. > > > > Signed-off-by: Adam Lee <adam.lee@canonical.com> > > Signed-off-by: Marcel Holtmann <marcel@holtmann.org> > > (cherry picked from commit c561a5753dd631920c4459a067d22679b3d110d6) > > Would it not make sense to get this submitted for upstream stable? I also submitted to stable@vger today, no response yet.
Applied to Vivid master-next and unstable branches. Acking for Utopic and Trusty: Acked-by: Leann Ogasawara <leann.ogasawara@canonical.com> On Thu, 2015-02-12 at 13:39 +0800, Adam Lee wrote: > BugLink: https://bugs.launchpad.net/bugs/1400215 > > ath3k devices fail to load firmwares on xHCI buses, but work well on > EHCI, this might be a compatibility issue between xHCI and ath3k chips. > As my testing result, those chips will work on xHCI buses again with > this patch. > > This workaround is from Qualcomm, they also did some workarounds in > Windows driver. > > Signed-off-by: Adam Lee <adam.lee@canonical.com> > Signed-off-by: Marcel Holtmann <marcel@holtmann.org> > (cherry picked from commit c561a5753dd631920c4459a067d22679b3d110d6) > --- > drivers/bluetooth/ath3k.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c > index 429c672..2219378 100644 > --- a/drivers/bluetooth/ath3k.c > +++ b/drivers/bluetooth/ath3k.c > @@ -155,6 +155,8 @@ static const struct usb_device_id ath3k_blist_tbl[] = { > #define USB_REQ_DFU_DNLOAD 1 > #define BULK_SIZE 4096 > #define FW_HDR_SIZE 20 > +#define TIMEGAP_USEC_MIN 50 > +#define TIMEGAP_USEC_MAX 100 > > static int ath3k_load_firmware(struct usb_device *udev, > const struct firmware *firmware) > @@ -185,6 +187,9 @@ static int ath3k_load_firmware(struct usb_device *udev, > count -= 20; > > while (count) { > + /* workaround the compatibility issue with xHCI controller*/ > + usleep_range(TIMEGAP_USEC_MIN, TIMEGAP_USEC_MAX); > + > size = min_t(uint, count, BULK_SIZE); > pipe = usb_sndbulkpipe(udev, 0x02); > memcpy(send_buf, firmware->data + sent, size); > @@ -281,6 +286,9 @@ static int ath3k_load_fwfile(struct usb_device *udev, > count -= size; > > while (count) { > + /* workaround the compatibility issue with xHCI controller*/ > + usleep_range(TIMEGAP_USEC_MIN, TIMEGAP_USEC_MAX); > + > size = min_t(uint, count, BULK_SIZE); > pipe = usb_sndbulkpipe(udev, 0x02); > > -- > 2.1.4 > >
On Thu, Feb 12, 2015 at 01:39:19PM +0800, Adam Lee wrote: > BugLink: https://bugs.launchpad.net/bugs/1400215 > > ath3k devices fail to load firmwares on xHCI buses, but work well on > EHCI, this might be a compatibility issue between xHCI and ath3k chips. > As my testing result, those chips will work on xHCI buses again with > this patch. > > This workaround is from Qualcomm, they also did some workarounds in > Windows driver. > > Signed-off-by: Adam Lee <adam.lee@canonical.com> > Signed-off-by: Marcel Holtmann <marcel@holtmann.org> > (cherry picked from commit c561a5753dd631920c4459a067d22679b3d110d6) > --- > drivers/bluetooth/ath3k.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c > index 429c672..2219378 100644 > --- a/drivers/bluetooth/ath3k.c > +++ b/drivers/bluetooth/ath3k.c > @@ -155,6 +155,8 @@ static const struct usb_device_id ath3k_blist_tbl[] = { > #define USB_REQ_DFU_DNLOAD 1 > #define BULK_SIZE 4096 > #define FW_HDR_SIZE 20 > +#define TIMEGAP_USEC_MIN 50 > +#define TIMEGAP_USEC_MAX 100 > > static int ath3k_load_firmware(struct usb_device *udev, > const struct firmware *firmware) > @@ -185,6 +187,9 @@ static int ath3k_load_firmware(struct usb_device *udev, > count -= 20; > > while (count) { > + /* workaround the compatibility issue with xHCI controller*/ > + usleep_range(TIMEGAP_USEC_MIN, TIMEGAP_USEC_MAX); > + > size = min_t(uint, count, BULK_SIZE); > pipe = usb_sndbulkpipe(udev, 0x02); > memcpy(send_buf, firmware->data + sent, size); > @@ -281,6 +286,9 @@ static int ath3k_load_fwfile(struct usb_device *udev, > count -= size; > > while (count) { > + /* workaround the compatibility issue with xHCI controller*/ > + usleep_range(TIMEGAP_USEC_MIN, TIMEGAP_USEC_MAX); > + > size = min_t(uint, count, BULK_SIZE); > pipe = usb_sndbulkpipe(udev, 0x02); > > -- > 2.1.4 > > > -- > kernel-team mailing list > kernel-team@lists.ubuntu.com > https://lists.ubuntu.com/mailman/listinfo/kernel-team Applied to Trusty and Utopic master-next
diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c index 429c672..2219378 100644 --- a/drivers/bluetooth/ath3k.c +++ b/drivers/bluetooth/ath3k.c @@ -155,6 +155,8 @@ static const struct usb_device_id ath3k_blist_tbl[] = { #define USB_REQ_DFU_DNLOAD 1 #define BULK_SIZE 4096 #define FW_HDR_SIZE 20 +#define TIMEGAP_USEC_MIN 50 +#define TIMEGAP_USEC_MAX 100 static int ath3k_load_firmware(struct usb_device *udev, const struct firmware *firmware) @@ -185,6 +187,9 @@ static int ath3k_load_firmware(struct usb_device *udev, count -= 20; while (count) { + /* workaround the compatibility issue with xHCI controller*/ + usleep_range(TIMEGAP_USEC_MIN, TIMEGAP_USEC_MAX); + size = min_t(uint, count, BULK_SIZE); pipe = usb_sndbulkpipe(udev, 0x02); memcpy(send_buf, firmware->data + sent, size); @@ -281,6 +286,9 @@ static int ath3k_load_fwfile(struct usb_device *udev, count -= size; while (count) { + /* workaround the compatibility issue with xHCI controller*/ + usleep_range(TIMEGAP_USEC_MIN, TIMEGAP_USEC_MAX); + size = min_t(uint, count, BULK_SIZE); pipe = usb_sndbulkpipe(udev, 0x02);