[PATCH v3 4/6] usb: Add environment based device ignorelist

Marek Vasut marex at denx.de
Fri Mar 22 12:56:37 CET 2024


On 3/22/24 8:47 AM, Janne Grunau via B4 Relay wrote:

[...]

> @@ -1099,6 +1142,20 @@ int usb_select_config(struct usb_device *dev)
>   	le16_to_cpus(&dev->descriptor.idProduct);
>   	le16_to_cpus(&dev->descriptor.bcdDevice);
>   
> +	/* ignore devices from usb_ignorelist */
> +	err = usb_device_is_ignored(dev->descriptor.idVendor,
> +				    dev->descriptor.idProduct);
> +	if (err == -ENODEV) {
> +		dev_dbg(dev->dev, "Ignoring USB device 0x%x:0x%x\n",
> +			dev->descriptor.idVendor, dev->descriptor.idProduct);
> +		return err;
> +	} else if (err == -EINVAL) {
> +		printf("usb_ignorelist parse error in \"%s\"\n",
> +		       env_get("usb_ignorelist"));

Please use dev_err() here consistently with dev_dbg() above.

With that fixed:

Reviewed-by: Marek Vasut <marex at denx.de>

Thanks !


More information about the U-Boot mailing list