All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mirza Krak <mirza.krak@hostmobility.com>
To: Marc Kleine-Budde <mkl@pengutronix.de>, linux-can@vger.kernel.org
Subject: Re: [PATCH 1/1] net: can: sja1000: Validate initialization state in start method
Date: Thu, 21 Aug 2014 10:44:52 +0200	[thread overview]
Message-ID: <53F5B184.4050907@hostmobility.com> (raw)
In-Reply-To: <53EC8CD8.2040703@pengutronix.de>


On 2014-08-14 12:18, Marc Kleine-Budde wrote:
> On 08/08/2014 02:30 PM, Mirza Krak wrote:
>> When sja1000 is not compiled as module the SJA1000 chip is only
>> initialized during device registration on kernel boot. Should the chip
>> get a hardware reset there is no way to reinitialize it without re-
>> booting the Linux kernel.
> Not good. :/
>
> However, you can manually unbind the device from the driver:
>
>> ➜ (pts/0) mkl@hermippe:drivers/sja1000_plx_pci ll
>> total 0
>> lrwxrwxrwx 1 root root    0 Aug 14 12:15 0000:01:02.0 -> ../../../../devices/pci0000:00/0000:00:1e.0/0000:01:02.0
>> --w------- 1 root root 4096 Aug 14 12:15 bind
>> lrwxrwxrwx 1 root root    0 Aug 14 12:15 module -> ../../../../module/plx_pci
>> --w------- 1 root root 4096 Aug 14 12:15 new_id
>> --w------- 1 root root 4096 Aug 14 12:15 remove_id
>> --w------- 1 root root 4096 Aug 14 12:15 uevent
>> --w------- 1 root root 4096 Aug 14 12:15 unbind
>> ➜ (pts/0) mkl@hermippe:drivers/sja1000_plx_pci echo 0000:01:02.0 | sudo tee unbind
> And then rebind it:
>
>> ➜ (pts/0) mkl@hermippe:drivers/sja1000_plx_pci echo 0000:01:02.0 | sudo tee bind
Aah I see. You learn something new everyday.
>> This patch adds a check in sja1000_start if the chip is initialized, if
>> not we initialize it.
> Applied to can.
I am sorry but applied to what? I haven't seen it been applied anywhere 
when browsing linux-can on gitorious.
>
> Thanks,
> Marc
>

-- 
Med Vänliga Hälsningar / Best Regards

*******************************************************************
Mirza Krak
Host Mobility AB
mirza.krak@hostmobility.com
Anders Personsgatan 12, 416 64 Göteborg
Sweden
http://www.hostmobility.com
Direct: +46 31 31 32 704
Phone: +46 31 31 32 700
Fax: +46 31 80 67 51
Mobile: +46 730 28 06 22
*******************************************************************


  reply	other threads:[~2014-08-21  8:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-08 12:30 [PATCH 1/1] net: can: sja1000: Validate initialization state in start method Mirza Krak
2014-08-14 10:18 ` Marc Kleine-Budde
2014-08-21  8:44   ` Mirza Krak [this message]
2014-08-21  9:26     ` Marc Kleine-Budde

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=53F5B184.4050907@hostmobility.com \
    --to=mirza.krak@hostmobility.com \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    /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.