2005-02-09 06:36:50

by Nishanth Aravamudan

[permalink] [raw]
Subject: [PATCH 50/63] bluetooth/bfusb: change parameters of usb_{control,bulk}_msg() to msecs

Hi,

Description: Change units of parameters being passed to
usb_{control,bulk}_msg() to milliseconds. Patch is compile-tested.

Signed-off-by: Nishanth Aravamudan <[email protected]>

--- 2.6.11-rc3-kj-v/drivers/bluetooth/bfusb.c 2005-02-03 16:57:40.000000000 -0800
+++ 2.6.11-rc3-kj/drivers/bluetooth/bfusb.c 2005-02-08 14:15:10.000000000 -0800
@@ -63,7 +63,7 @@ MODULE_DEVICE_TABLE(usb, bfusb_table);

#define BFUSB_MAX_BLOCK_SIZE 256

-#define BFUSB_BLOCK_TIMEOUT (HZ * 3)
+#define BFUSB_BLOCK_TIMEOUT 3000

#define BFUSB_TX_PROCESS 1
#define BFUSB_TX_WAKEUP 2
@@ -582,7 +582,7 @@ static int bfusb_load_firmware(struct bf
pipe = usb_sndctrlpipe(bfusb->udev, 0);

if (usb_control_msg(bfusb->udev, pipe, USB_REQ_SET_CONFIGURATION,
- 0, 1, 0, NULL, 0, HZ * USB_CTRL_SET_TIMEOUT) < 0) {
+ 0, 1, 0, NULL, 0, USB_CTRL_SET_TIMEOUT) < 0) {
BT_ERR("Can't change to loading configuration");
return -EBUSY;
}
@@ -623,7 +623,7 @@ static int bfusb_load_firmware(struct bf
pipe = usb_sndctrlpipe(bfusb->udev, 0);

if ((err = usb_control_msg(bfusb->udev, pipe, USB_REQ_SET_CONFIGURATION,
- 0, 2, 0, NULL, 0, HZ * USB_CTRL_SET_TIMEOUT)) < 0) {
+ 0, 2, 0, NULL, 0, USB_CTRL_SET_TIMEOUT)) < 0) {
BT_ERR("Can't change to running configuration");
goto error;
}
@@ -641,7 +641,7 @@ error:
pipe = usb_sndctrlpipe(bfusb->udev, 0);

usb_control_msg(bfusb->udev, pipe, USB_REQ_SET_CONFIGURATION,
- 0, 0, 0, NULL, 0, HZ * USB_CTRL_SET_TIMEOUT);
+ 0, 0, 0, NULL, 0, USB_CTRL_SET_TIMEOUT);

return err;
}


2005-02-09 17:57:58

by Marcel Holtmann

[permalink] [raw]
Subject: [Bluez-devel] Re: [PATCH 50/63] bluetooth/bfusb: change parameters of usb_{control,bulk}_msg() to msecs

Hi Greg,

if you apply the USB core changes for this, then this patch is fine with
me and I think you should apply them all at once.

> Description: Change units of parameters being passed to
> usb_{control,bulk}_msg() to milliseconds. Patch is compile-tested.
>
> Signed-off-by: Nishanth Aravamudan <[email protected]>

Signed-off-by: Marcel Holtmann <[email protected]>

Regards

Marcel




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel