linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Bing Zhao <bzhao@marvell.com>
Cc: linux-bluetooth@vger.kernel.org, linux-wireless@vger.kernel.org,
	Gustavo Padovan <padovan@profusion.mobi>
Subject: Re: [PATCH] Bluetooth: btusb: fix bInterval for high/super speed isochronous endpoints
Date: Tue, 20 Dec 2011 18:28:36 -0800	[thread overview]
Message-ID: <1324434516.1965.159.camel@aeonflux> (raw)
In-Reply-To: <1324433940-16838-1-git-send-email-bzhao@marvell.com>

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



  reply	other threads:[~2011-12-21  2:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2011-12-21  4:18 ` Gustavo Padovan

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=1324434516.1965.159.camel@aeonflux \
    --to=marcel@holtmann.org \
    --cc=bzhao@marvell.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=padovan@profusion.mobi \
    /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).