From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Fabian Pflug <f.pflug@pengutronix.de>,
Sascha Hauer <s.hauer@pengutronix.de>,
BAREBOX <barebox@lists.infradead.org>
Subject: Re: [PATCH v3 3/5] drivers: usb: host: efi: add efi io driver
Date: Mon, 24 Aug 2026 11:13:18 +0200 [thread overview]
Message-ID: <adbcfd2c-a7f3-4c29-b1cd-c61093a31705@pengutronix.de> (raw)
In-Reply-To: <20260820-v2026-06-0-topic-efi_usb-v3-3-faf0b9267966@pengutronix.de>
Hi,
On 8/20/26 4:34 PM, Fabian Pflug wrote:
> The driver is based on [1] with one "host" controller per device.
> The host controller will hopefully not have any sub-devices and only
> have the one root device, which functions as the only device needed and
> registered for.
>
> [1] https://uefi.org/specs/UEFI/2.11/17_Protocols_USB_Support.html#usb-driver-model
>
> Signed-off-by: Fabian Pflug <f.pflug@pengutronix.de>
[snip]
> + efiret = priv->protocol->get_supported_languages(
> + priv->protocol, &lang_ids, &table_size);
> + if (EFI_ERROR(efiret)) {
> + err = -efi_errno(efiret);
> + goto out_err;
> + }
> +
> + dev->string_langid = lang_ids[0];
Dereference of uninitialized pointer in case that table_size == 0?
usb_alloc_new_device() already zeroes the members, so you want to guard
this behind a table_size >= sizeof(*lang_ids) check.
> + dev_info(&dev->dev, "Bus %03d Device %03d: ID %04x:%04x %s\n",
> + dev->host->busnum, dev->devnum, dev->descriptor->idVendor,
> + dev->descriptor->idProduct, dev->prod);
Did you verify that the `usb' command lists all host controllers and the
device under them as one would expect?
> + // EFI has one device per probe, which now needs its own host controller,
> + // since there is no shared host controller resource.
Nearly all of the code base uses C89-style comments.
Just something to keep in mind for future submissions.
Cheers,
Ahmad
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2026-08-24 9:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-20 14:34 [PATCH v3 0/5] Add support for USB-EFI devices in EFI Playload Fabian Pflug
2026-08-20 14:34 ` [PATCH v3 1/5] efi: usb: add header for usb-efi Fabian Pflug
2026-08-20 14:34 ` [PATCH v3 2/5] usb: core: make usb_set_maxpacket_ep public Fabian Pflug
2026-08-20 14:34 ` [PATCH v3 3/5] drivers: usb: host: efi: add efi io driver Fabian Pflug
2026-08-24 9:13 ` Ahmad Fatoum [this message]
2026-08-20 14:34 ` [PATCH v3 4/5] efi: guid: add guid for usb host controller 2 Fabian Pflug
2026-08-20 14:34 ` [PATCH v3 5/5] test: x86: add test for uefi usb io Fabian Pflug
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=adbcfd2c-a7f3-4c29-b1cd-c61093a31705@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=f.pflug@pengutronix.de \
--cc=s.hauer@pengutronix.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