Linux CAN drivers development
 help / color / mirror / Atom feed
From: Martin Kelly <mkelly@xevo.com>
To: "Stefan Mätje" <Stefan.Maetje@esd.eu>,
	"Marc Kleine-Budde" <mkl@pengutronix.de>,
	"linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Cc: "Remigiusz Kołłątaj" <remigiusz.kollataj@mobica.com>,
	"Wolfgang Grandegger" <wg@grandegger.com>
Subject: Re: CAN-USB adapter unplug
Date: Wed, 29 Nov 2017 09:07:40 -0800	[thread overview]
Message-ID: <e5a2cbc8-f1be-1bed-a0af-9b5fa6fd35ca@xevo.com> (raw)
In-Reply-To: <2f999f02-028e-1e6c-9020-beb5a76889cc@esd.eu>

On 11/29/2017 07:21 AM, Stefan Mätje wrote:
> Am 29.11.2017 um 13:20 schrieb Marc Kleine-Budde:
>> On 11/28/2017 10:09 PM, Martin Kelly wrote:
>>>> Both applied to can.
>>>
>>> Thanks! By the way as far as I can tell from code inspection, it appears
>>> that most of the other drivers in net/can/usb should have the same
>>> disconnect bug. gs_usb appears to be clear, as it returns in its default
>>> case. Unfortunately mcba_usb is the only device I have to test with, but
>>> those with other devices may want to check for this.
>>
>> Can you create patches for the affected drivers and send them to the
>> list and the maintainers of the driver on Cc?
>>
>> I don't have access to every USB adapter neither.
>>
>> Marc
>>
> 
> Hi,
> 
> I have seen Martin's emails these days and tried to reproduce the error here
> with an esd CAN-USB/2 device (handled by esd_usb2.c). The only thing I get
> in the log are some messages like this:
> 
> kernel: [14776.152459] usb 2-1: Rx URB aborted (-71)
> 
> There is no endless loop. How could I reproduce the bad behavior? For the
> quick test I used an Ubuntu 4.4.0-101-generic kernel.

Interesting. Do you see just a few -71 RX URB aborted messages (one per 
outstanding URB) rather than an endless loop? If so, then I think 
everything is OK on that device, as the URBs are not being resubmitted.

In case it helps, my test case for the mcba_usb is on a Raspberry Pi 3. 
I don't know whether or not that could influence the USB error code we 
see, since you are seeing EPROTO instead of EPIPE when the device gets 
unplugged.

> 
> In any case I will add the patch handling EPIPE on a test system and have a
> look what it might change.
> 
> Regards,
> Stefan Mätje
>

  reply	other threads:[~2017-11-29 17:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-27 23:49 [PATCH v2 1/2] can: mcba_usb: fix typo Martin Kelly
2017-11-27 23:49 ` [PATCH v2 2/2] can: mcba_usb: fix device disconnect bug Martin Kelly
2017-11-28  8:46 ` [PATCH v2 1/2] can: mcba_usb: fix typo Marc Kleine-Budde
2017-11-28 21:09   ` Martin Kelly
2017-11-29 12:20     ` CAN-USB adapter unplug (was: Re: [PATCH v2 1/2] can: mcba_usb: fix typo) Marc Kleine-Budde
2017-11-29 15:21       ` CAN-USB adapter unplug Stefan Mätje
2017-11-29 17:07         ` Martin Kelly [this message]
2017-11-30 10:18           ` Jimmy Assarsson
2017-11-30 18:19             ` Martin Kelly
2017-12-04  8:39               ` Jimmy Assarsson
2017-12-05 23:42                 ` Martin Kelly
2017-12-06  9:30                   ` Jimmy Assarsson
2017-12-01  2:06             ` Martin Kelly
2017-11-29 17:04       ` Martin Kelly

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=e5a2cbc8-f1be-1bed-a0af-9b5fa6fd35ca@xevo.com \
    --to=mkelly@xevo.com \
    --cc=Stefan.Maetje@esd.eu \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=remigiusz.kollataj@mobica.com \
    --cc=wg@grandegger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox