* [PATCH 0/2] Adjustments to xpad handling for unplug
@ 2025-06-09 1:46 Mario Limonciello
2025-06-09 1:46 ` [PATCH 1/2] Input: xpad: Adjust error handling for disconnect Mario Limonciello
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Mario Limonciello @ 2025-06-09 1:46 UTC (permalink / raw)
To: mario.limonciello, dmitry.torokhov, rojtberg; +Cc: linux-input
From: Mario Limonciello <mario.limonciello@amd.com>
When an xpad compatible device is unplugged there are errors in the logs
and the correct error code also isn't passed up.
Mario Limonciello (2):
Input: xpad: Adjust error handling for disconnect
Input: xpad: Return errors from xpad_try_sending_next_out_packet() up
drivers/input/joystick/xpad.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] Input: xpad: Adjust error handling for disconnect
2025-06-09 1:46 [PATCH 0/2] Adjustments to xpad handling for unplug Mario Limonciello
@ 2025-06-09 1:46 ` Mario Limonciello
2025-06-27 19:27 ` 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-23 19:03 ` [PATCH 0/2] Adjustments to xpad handling for unplug Mario Limonciello
2 siblings, 1 reply; 6+ messages in thread
From: Mario Limonciello @ 2025-06-09 1:46 UTC (permalink / raw)
To: mario.limonciello, dmitry.torokhov, rojtberg; +Cc: Vicki Pfau, linux-input
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] Input: xpad: Adjust error handling for disconnect
2025-06-09 1:46 ` [PATCH 1/2] Input: xpad: Adjust error handling for disconnect Mario Limonciello
@ 2025-06-27 19:27 ` Dmitry Torokhov
0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Torokhov @ 2025-06-27 19:27 UTC (permalink / raw)
To: Mario Limonciello; +Cc: mario.limonciello, rojtberg, Vicki Pfau, linux-input
On Sun, Jun 08, 2025 at 08:46:30PM -0500, Mario Limonciello wrote:
> 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>
Applied, thank you.
--
Dmitry
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] Input: xpad: Return errors from xpad_try_sending_next_out_packet() up
2025-06-09 1:46 [PATCH 0/2] Adjustments to xpad handling for unplug Mario Limonciello
2025-06-09 1:46 ` [PATCH 1/2] Input: xpad: Adjust error handling for disconnect Mario Limonciello
@ 2025-06-09 1:46 ` 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
2 siblings, 1 reply; 6+ messages in thread
From: Mario Limonciello @ 2025-06-09 1:46 UTC (permalink / raw)
To: mario.limonciello, dmitry.torokhov; +Cc: Vicki Pfau, linux-input
From: Mario Limonciello <mario.limonciello@amd.com>
Not all errors that occur in xpad_try_sending_next_out_packet() are
IO errors. Pass up the error code to the caller so that it can
decide what to to.
Cc: Vicki Pfau <vi@endrift.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
drivers/input/joystick/xpad.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index 714a694fc0e5e..e0374111d0174 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -1349,7 +1349,7 @@ static int xpad_try_sending_next_out_packet(struct usb_xpad *xpad)
"%s - usb_submit_urb failed with result %d\n",
__func__, error);
usb_unanchor_urb(xpad->irq_out);
- return -EIO;
+ return error;
}
xpad->irq_out_active = true;
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] Adjustments to xpad handling for unplug
2025-06-09 1:46 [PATCH 0/2] Adjustments to xpad handling for unplug Mario Limonciello
2025-06-09 1:46 ` [PATCH 1/2] Input: xpad: Adjust error handling for disconnect Mario Limonciello
2025-06-09 1:46 ` [PATCH 2/2] Input: xpad: Return errors from xpad_try_sending_next_out_packet() up Mario Limonciello
@ 2025-06-23 19:03 ` Mario Limonciello
2 siblings, 0 replies; 6+ messages in thread
From: Mario Limonciello @ 2025-06-23 19:03 UTC (permalink / raw)
To: Mario Limonciello, dmitry.torokhov, rojtberg; +Cc: linux-input
On 6/8/25 8:46 PM, Mario Limonciello wrote:
> From: Mario Limonciello <mario.limonciello@amd.com>
>
> When an xpad compatible device is unplugged there are errors in the logs
> and the correct error code also isn't passed up.
>
> Mario Limonciello (2):
> Input: xpad: Adjust error handling for disconnect
> Input: xpad: Return errors from xpad_try_sending_next_out_packet() up
>
> drivers/input/joystick/xpad.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
Gentle ping on this series.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-06-27 19:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-09 1:46 [PATCH 0/2] Adjustments to xpad handling for unplug Mario Limonciello
2025-06-09 1:46 ` [PATCH 1/2] Input: xpad: Adjust error handling for disconnect Mario Limonciello
2025-06-27 19:27 ` 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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).