Re: question about the usb_string_sub

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

 



On Sun, 30 May 2010, saeed bishara wrote:

> Hi,
>       I'm newbie to usb, and came across an issue when using USB NEC
> testing device, this device sends 128 bytes string descriptor, but as
> the usb_string_sub tries first to ask for 255 bytes, the transaction
> never completes. is it legal for the device to send 128 bytes string?

Yes.

> if yes, should the host controller (orion-ehci) detect data
> completion?

Yes, if the device works properly.  If the entire descriptor is 128 
bytes (that is, 2 bytes for the descriptor header plus 126 bytes for 
the string data) then it is a multiple of the maxpacket size.  In such 
cases the device needs to send a zero-length packet at the end of the 
descriptor.  Without that zero-length packet, the controller cannot 
detect that the transfer is complete.

Of course, the transfer should time out after 10 seconds or so.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

  Powered by Linux