From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] usb: ci_udc: fix request allocation when endpoints are disabled
Date: Fri, 24 Jul 2015 22:05:55 +0200 [thread overview]
Message-ID: <201507242205.55554.marex@denx.de> (raw)
In-Reply-To: <1437750861-6489-1-git-send-email-robh@kernel.org>
On Friday, July 24, 2015 at 05:14:21 PM, Rob Herring wrote:
> The ci_udc driver request allocation assumes that the endpoint descriptor
> pointer is set to retrieve the endpoint number, but that is only true
> when the endpoint is enabled. This results in a NULL ptr dereference
> which for me happens to return 0 value. This causes the EP0 request
> struct to be returned for other endpoints. Some gadget drivers like
> fastboot and USB MS work fine, but ethernet does not.
>
> Really, the ci_udc driver is the oddball here doing this EP0 special
> case handling Stephen added. All the other drivers alloc/free functions
> are pretty much the same with the only variation being the size of the
> private struct. This could all be consolidated to a common function.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> Cc: Marek Vasut <marex@denx.de>
> Cc: Stephen Warren <swarren@nvidia.com>
Applied, thanks!
Best regards,
Marek Vasut
prev parent reply other threads:[~2015-07-24 20:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-24 15:14 [U-Boot] [PATCH] usb: ci_udc: fix request allocation when endpoints are disabled Rob Herring
2015-07-24 19:15 ` Stephen Warren
2015-07-24 20:05 ` Marek Vasut [this message]
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=201507242205.55554.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox