All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Wolfgang Grandegger <wg@grandegger.com>
Cc: Stephane Grosjean <s.grosjean@peak-system.com>,
	Marc Kleine-Budde <mkl@pengutronix.de>,
	linux-can Mailing List <linux-can@vger.kernel.org>
Subject: Re: [PATCH v3] can/sja1000: add support for PEAK-System PCMCIA card
Date: Wed, 15 Feb 2012 20:32:14 +0100	[thread overview]
Message-ID: <4F3C083E.5080709@hartkopp.net> (raw)
In-Reply-To: <4F3B6EC7.2090400@grandegger.com>

On 15.02.2012 09:37, Wolfgang Grandegger wrote:


> Why do we care so much about improper handling of the hardware. It is
> *illegal* to unplug the device while it's under operation and if it
> happens we cannot guarantee valid behavior and data anyway. The system
> should not hang, of course, everything else is not that dramatic, I
> think. Mark, what is your opinion?


Hello Wolfgang,

i wonder if people will stop pulling hotplug devices because it is *illegal*

http://www.deq.louisiana.gov/portal/portals/0/news/pdf/IllegalDumpingSign.jpg

Really funny :-)

Btw. i started to implement some code that catches every issue that can occur
when unplugging a sja1000 device:

1. Adding a new flag SJA1000_CHECK_FOR_UNPLUG to be checked via priv->flags

2. Adding the checks to sja1000_interrupt()

3. Adding the checks to sja1000_rx & sja1000_err right before netif_rx(skb)

Finally i came to the conclusion that this was a lot of stuff for a pretty
rare situation. IMO we should only fix a potential hang of the isr and ignore
the damaged data which is probably generated at plug-out.

That's why i sent the "[PATCH v2] can: sja1000 fix isr hang when hw is
unplugged under load" which does exactly fix that issue and is pretty cheap
with additional register reads.

Please consider that patch for inclusion.

Tnx & regards,
Oliver


  reply	other threads:[~2012-02-15 19:32 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-06 15:56 [PATCH v3] can/sja1000: add support for PEAK-System PCMCIA card Stephane Grosjean
2012-02-13  9:14 ` Marc Kleine-Budde
2012-02-13 10:01   ` Stephane Grosjean
2012-02-13 10:14     ` Wolfgang Grandegger
2012-02-13 10:41       ` Oliver Hartkopp
2012-02-13 11:02         ` Wolfgang Grandegger
2012-02-13 11:06           ` Marc Kleine-Budde
2012-02-13 11:08             ` Wolfgang Grandegger
2012-02-13 19:55               ` Oliver Hartkopp
2012-02-13 20:23                 ` Wolfgang Grandegger
2012-02-14  9:14                   ` Stephane Grosjean
2012-02-14  9:30                     ` Wolfgang Grandegger
2012-02-14  9:59                   ` Oliver Hartkopp
2012-02-14 10:16                     ` Stephane Grosjean
2012-02-14 16:41                       ` Oliver Hartkopp
2012-02-15  7:03                         ` Wolfgang Grandegger
2012-02-15  8:05                           ` Oliver Hartkopp
2012-02-15  8:37                             ` Wolfgang Grandegger
2012-02-15 19:32                               ` Oliver Hartkopp [this message]
2012-02-15 11:52                           ` Stephane Grosjean
2012-02-15 15:06                             ` Wolfgang Grandegger
2012-02-15 16:00                               ` Stephane Grosjean
2012-02-15 19:46                               ` Oliver Hartkopp
2012-02-13 10:46       ` Stephane Grosjean
2012-02-13 10:56         ` Wolfgang Grandegger

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=4F3C083E.5080709@hartkopp.net \
    --to=socketcan@hartkopp.net \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=s.grosjean@peak-system.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 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.