mail archive of the barebox mailing list
 help / color / mirror / Atom feed
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 v2 5/5] test: x86: add test for uefi usb io
Date: Wed, 19 Aug 2026 11:18:14 +0200	[thread overview]
Message-ID: <91b19aeb-163d-4c70-8eb3-1cd13547fc2c@pengutronix.de> (raw)
In-Reply-To: <20260817-v2026-06-0-topic-efi_usb-v2-5-3d45c1782ccc@pengutronix.de>

Hi,

On 8/17/26 10:47 AM, Fabian Pflug wrote:
> 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.

Thanks for adding a test!

> 
> Signed-off-by: Fabian Pflug <f.pflug@pengutronix.de>

Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

Cheers,
Ahmad


> ---
>  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 8207d33dcf..fdd21f24a0 100644
> --- a/drivers/usb/host/efi-io-protocol.c
> +++ b/drivers/usb/host/efi-io-protocol.c
> @@ -145,6 +145,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;
> @@ -256,9 +266,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..4feabb232d 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 RNDIS/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:
> 

-- 
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 |




      reply	other threads:[~2026-08-19  9:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-17  8:47 [PATCH v2 0/5] Add support for USB-EFI devices in EFI Playload Fabian Pflug
2026-08-17  8:47 ` [PATCH v2 1/5] efi: usb: add header for usb-efi Fabian Pflug
2026-08-19 10:01   ` Ahmad Fatoum
2026-08-19 13:32     ` Fabian Pflug
2026-08-19 14:03       ` Ahmad Fatoum
2026-08-19 14:11         ` Fabian Pflug
2026-08-17  8:47 ` [PATCH v2 2/5] usb: core: make usb_set_maxpacket_ep public Fabian Pflug
2026-08-19  9:15   ` Ahmad Fatoum
2026-08-17  8:47 ` [PATCH v2 3/5] drivers: usb: host: efi: add efi io driver Fabian Pflug
2026-08-19 11:04   ` Ahmad Fatoum
2026-08-17  8:47 ` [PATCH v2 4/5] efi: guid: add guid for usb host controller 2 Fabian Pflug
2026-08-19  9:18   ` Ahmad Fatoum
2026-08-17  8:47 ` [PATCH v2 5/5] test: x86: add test for uefi usb io Fabian Pflug
2026-08-19  9:18   ` Ahmad Fatoum [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=91b19aeb-163d-4c70-8eb3-1cd13547fc2c@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