All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] can: mcba_usb: fix typo
@ 2017-11-27 20:41 Martin Kelly
  2017-11-27 20:42 ` [PATCH 2/2] can: mcba_usb: fix device disconnect bug Martin Kelly
  2017-11-27 23:17 ` [PATCH 1/2] can: mcba_usb: fix typo Marc Kleine-Budde
  0 siblings, 2 replies; 4+ messages in thread
From: Martin Kelly @ 2017-11-27 20:41 UTC (permalink / raw)
  To: linux-can
  Cc: Remigiusz Kołłątaj, Marc Kleine-Budde,
	Wolfgang Grandegger, Martin Kelly

Signed-off-by: Martin Kelly <mkelly@xevo.com>
---
 drivers/net/can/usb/mcba_usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/can/usb/mcba_usb.c b/drivers/net/can/usb/mcba_usb.c
index 7f0272558bef..c4355f0a20d5 100644
--- a/drivers/net/can/usb/mcba_usb.c
+++ b/drivers/net/can/usb/mcba_usb.c
@@ -862,7 +862,7 @@ static int mcba_usb_probe(struct usb_interface *intf,
 		goto cleanup_unregister_candev;
 	}
 
-	dev_info(&intf->dev, "Microchip CAN BUS analizer connected\n");
+	dev_info(&intf->dev, "Microchip CAN BUS Analyzer connected\n");
 
 	return 0;
 
-- 
2.11.0


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

* [PATCH 2/2] can: mcba_usb: fix device disconnect bug
  2017-11-27 20:41 [PATCH 1/2] can: mcba_usb: fix typo Martin Kelly
@ 2017-11-27 20:42 ` Martin Kelly
  2017-11-27 23:17 ` [PATCH 1/2] can: mcba_usb: fix typo Marc Kleine-Budde
  1 sibling, 0 replies; 4+ messages in thread
From: Martin Kelly @ 2017-11-27 20:42 UTC (permalink / raw)
  To: linux-can
  Cc: Remigiusz Kołłątaj, Marc Kleine-Budde,
	Wolfgang Grandegger, Martin Kelly

Currently, when you disconnect the device, the driver infinitely
resubmits all URBs, so you see:

Rx URB aborted (-32)

in an infinite loop.

Fix this by catching -EPIPE (what we get in urb->status when the device
disconnects) and not resubmitting.

With this patch, I can plug and unplug many times and the driver
recovers correctly.

Signed-off-by: Martin Kelly <mkelly@xevo.com>
---
 drivers/net/can/usb/mcba_usb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/can/usb/mcba_usb.c b/drivers/net/can/usb/mcba_usb.c
index c4355f0a20d5..ef417dcddbf7 100644
--- a/drivers/net/can/usb/mcba_usb.c
+++ b/drivers/net/can/usb/mcba_usb.c
@@ -592,6 +592,7 @@ static void mcba_usb_read_bulk_callback(struct urb *urb)
 		break;
 
 	case -ENOENT:
+	case -EPIPE:
 	case -ESHUTDOWN:
 		return;
 
-- 
2.11.0


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

* Re: [PATCH 1/2] can: mcba_usb: fix typo
  2017-11-27 20:41 [PATCH 1/2] can: mcba_usb: fix typo Martin Kelly
  2017-11-27 20:42 ` [PATCH 2/2] can: mcba_usb: fix device disconnect bug Martin Kelly
@ 2017-11-27 23:17 ` Marc Kleine-Budde
  2017-11-27 23:49   ` Martin Kelly
  1 sibling, 1 reply; 4+ messages in thread
From: Marc Kleine-Budde @ 2017-11-27 23:17 UTC (permalink / raw)
  To: Martin Kelly, linux-can
  Cc: Remigiusz Kołłątaj, Wolfgang Grandegger


[-- Attachment #1.1: Type: text/plain, Size: 442 bytes --]

On 11/27/2017 09:41 PM, Martin Kelly wrote:
> Signed-off-by: Martin Kelly <mkelly@xevo.com>

Please add a patch description. Let's have every patch one.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH 1/2] can: mcba_usb: fix typo
  2017-11-27 23:17 ` [PATCH 1/2] can: mcba_usb: fix typo Marc Kleine-Budde
@ 2017-11-27 23:49   ` Martin Kelly
  0 siblings, 0 replies; 4+ messages in thread
From: Martin Kelly @ 2017-11-27 23:49 UTC (permalink / raw)
  To: Marc Kleine-Budde, linux-can
  Cc: Remigiusz Kołłątaj, Wolfgang Grandegger

On 11/27/2017 03:17 PM, Marc Kleine-Budde wrote:
> On 11/27/2017 09:41 PM, Martin Kelly wrote:
>> Signed-off-by: Martin Kelly <mkelly@xevo.com>
> 
> Please add a patch description. Let's have every patch one.
> 
> Marc
> 

Alright, I sent a v2 series with a description.

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

end of thread, other threads:[~2017-11-27 23:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-27 20:41 [PATCH 1/2] can: mcba_usb: fix typo Martin Kelly
2017-11-27 20:42 ` [PATCH 2/2] can: mcba_usb: fix device disconnect bug Martin Kelly
2017-11-27 23:17 ` [PATCH 1/2] can: mcba_usb: fix typo Marc Kleine-Budde
2017-11-27 23:49   ` Martin Kelly

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.