Re: Use of USB_CTRL_SET_TIMEOUT & USB_CTRL_GET_TIMEOUT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Muni Sekhar <munisekharrms@xxxxxxxxx> writes:
> Hi All,
>
> Usb.h file is having the below mentioned USB_CTRL_SET_TIMEOUT &
> USB_CTRL_GET_TIMEOUT macros.
>
>
>
> /*
>
>  * timeouts, in milliseconds, used for sending/receiving control messages
>
>  * they typically complete within a few frames (msec) after they're issued
>
>  * USB identifies 5 second timeouts, maybe more in a few cases, and a few
>
>  * slow devices (like some MGE Ellipse UPSes) actually push that limit.
>
>  */
>
> #define USB_CTRL_GET_TIMEOUT    5000
>
> #define USB_CTRL_SET_TIMEOUT    5000
>
>
>
>
>
> Does the above mentioned timeouts will vary based on the packet length
> of control transfers (8, 16, 32 or 64 bytes)?
>
>
>
> I do have a USB Bluetooth device and it exposes the control endpoint
> for sending HCI commands.
>
>
>
> I’m not sure what will be the good value for the
> usb_control_msg()timeout for sending HCI commands, will it be safe to
> use USB_CTRL_SET_TIMEOUT?

why wouldn't it? If your device doesn't respond to a control message in
5 seconds, then you should really get that FW fixed or change your
device to something that works. 5 seconds to transfer a few bytes is a
really long time. Even for low-speed pipes (1.5Mbps), you can transfer
960 kiB in 5 seconds if you saturate the bus. How big are your HCI
commands?

-- 
balbi

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux