From: "Tomoya MORINAGA" <tomoya-linux@dsn.okisemi.com>
To: "Wolfgang Grandegger" <wg@grandegger.com>
Cc: "David S. Miller" <davem@davemloft.net>,
"Wolfram Sang" <w.sang@pengutronix.de>,
"Christian Pellegrin" <chripell@fsfe.org>,
"Barry Song" <21cnbao@gmail.com>,
"Samuel Ortiz" <sameo@linux.intel.com>,
<socketcan-core@lists.berlios.de>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <andrew.chih.howe.khor@intel.com>,
<qi.wang@intel.com>, <margie.foster@intel.com>,
<yong.y.wang@intel.com>,
"Masayuki Ohtake" <masa-korg@dsn.okisemi.com>,
<kok.howg.ewe@intel.com>, <joel.clark@intel.com>
Subject: Re: [PATCH net-next-2.6 v2] can: Topcliff: PCH_CAN driver: Add Flow control,
Date: Tue, 16 Nov 2010 17:25:06 +0900 [thread overview]
Message-ID: <001501cb8567$c7a38820$66f8800a@maildom.okisemi.com> (raw)
In-Reply-To: 4CE141EA.5070702@grandegger.com
On Monday, November 15, 2010 11:21 PM, Wolfgang Grandegger wrote:
>
> More comments to the lec handling below.
>
> > + cf->data[6] = ioread32(&priv->regs->errc) & PCH_TEC;
> > + cf->data[7] = (ioread32(&priv->regs->errc) & PCH_REC) >> 8;
>
> Could be handle with just *one* register access.
I will modify.
> if (reg_stat & PCH_BUS_OFF ||
> (reg_stat & PCH_LEC_ALL) != PCH_LEC_ALL) {
>
> Your lec handling is still not correc,
I will modify like above.
> I believe. The driver needs to
> write PCH_LEC_ALL to the "stat" register once in the initialization code
This is NOT true.
I heard even if CAN driver detects PCH_LEC_ALL, the driver doesn't have to
write PCH_LEC_ALL to LEC.
"PCH_LEC_ALL" means there is no error event.
In case error is occurred, lec value is updated automatically.
> and then after each error observed (lec != PCH_LEC_ALL). I still do not
> find such code. Could you show us the output of
>
> "# candump any,0:0,#FFFFFFFF"
>
> when yo send CAN messages *without* a cable connected?.
[root@localhost can-utils]# ./candump any,0:0,#FFFFFFFF
can0 20000024 [8] 00 28 00 00 00 00 88 00 ERRORFRAME
can0 20000024 [8] 00 28 00 00 00 00 88 00 ERRORFRAME
can0 20000024 [8] 00 28 00 00 00 00 88 00 ERRORFRAME
can0 20000024 [8] 00 28 00 00 00 00 88 00 ERRORFRAME
can0 20000024 [8] 00 28 00 00 00 00 88 00 ERRORFRAME
can0 20000024 [8] 00 28 00 00 00 00 88 00 ERRORFRAME
can0 20000024 [8] 00 28 00 00 00 00 88 00 ERRORFRAME
can0 20000024 [8] 00 28 00 00 00 00 88 00 ERRORFRAME
can0 20000024 [8] 00 28 00 00 00 00 88 00 ERRORFRAME
can0 20000024 [8] 00 28 00 00 00 00 88 00 ERRORFRAME
can0 20000024 [8] 00 28 00 00 00 00 88 00 ERRORFRAME
can0 20000024 [8] 00 28 00 00 00 00 88 00 ERRORFRAME
can0 20000024 [8] 00 28 00 00 00 00 88 00 ERRORFRAME
can0 20000024 [8] 00 28 00 00 00 00 88 00 ERRORFRAME
can0 20000024 [8] 00 28 00 00 00 00 88 00 ERRORFRAME
can0 20000024 [8] 00 28 00 00 00 00 88 00 ERRORFRAME
can0 20000024 [8] 00 28 00 00 00 00 88 00 ERRORFRAME
can0 20000024 [8] 00 28 00 00 00 00 88 00 ERRORFRAME
can0 20000024 [8] 00 28 00 00 00 00 88 00 ERRORFRAME
......It seems the same line continues forever.
---
Thanks,
Tomoya MORINAGA
OKI SEMICONDUCTOR CO., LTD.
next prev parent reply other threads:[~2010-11-16 8:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-15 8:30 [PATCH net-next-2.6 v2] can: Topcliff: PCH_CAN driver: Add Flow control, Tomoya MORINAGA
2010-11-15 9:11 ` Marc Kleine-Budde
2010-11-16 5:18 ` Tomoya MORINAGA
2010-11-16 8:14 ` Marc Kleine-Budde
2010-11-16 9:33 ` Tomoya MORINAGA
2010-11-16 17:11 ` David Miller
2010-11-15 9:37 ` Marc Kleine-Budde
2010-11-16 5:30 ` Tomoya MORINAGA
2010-11-15 14:21 ` Wolfgang Grandegger
2010-11-16 8:25 ` Tomoya MORINAGA [this message]
2010-11-16 10:16 ` Wolfgang Grandegger
2010-11-19 7:36 ` Tomoya MORINAGA
2010-11-19 8:57 ` Wolfgang Grandegger
2010-11-22 5:20 ` Tomoya MORINAGA
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='001501cb8567$c7a38820$66f8800a@maildom.okisemi.com' \
--to=tomoya-linux@dsn.okisemi.com \
--cc=21cnbao@gmail.com \
--cc=andrew.chih.howe.khor@intel.com \
--cc=chripell@fsfe.org \
--cc=davem@davemloft.net \
--cc=joel.clark@intel.com \
--cc=kok.howg.ewe@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=margie.foster@intel.com \
--cc=masa-korg@dsn.okisemi.com \
--cc=netdev@vger.kernel.org \
--cc=qi.wang@intel.com \
--cc=sameo@linux.intel.com \
--cc=socketcan-core@lists.berlios.de \
--cc=w.sang@pengutronix.de \
--cc=wg@grandegger.com \
--cc=yong.y.wang@intel.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;
as well as URLs for NNTP newsgroup(s).