On Sunday 13 December 2015 05:49:24 Marek Vasut wrote:
> On Sunday, December 13, 2015 at 05:47:18 AM, Stefan Brüns wrote:
> > The configuration descriptor includes all interface, endpoint and
> > auxiliary descriptors (e.g. report, union) so 512 may not be enough.
> > 
> > Signed-off-by: Stefan Brüns <stefan.bru...@rwth-aachen.de>
> 
> Can the size be determined in a dynamic manner instead of this ad-hoc
> random number ?

Currently the buffer is allocated on the stack with ALLOC_CACHE_ALIGN_BUFFER
in usb_select_config(... The buffer is passed to 
usb_get_configuration_no(...), but the buffer size is implicit.

usb_get_configuration_no(...) already determines and checks the descriptor 
size, but as it can not readjust the buffer it just bails out if it is
to small.

The absolute maximum size for the descriptor is 64kB.

So yes, this is possible, but needs a little bit more work.

Kind regards,

Stefan

-- 
Stefan Brüns  /  Bergstraße 21  /  52062 Aachen
home: +49 241 53809034     mobile: +49 151 50412019
work: +49 2405 49936-424
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to