From: Mario Limonciello <superm1@kernel.org>
To: mario.limonciello@amd.com, dmitry.torokhov@gmail.com, rojtberg@gmail.com
Cc: Vicki Pfau <vi@endrift.com>, linux-input@vger.kernel.org
Subject: [PATCH 1/2] Input: xpad: Adjust error handling for disconnect
Date: Sun, 8 Jun 2025 20:46:30 -0500 [thread overview]
Message-ID: <20250609014718.236827-2-superm1@kernel.org> (raw)
In-Reply-To: <20250609014718.236827-1-superm1@kernel.org>
From: Mario Limonciello <mario.limonciello@amd.com>
When a device supporting xpad is disconnected it's expected that a
URB will fail to transmit.
Only show an error message when the error isn't -ENODEV.
Cc: Vicki Pfau <vi@endrift.com>
Fixes: 7fc595f4c0263 ("Input: xpad - correctly handle concurrent LED and FF requests")
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
drivers/input/joystick/xpad.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index c066a4da7c140..714a694fc0e5e 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -1344,9 +1344,10 @@ static int xpad_try_sending_next_out_packet(struct usb_xpad *xpad)
usb_anchor_urb(xpad->irq_out, &xpad->irq_out_anchor);
error = usb_submit_urb(xpad->irq_out, GFP_ATOMIC);
if (error) {
- dev_err(&xpad->intf->dev,
- "%s - usb_submit_urb failed with result %d\n",
- __func__, error);
+ if (error != -ENODEV)
+ dev_err(&xpad->intf->dev,
+ "%s - usb_submit_urb failed with result %d\n",
+ __func__, error);
usb_unanchor_urb(xpad->irq_out);
return -EIO;
}
--
2.43.0
next prev parent reply other threads:[~2025-06-09 1:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-09 1:46 [PATCH 0/2] Adjustments to xpad handling for unplug Mario Limonciello
2025-06-09 1:46 ` Mario Limonciello [this message]
2025-06-27 19:27 ` [PATCH 1/2] Input: xpad: Adjust error handling for disconnect Dmitry Torokhov
2025-06-09 1:46 ` [PATCH 2/2] Input: xpad: Return errors from xpad_try_sending_next_out_packet() up Mario Limonciello
2025-06-27 19:28 ` Dmitry Torokhov
2025-06-23 19:03 ` [PATCH 0/2] Adjustments to xpad handling for unplug Mario Limonciello
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=20250609014718.236827-2-superm1@kernel.org \
--to=superm1@kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=rojtberg@gmail.com \
--cc=vi@endrift.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.