All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/7] usb: increase USB descriptor buffer size
Date: Sun, 13 Dec 2015 19:49:30 +0100	[thread overview]
Message-ID: <201512131949.30977.marex@denx.de> (raw)
In-Reply-To: <2415535.ONnvDgm0Am@pebbles.site>

On Sunday, December 13, 2015 at 07:35:19 PM, Stefan Bruens wrote:
> 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.bruens@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.

Do you feel like working on it ?

Best regards,
Marek Vasut

  reply	other threads:[~2015-12-13 18:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-13  4:47 [U-Boot] [PATCH 1/7] usb: increase USB descriptor buffer size Stefan Brüns
2015-12-13  4:49 ` Marek Vasut
2015-12-13 18:35   ` Stefan Bruens
2015-12-13 18:49     ` Marek Vasut [this message]
2015-12-18  1:07       ` [U-Boot] [PATCH] usb: Alloc buffer for USB descriptor dynamically Stefan Brüns
2015-12-18 20:19         ` Marek Vasut
2015-12-18 22:41         ` Simon Glass
2015-12-19 15:23           ` Stefan Bruens
2015-12-19 20:29             ` Simon Glass
2015-12-19 21:23               ` Stefan Bruens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201512131949.30977.marex@denx.de \
    --to=marex@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.