linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* USB: cdc-acm: Do not log urb submission errors on disconnect
@ 2018-01-15 10:07 Oliver Neukum
  0 siblings, 0 replies; 2+ messages in thread
From: Oliver Neukum @ 2018-01-15 10:07 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Greg Kroah-Hartman, linux-usb

Am Sonntag, den 14.01.2018, 16:09 +0100 schrieb Hans de Goede:
> When disconnected sometimes the cdc-acm driver logs errors like these:
> 
> [20278.039417] cdc_acm 2-2:2.1: urb 9 failed submission with -19
> [20278.042924] cdc_acm 2-2:2.1: urb 10 failed submission with -19
> [20278.046449] cdc_acm 2-2:2.1: urb 11 failed submission with -19
> [20278.049920] cdc_acm 2-2:2.1: urb 12 failed submission with -19
> [20278.053442] cdc_acm 2-2:2.1: urb 13 failed submission with -19
> [20278.056915] cdc_acm 2-2:2.1: urb 14 failed submission with -19
> [20278.060418] cdc_acm 2-2:2.1: urb 15 failed submission with -19
> 
> Silence these by not logging errors when the result is -ENODEV.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Oliver Neukum <oneukum@suse.com>
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread
* USB: cdc-acm: Do not log urb submission errors on disconnect
@ 2018-01-14 15:09 Hans de Goede
  0 siblings, 0 replies; 2+ messages in thread
From: Hans de Goede @ 2018-01-14 15:09 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: Hans de Goede, Greg Kroah-Hartman, linux-usb

When disconnected sometimes the cdc-acm driver logs errors like these:

[20278.039417] cdc_acm 2-2:2.1: urb 9 failed submission with -19
[20278.042924] cdc_acm 2-2:2.1: urb 10 failed submission with -19
[20278.046449] cdc_acm 2-2:2.1: urb 11 failed submission with -19
[20278.049920] cdc_acm 2-2:2.1: urb 12 failed submission with -19
[20278.053442] cdc_acm 2-2:2.1: urb 13 failed submission with -19
[20278.056915] cdc_acm 2-2:2.1: urb 14 failed submission with -19
[20278.060418] cdc_acm 2-2:2.1: urb 15 failed submission with -19

Silence these by not logging errors when the result is -ENODEV.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/usb/class/cdc-acm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 8e0636c963a7..6c64ab6e80fa 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -425,7 +425,7 @@ static int acm_submit_read_urb(struct acm *acm, int index, gfp_t mem_flags)
 
 	res = usb_submit_urb(acm->read_urbs[index], mem_flags);
 	if (res) {
-		if (res != -EPERM) {
+		if (res != -EPERM && res != -ENODEV) {
 			dev_err(&acm->data->dev,
 				"urb %d failed submission with %d\n",
 				index, res);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-01-15 10:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-15 10:07 USB: cdc-acm: Do not log urb submission errors on disconnect Oliver Neukum
  -- strict thread matches above, loose matches on Subject: below --
2018-01-14 15:09 Hans de Goede

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).