Re: urb packetizing

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

 



On Thu, 30 Jul 2009, Greg KH wrote:

> On Thu, Jul 30, 2009 at 07:21:24PM +0530, Viral Mehta wrote:
> > Hi list,
> > 
> > I went through lots of documents on USB.
> > Please correct me if my below understanding is wrong and please provide 
> > pointers.
> > 
> > 1. My application wants to pass some GBs of data to USB device.
> 
> Like all applications, this is nothing new :)
> 
> > 2. My mass storage class specific drivers can make URBs of some fix size 
> > and can submit to usbcore. Any min/max size ? Or I can create just one 
> > URB and submit.
> 
> You can submit one urb, but it can't be Gb in size.

The only limit is the amount of memory that can be allocated for the
URB.  If you could allocate 1 GB of memory then the URB could be 1 GB.

> > 3. USB host driver will convert that URB into different packets and will 
> > transmit to USB device. The packet size will be as defined in USB spec 
> > and as listed in protocol spec and also depends on what type of 
> > transfers are happening.
> 
> Yes.
> 
> > 4. USB host driver will call completion only iff all packets are 
> > transmitted and thus one URB is transmitted correctly. Yes?
> 
> Yes.

Actually no.  If usb_submit_urb() succeeded then the completion routine 
will definitely be called, whether or not the URB was transmitted 
correctly.

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