From: Fabian Pflug <f.pflug@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>,
BAREBOX <barebox@lists.infradead.org>
Cc: Fabian Pflug <f.pflug@pengutronix.de>
Subject: [PATCH 5/5] test: x86: add test for uefi usb io
Date: Wed, 12 Aug 2026 18:36:53 +0200 [thread overview]
Message-ID: <20260812-v2026-06-0-topic-efi_usb-v1-5-9d2573c29f21@pengutronix.de> (raw)
In-Reply-To: <20260812-v2026-06-0-topic-efi_usb-v1-0-9d2573c29f21@pengutronix.de>
Check, that the EFI-USB-IO controller will create a USB Network device
in barebox. The device has currently no driver, but is available
nevertheless.
Signed-off-by: Fabian Pflug <f.pflug@pengutronix.de>
---
drivers/usb/host/efi-io-protocol.c | 15 ++++++++++++---
test/x86/pc@efi_defconfig.yaml | 9 ++++++++-
2 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/host/efi-io-protocol.c b/drivers/usb/host/efi-io-protocol.c
index bd35628f59..5c6abe5114 100644
--- a/drivers/usb/host/efi-io-protocol.c
+++ b/drivers/usb/host/efi-io-protocol.c
@@ -144,6 +144,16 @@ static int efi_get_usb_string(struct efi_usb_io_protocol *protocol, u16 lang_id,
return 0;
}
+static void print_usb_device_info(struct device *dev)
+{
+ struct usb_device *usb_dev = container_of(dev, struct usb_device, dev);
+
+ dev_info(dev, "Bus %03d Device %03d: ID %04x:%04x %s\n",
+ usb_dev->host->busnum, usb_dev->devnum,
+ usb_dev->descriptor->idVendor, usb_dev->descriptor->idProduct,
+ usb_dev->prod);
+}
+
static int create_usb_device(struct efi_usb_io_priv *priv)
{
struct usb_host *host = &priv->host;
@@ -255,9 +265,8 @@ static int create_usb_device(struct efi_usb_io_priv *priv)
if (err)
goto out_err;
- 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);
+ print_usb_device_info(&dev->dev);
+ devinfo_add(&dev->dev, print_usb_device_info);
err = register_device(&dev->dev);
if (err) {
diff --git a/test/x86/pc@efi_defconfig.yaml b/test/x86/pc@efi_defconfig.yaml
index 2c077d5509..0e77d5a0eb 100644
--- a/test/x86/pc@efi_defconfig.yaml
+++ b/test/x86/pc@efi_defconfig.yaml
@@ -8,7 +8,11 @@ targets:
memory: 1024M
kernel: barebox.efi
display: qemu-default
- extra_args: '-bios OVMF.fd'
+ extra_args: >
+ -bios OVMF.fd
+ -device qemu-xhci,id=xhci
+ -device usb-net,netdev=usb0,bus=xhci.0
+ -netdev user,id=usb0
BareboxDriver:
prompt: 'barebox@[^:]+:[^ ]+ '
bootstring: 'commandline:'
@@ -16,6 +20,7 @@ targets:
features:
- pci
devices:
+ usb1: 'usb1: Bus 001 Device 000: ID 0525:a4a2 NDIS/QEMU USB Network Device'
fb0: 'Type: primary'
fbconsole0: 'Parent: fb0'
wdog0: 'Parent: efi-wdt'
@@ -25,6 +30,8 @@ targets:
acpi-APIC0: 'Signature: APIC (Multiple APIC Description Table)'
runner:
kconfig_add:
+ - CONFIG_USB_HOST=y
+ - CONFIG_USB_EFI_IO_PROTOCOL=y
- CONFIG_DRIVER_SERIAL_NS16550=y
- CONFIG_CONSOLE_ACTIVATE_FIRST=y # avoid duplicate output
images:
--
2.47.3
prev parent reply other threads:[~2026-08-12 16:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-12 16:36 [PATCH 0/5] Add support for USB-EFI devices in EFI Playload Fabian Pflug
2026-08-12 16:36 ` [PATCH 1/5] efi: usb: add header for usb-efi Fabian Pflug
2026-08-12 16:36 ` [PATCH 2/5] usb: core: make usb_set_maxpacket_ep public Fabian Pflug
2026-08-12 16:36 ` [PATCH 3/5] drivers: usb: host: efi: add efi io driver Fabian Pflug
2026-08-12 16:36 ` [PATCH 4/5] efi: guid: add guid for usb host controller 2 Fabian Pflug
2026-08-12 16:36 ` Fabian Pflug [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=20260812-v2026-06-0-topic-efi_usb-v1-5-9d2573c29f21@pengutronix.de \
--to=f.pflug@pengutronix.de \
--cc=barebox@lists.infradead.org \
--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