RE: [PATCH] usb: dwc3: ep0: Handle variable-length Data Stage

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

 



Hi,

> Hi,
> 
> On Thu, Dec 19, 2013 at 02:54:31PM +0900, Anton Tikhomirov wrote:
> > >  	WARN_ON(ret < 0);
> > >
> > > Regards
> > > Pratyush
> >
> > By the way, chaining additional (auxiliary) TRB would allow complying
> with
> > Buffer Size Rule on _UDC_driver_level_ for any type of OUT endpoints,
> when
> > total size of a Buffer Descriptor must be a multiple of MaxPacketSize:
> >
> > rem = request_length % MaxPacketSize
> >
> > general TRB size = request_length 	(CHN = 1)
> 
> should be request_length - rem
> 
> > aux TRB size = MaxPacketSize - rem	(CHN = 0)
> 
> should be rem

In this case:

Buffer_Descriptor_size = general_TRB_size + aux_TRB_size =
	(request_lenth - rem) + rem = request_length ,

which is not multiple of MaxPacketSize.

The idea is to build Buffer Descriptor, whose total size is multiple of
MaxPacketSize, using additional TRB.

> 
> > Buffer for aux TRBs can be allocated at initialization time and used
> > when necessary.
> 
> send a patch and test it for weeks ;-)
> 
> --
> Balbi

Thanks

--
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