From: Oliver Neukum <oneukum@suse.com>
To: gregKH@linuxfoundation.org, linux-usb@vger.kernel.org
Cc: Oliver Neukum <oneukum@suse.com>
Subject: [PATCH] usb: core: usb_submit_urb: downgrade type check
Date: Wed, 11 Jun 2025 15:52:25 +0200 [thread overview]
Message-ID: <20250611135231.2380902-1-oneukum@suse.com> (raw)
Checking for the endpoint type is no reason for a WARN,
as that can cause a reboot. A driver not checking the
endpoint type must not cause a reboot, as there is just
no point in this.
We cannot prevent a device from doing something incorrect
as a reaction to a transfer. Hence warning for a mere
assumption being wrong is not sensible.
Signed-off-by: Oliver Neukum <oneukum@suse.com>
---
drivers/usb/core/urb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c
index 5e52a35486af..acf74ad36326 100644
--- a/drivers/usb/core/urb.c
+++ b/drivers/usb/core/urb.c
@@ -500,7 +500,7 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
/* Check that the pipe's type matches the endpoint's type */
if (usb_pipe_type_check(urb->dev, urb->pipe))
- dev_WARN(&dev->dev, "BOGUS urb xfer, pipe %x != type %x\n",
+ dev_dbg(&dev->dev, "BOGUS urb xfer, pipe %x != type %x\n",
usb_pipetype(urb->pipe), pipetypes[xfertype]);
/* Check against a simple/standard policy */
--
2.49.0
next reply other threads:[~2025-06-11 13:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-11 13:52 Oliver Neukum [this message]
2025-06-11 14:12 ` [PATCH] usb: core: usb_submit_urb: downgrade type check Alan Stern
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=20250611135231.2380902-1-oneukum@suse.com \
--to=oneukum@suse.com \
--cc=gregKH@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
/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