Adjustments to xpad handling for unplug
Subsystems (2)
cover Adjustments to xpad handling for unplug
From: Mario Limonciello <[email protected]>
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(-)
Signature · 1 line
2.43.0
PATCH 1/2 Input: xpad: Adjust error handling for disconnect
From: Mario Limonciello <[email protected]>
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.
--- drivers/input/joystick/xpad.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/input/joystick/xpad.c +4 -3
@@ -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 ; }
Signature · 1 line
2.43.0
Re: [PATCH 1/2] Input: xpad: Adjust error handling for disconnect
Quoted 10 lines · Mario Limonciello
From: Mario Limonciello <[email protected]>
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 <[email protected]>Fixes 7fc595f4c0263 ("Input: xpad - correctly handle concurrent LED and FF requests")Signed-off-by Mario Limonciello <[email protected]>
Applied, thank you.
Signature · 1 line
Dmitry
PATCH 2/2 Input: xpad: Return errors from xpad_try_sending_next_out_packet() up
In reply to Mario LimoncielloFrom: Mario Limonciello <[email protected]>
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.
--- drivers/input/joystick/xpad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/joystick/xpad.c +1 -1
@@ -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;
Signature · 1 line
2.43.0
Re: [PATCH 2/2] Input: xpad: Return errors from xpad_try_sending_next_out_packet() up
Quoted 8 lines · Mario Limonciello
From: Mario Limonciello <[email protected]>
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 <[email protected]>Signed-off-by Mario Limonciello <[email protected]>
Applied, thank you.
Signature · 1 line
Dmitry
Quoted 5 lines · Mario Limonciello
From: Mario Limonciello <[email protected]>
When an xpad compatible device is unplugged there are errors in the logs and the correct error code also isn't passed up.
Quoted 7 lines
Mario Limonciello (2):
Input: xpad: Adjust error handling for disconnect
Input: xpad: Return errors fromxpad_try_sending_next_out_packet()updrivers/input/joystick/xpad.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
Gentle ping on this series.