Re: "bInterval" value for High Speed BULK out endpoint

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

 



On Wed, 1 Sep 2010, Mohan V wrote:

> Hello All,
> 
> According to the USB 2.0 spec, "bInterval" value for the High Speed Bulk 
> OUT endpoint must specify the maximum NAK rate of the endpoint. (pg. 
> 271). But on page 273 of the specs, its written
> "For high-speed bulk and control OUT endpoints, the bInterval field is 
> only used for compliance purposes; the host controller is not required 
> to change its behavior based on the value in this field."
> 
> I wanted to know, for High speed Bulk OUT endpoints, what should be the 
> value of bInterval.

It _should_ be the value defined in the spec, i.e., the maximum NAK 
rate.

> If it is set to 0, it indicates that the endpoint never NAKs. So, does 
> this mean that device can never NAK?

It means that _endpoint_ will never NAK (assuming the host behaves
correctly).  The device can still NAK on other endpoints.

> Consider the following case:
> The host is sending data, device sends an ACK for first chunk;
> The host will send the next chunk; if for some reason, the device is not 
> able to receive data, will the host retry if bInterval = 0?

Yes, it will.  All the host controllers I know about ignore the 
bInterval value for bulk endpoints.

However by specifying bInterval = 0 and returning ACK for the first
chunk, the device has promised that it _will_ be able to receive the
second chunk.  So this case should never occur.

> I am asking this by considering the USB android gadget composite driver, 
> gadget/f_mass_storage.c where the bInterval is set to 1 for high speed 
> bulk out endpoint for mass storage interface.

I believe that value was chosen simply as a default to be safe.  It 
doesn't really mean anything, since it would have to depend on the 
device controller hardware.

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