Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

USB: lower "Device is not authorized for usage" message to info

This message is not a useful error in practice:
- when using tools such as usbguard, the message is always printed but
it does not presume anything regarding the actual device acceptance
(later 'authorized to connect' message is at info level, and not
displayed on console)
- this can be a source of flood if a usb device connection is flaky
- ... and it is only displayed as the result of an admin action
(modifying authorized_default), working as intended, so not likely
to be an error.

This is still useful to know when looking at usb devices problems, so
info seems appropriate for this class of messages together with the
later eventual authorized message.

Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com>
Link: https://lore.kernel.org/r/20250801-usb-auth-v1-1-a59bfdf0293f@atmark-techno.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Dominique Martinet and committed by
Greg Kroah-Hartman
b12daf36 01570974

+3 -3
+2 -2
drivers/usb/core/driver.c
··· 332 332 return error; 333 333 334 334 if (udev->authorized == 0) { 335 - dev_err(&intf->dev, "Device is not authorized for usage\n"); 335 + dev_info(&intf->dev, "Device is not authorized for usage\n"); 336 336 return error; 337 337 } else if (intf->authorized == 0) { 338 - dev_err(&intf->dev, "Interface %d is not authorized for usage\n", 338 + dev_info(&intf->dev, "Interface %d is not authorized for usage\n", 339 339 intf->altsetting->desc.bInterfaceNumber); 340 340 return error; 341 341 }
+1 -1
drivers/usb/core/generic.c
··· 243 243 * with the driver core and lets interface drivers bind to them. 244 244 */ 245 245 if (udev->authorized == 0) 246 - dev_err(&udev->dev, "Device is not authorized for usage\n"); 246 + dev_info(&udev->dev, "Device is not authorized for usage\n"); 247 247 else { 248 248 c = usb_choose_configuration(udev); 249 249 if (c >= 0) {