From: Wolfgang Grandegger <wg@grandegger.com>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: Oliver Hartkopp <socketcan@hartkopp.net>, linux-can@vger.kernel.org
Subject: Re: [PATCH v2] can: sja1000 fix isr hang when hw is unplugged under load
Date: Sat, 18 Feb 2012 18:13:37 +0100 [thread overview]
Message-ID: <4F3FDC41.4010900@grandegger.com> (raw)
In-Reply-To: <4F3FD920.7000504@pengutronix.de>
On 02/18/2012 06:00 PM, Marc Kleine-Budde wrote:
> On 02/18/2012 05:44 PM, Wolfgang Grandegger wrote:
>> On 02/18/2012 04:34 PM, Oliver Hartkopp wrote:
>>> On 18.02.2012 15:33, Wolfgang Grandegger wrote:
>>>
>>>> On 02/17/2012 09:27 PM, Marc Kleine-Budde wrote:
>>>>> On 02/15/2012 05:51 PM, Oliver Hartkopp wrote:
>>>>>> In the case of hotplug enabled devices (PCMCIA/PCIeC) the removal of the
>>>>>> hardware can cause an infinite loop in the common sja1000 isr.
>>>>>>
>>>>>> Use the already retrieved status register to indicate a possible hardware
>>>>>> removal and double check by reading the mode register in sja1000_is_absent.
>>>>>>
>>>>>> v2: Create a new function to not print information in irq context.
>>>>>>
>>>>>> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
>>>>>
>>>>> Thanks for the patch. I'm going to commit it to can-next. Any objections?
>>>>
>>>> Sorry for the late response but what is this double check good for? All
>>>> register reads will return 0xff if the card is unplugged. And if the
>>>> double check is OK we will continue even we have realized a clear
>>>> failure (status was 0xff).
>>>
>>>
>>> Hi Wolfgang,
>>>
>>> i checked the SJA1000 spec. The status register can potentially hold the value
>>> 0xFF by specification. So even when it's not very likely that it holds 0xFF -
>>> it can be. Additionally you may have SJA1000 FPGA cores that do not behave
>>> exactly like the SJA1000 itself.
>>>
>>> To double check the unlikely case i do a read on the mode register, which has
>>> some bits definitely set to "0" which is a strong indication for the
>>> controller removal.
>>
>> OK, no more objections. Hope to find some time soon to test my PCAN PCcard.
>
> Can I add your Acked-by to the patch?
Yes. I do not expect any more problems.
Wolfgang.
next prev parent reply other threads:[~2012-02-18 17:13 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1318506157-10329-1-git-send-email-mkl@pengutronix.de>
2011-11-02 20:55 ` [PATCH] MAINTAINERS: Add can-gw include to maintained files Oliver Hartkopp
2011-11-03 22:12 ` David Miller
2012-02-14 19:27 ` [PATCH] can: sja1000 fix isr hang when hw is unplugged under load Oliver Hartkopp
2012-02-15 16:51 ` [PATCH v2] " Oliver Hartkopp
2012-02-17 20:27 ` Marc Kleine-Budde
2012-02-18 14:19 ` Oliver Hartkopp
2012-02-18 17:00 ` Marc Kleine-Budde
2012-02-20 11:02 ` Marc Kleine-Budde
2012-02-21 8:07 ` Oliver Hartkopp
2012-02-21 9:03 ` Marc Kleine-Budde
2012-02-18 14:33 ` Wolfgang Grandegger
2012-02-18 15:34 ` Oliver Hartkopp
2012-02-18 16:44 ` Wolfgang Grandegger
2012-02-18 17:00 ` Marc Kleine-Budde
2012-02-18 17:13 ` Wolfgang Grandegger [this message]
2012-04-03 19:56 ` [PATCH RFC] can: add hash table for single EFF id filter list Oliver Hartkopp
2012-05-08 20:20 ` [PATCH] can: update documentation wording error frames -> error messages Oliver Hartkopp
2012-05-08 20:38 ` Marc Kleine-Budde
2012-05-09 17:09 ` Heinz-Jürgen Oertel
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=4F3FDC41.4010900@grandegger.com \
--to=wg@grandegger.com \
--cc=linux-can@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=socketcan@hartkopp.net \
/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;
as well as URLs for NNTP newsgroup(s).