* [PATCH] Bluetooth: ath3k: no need to set same pipe multiple times
@ 2014-05-27 5:49 Adam Lee
2014-05-27 13:15 ` Gustavo Padovan
0 siblings, 1 reply; 5+ messages in thread
From: Adam Lee @ 2014-05-27 5:49 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Marcel Holtmann, Johan Hedberg
Invoking usb_sndbulkpipe() on same pipe for same purpose only once is
enough.
Signed-off-by: Adam Lee <adam8157@gmail.com>
---
drivers/bluetooth/ath3k.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
index a83b57e..f983806 100644
--- a/drivers/bluetooth/ath3k.c
+++ b/drivers/bluetooth/ath3k.c
@@ -193,9 +193,10 @@ static int ath3k_load_firmware(struct usb_device *udev,
sent += 20;
count -= 20;
+ pipe = usb_sndbulkpipe(udev, 0x02);
+
while (count) {
size = min_t(uint, count, BULK_SIZE);
- pipe = usb_sndbulkpipe(udev, 0x02);
memcpy(send_buf, firmware->data + sent, size);
err = usb_bulk_msg(udev, pipe, send_buf, size,
--
2.0.0.rc4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Bluetooth: ath3k: no need to set same pipe multiple times
2014-05-27 5:49 [PATCH] Bluetooth: ath3k: no need to set same pipe multiple times Adam Lee
@ 2014-05-27 13:15 ` Gustavo Padovan
2014-05-27 17:16 ` [PATCH v2] " Adam Lee
2014-06-05 13:47 ` [PATCH] Bluetooth: ath3k: reduce pipe setting times in ath3k_load_fwfile() Adam Lee
0 siblings, 2 replies; 5+ messages in thread
From: Gustavo Padovan @ 2014-05-27 13:15 UTC (permalink / raw)
To: Adam Lee; +Cc: linux-bluetooth, Marcel Holtmann, Johan Hedberg
[-- Attachment #1: Type: text/plain, Size: 354 bytes --]
Hi Adam,
2014-05-27 Adam Lee <adam8157@gmail.com>:
> Invoking usb_sndbulkpipe() on same pipe for same purpose only once is
> enough.
>
> Signed-off-by: Adam Lee <adam8157@gmail.com>
> ---
> drivers/bluetooth/ath3k.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Patch has been applied to bluetooth-next. Thanks.
Gustavo
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] Bluetooth: ath3k: no need to set same pipe multiple times
2014-05-27 13:15 ` Gustavo Padovan
@ 2014-05-27 17:16 ` Adam Lee
2014-06-05 13:47 ` [PATCH] Bluetooth: ath3k: reduce pipe setting times in ath3k_load_fwfile() Adam Lee
1 sibling, 0 replies; 5+ messages in thread
From: Adam Lee @ 2014-05-27 17:16 UTC (permalink / raw)
To: Gustavo Padovan; +Cc: linux-bluetooth
Invoking usb_sndbulkpipe() on same pipe for same purpose only once is
enough.
v2: patch the missing place too, sorry.
Signed-off-by: Adam Lee <adam8157@gmail.com>
---
drivers/bluetooth/ath3k.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
index a83b57e..9559f74 100644
--- a/drivers/bluetooth/ath3k.c
+++ b/drivers/bluetooth/ath3k.c
@@ -193,9 +193,10 @@ static int ath3k_load_firmware(struct usb_device *udev,
sent += 20;
count -= 20;
+ pipe = usb_sndbulkpipe(udev, 0x02);
+
while (count) {
size = min_t(uint, count, BULK_SIZE);
- pipe = usb_sndbulkpipe(udev, 0x02);
memcpy(send_buf, firmware->data + sent, size);
err = usb_bulk_msg(udev, pipe, send_buf, size,
@@ -289,10 +290,10 @@ static int ath3k_load_fwfile(struct usb_device *udev,
sent += size;
count -= size;
+ pipe = usb_sndbulkpipe(udev, 0x02);
+
while (count) {
size = min_t(uint, count, BULK_SIZE);
- pipe = usb_sndbulkpipe(udev, 0x02);
-
memcpy(send_buf, firmware->data + sent, size);
err = usb_bulk_msg(udev, pipe, send_buf, size,
--
2.0.0.rc4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] Bluetooth: ath3k: reduce pipe setting times in ath3k_load_fwfile()
2014-05-27 13:15 ` Gustavo Padovan
2014-05-27 17:16 ` [PATCH v2] " Adam Lee
@ 2014-06-05 13:47 ` Adam Lee
2014-06-05 18:29 ` Gustavo Padovan
1 sibling, 1 reply; 5+ messages in thread
From: Adam Lee @ 2014-06-05 13:47 UTC (permalink / raw)
To: Gustavo Padovan; +Cc: Marcel Holtmann, linux-bluetooth
Invoking usb_sndbulkpipe() on same pipe for same purpose only once is
enough.
Signed-off-by: Adam Lee <adam8157@gmail.com>
---
drivers/bluetooth/ath3k.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
index 4aef96b..f938263 100644
--- a/drivers/bluetooth/ath3k.c
+++ b/drivers/bluetooth/ath3k.c
@@ -288,10 +288,10 @@ static int ath3k_load_fwfile(struct usb_device *udev,
sent += size;
count -= size;
+ pipe = usb_sndbulkpipe(udev, 0x02);
+
while (count) {
size = min_t(uint, count, BULK_SIZE);
- pipe = usb_sndbulkpipe(udev, 0x02);
-
memcpy(send_buf, firmware->data + sent, size);
err = usb_bulk_msg(udev, pipe, send_buf, size,
--
2.0.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Bluetooth: ath3k: reduce pipe setting times in ath3k_load_fwfile()
2014-06-05 13:47 ` [PATCH] Bluetooth: ath3k: reduce pipe setting times in ath3k_load_fwfile() Adam Lee
@ 2014-06-05 18:29 ` Gustavo Padovan
0 siblings, 0 replies; 5+ messages in thread
From: Gustavo Padovan @ 2014-06-05 18:29 UTC (permalink / raw)
To: Adam Lee; +Cc: Marcel Holtmann, linux-bluetooth
Hi Adam,
2014-06-05 Adam Lee <adam8157@gmail.com>:
> Invoking usb_sndbulkpipe() on same pipe for same purpose only once is
> enough.
>
> Signed-off-by: Adam Lee <adam8157@gmail.com>
> ---
> drivers/bluetooth/ath3k.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Patch has been applied to bluetooth-next. Thanks.
Gustavo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-06-05 18:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-27 5:49 [PATCH] Bluetooth: ath3k: no need to set same pipe multiple times Adam Lee
2014-05-27 13:15 ` Gustavo Padovan
2014-05-27 17:16 ` [PATCH v2] " Adam Lee
2014-06-05 13:47 ` [PATCH] Bluetooth: ath3k: reduce pipe setting times in ath3k_load_fwfile() Adam Lee
2014-06-05 18:29 ` Gustavo Padovan
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).