* [PATCH] Bluetooth: btusb: fix bInterval for high/super speed isochronous endpoints
@ 2011-12-21 2:19 Bing Zhao
2011-12-21 2:28 ` Marcel Holtmann
2011-12-21 4:18 ` Gustavo Padovan
0 siblings, 2 replies; 3+ messages in thread
From: Bing Zhao @ 2011-12-21 2:19 UTC (permalink / raw)
To: linux-bluetooth
Cc: linux-wireless, Marcel Holtmann, Gustavo Padovan, Bing Zhao
For high-speed/super-speed isochronous endpoints, the bInterval
value is used as exponent, 2^(bInterval-1). Luckily we have
usb_fill_int_urb() function that handles it correctly. So we just
call this function to fill in the RX URB.
Cc: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
---
drivers/bluetooth/btusb.c | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index ea5ad1c..a67c6db 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -508,15 +508,10 @@ static int btusb_submit_isoc_urb(struct hci_dev *hdev, gfp_t mem_flags)
pipe = usb_rcvisocpipe(data->udev, data->isoc_rx_ep->bEndpointAddress);
- urb->dev = data->udev;
- urb->pipe = pipe;
- urb->context = hdev;
- urb->complete = btusb_isoc_complete;
- urb->interval = data->isoc_rx_ep->bInterval;
+ usb_fill_int_urb(urb, data->udev, pipe, buf, size, btusb_isoc_complete,
+ hdev, data->isoc_rx_ep->bInterval);
urb->transfer_flags = URB_FREE_BUFFER | URB_ISO_ASAP;
- urb->transfer_buffer = buf;
- urb->transfer_buffer_length = size;
__fill_isoc_descriptor(urb, size,
le16_to_cpu(data->isoc_rx_ep->wMaxPacketSize));
--
1.7.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Bluetooth: btusb: fix bInterval for high/super speed isochronous endpoints
2011-12-21 2:19 [PATCH] Bluetooth: btusb: fix bInterval for high/super speed isochronous endpoints Bing Zhao
@ 2011-12-21 2:28 ` Marcel Holtmann
2011-12-21 4:18 ` Gustavo Padovan
1 sibling, 0 replies; 3+ messages in thread
From: Marcel Holtmann @ 2011-12-21 2:28 UTC (permalink / raw)
To: Bing Zhao; +Cc: linux-bluetooth, linux-wireless, Gustavo Padovan
Hi Bing,
> For high-speed/super-speed isochronous endpoints, the bInterval
> value is used as exponent, 2^(bInterval-1). Luckily we have
> usb_fill_int_urb() function that handles it correctly. So we just
> call this function to fill in the RX URB.
>
> Cc: Marcel Holtmann <marcel@holtmann.org>
> Signed-off-by: Bing Zhao <bzhao@marvell.com>
> ---
> drivers/bluetooth/btusb.c | 9 ++-------
> 1 files changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
> index ea5ad1c..a67c6db 100644
> --- a/drivers/bluetooth/btusb.c
> +++ b/drivers/bluetooth/btusb.c
> @@ -508,15 +508,10 @@ static int btusb_submit_isoc_urb(struct hci_dev *hdev, gfp_t mem_flags)
>
> pipe = usb_rcvisocpipe(data->udev, data->isoc_rx_ep->bEndpointAddress);
>
> - urb->dev = data->udev;
> - urb->pipe = pipe;
> - urb->context = hdev;
> - urb->complete = btusb_isoc_complete;
> - urb->interval = data->isoc_rx_ep->bInterval;
> + usb_fill_int_urb(urb, data->udev, pipe, buf, size, btusb_isoc_complete,
> + hdev, data->isoc_rx_ep->bInterval);
>
> urb->transfer_flags = URB_FREE_BUFFER | URB_ISO_ASAP;
> - urb->transfer_buffer = buf;
> - urb->transfer_buffer_length = size;
this looks better. And don't ask me why I did not do that from the
beginning ;)
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Regards
Marcel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Bluetooth: btusb: fix bInterval for high/super speed isochronous endpoints
2011-12-21 2:19 [PATCH] Bluetooth: btusb: fix bInterval for high/super speed isochronous endpoints Bing Zhao
2011-12-21 2:28 ` Marcel Holtmann
@ 2011-12-21 4:18 ` Gustavo Padovan
1 sibling, 0 replies; 3+ messages in thread
From: Gustavo Padovan @ 2011-12-21 4:18 UTC (permalink / raw)
To: Bing Zhao; +Cc: linux-bluetooth, linux-wireless, Marcel Holtmann
Hi Bing,
* Bing Zhao <bzhao@marvell.com> [2011-12-20 18:19:00 -0800]:
> For high-speed/super-speed isochronous endpoints, the bInterval
> value is used as exponent, 2^(bInterval-1). Luckily we have
> usb_fill_int_urb() function that handles it correctly. So we just
> call this function to fill in the RX URB.
>
> Cc: Marcel Holtmann <marcel@holtmann.org>
> Signed-off-by: Bing Zhao <bzhao@marvell.com>
> ---
> drivers/bluetooth/btusb.c | 9 ++-------
> 1 files changed, 2 insertions(+), 7 deletions(-)
Applied, thanks.
Gustavo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-12-21 4:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-21 2:19 [PATCH] Bluetooth: btusb: fix bInterval for high/super speed isochronous endpoints Bing Zhao
2011-12-21 2:28 ` Marcel Holtmann
2011-12-21 4:18 ` 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).