public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Grandegger <wg@grandegger.com>
To: Masayuki Ohtake <masa-korg@dsn.okisemi.com>
Cc: David Miller <davem@davemloft.net>,
	andrew.chih.howe.khor@intel.com, sameo@linux.intel.com,
	margie.foster@intel.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, yong.y.wang@intel.com,
	socketcan-core@lists.berlios.de, mkl@pengutronix.de,
	joel.clark@intel.com, morinaga526@dsn.okisemi.com,
	kok.howg.ewe@intel.com, chripell@fsfe.org, qi.wang@intel.com
Subject: Re: [MeeGo-Dev][PATCH v3] Topcliff: Update PCH_CAN driver to 2.6.35
Date: Tue, 12 Oct 2010 09:42:52 +0200	[thread overview]
Message-ID: <4CB4117C.4070207@grandegger.com> (raw)
In-Reply-To: <000c01cb69dc$5d2aaab0$66f8800a@maildom.okisemi.com>

Hi Ohtake,

On 10/12/2010 09:09 AM, Masayuki Ohtake wrote:
> Hi Wolfgang,
> 
> We have implemented our CAN driver with FIFO mode, and
> We are testing our CAN driver with FIFO mode.
> However, we have found Our CAN hardware spec is different from our anticipated.
> Our CAN HW FIFO is not common FIFO.
> Using  FIFO mode, there is possibility received packets are out-of-order.
> 
> e.g.
> Recv packet-A from NW and set to FIFO.
>   |A|
> 
> Recv packet-B from NW and set to FIFO.
>   |A|B|
> 
> Recv packet-C is about to set to FIFO
>   |A|B|(C)|
> 
> Userspace Copies A from Driver

OK, let's say the CPU or software starts processing the message FIFO.

> Userspace Copies B from Driver
>   |   |   |(C)|
> 
> packet-C set to FIFO (C is not head.)
> Recv packet-D from NW(Next packet is set to head)
>   |D|   |C|
> 
> Userspace Copies D from Driver

The software could continues searching the FIFO for valid messages. Then
it would find C first.

> Userspace Copies C from Driver
> Userspace raceived packet order is like below
> A-B-D-C

I'm still optimistic that it could be handled properly by software, it
might be tricky though.

> So, I think normal-mode is better than FIFO-mode.

To be clear. Out-of-order reception is not allowed!

> I will revert like the following spec.
>   Rx 1 Message Object
>   Tx 1 Message Object
> 
> Could you agree the above ?

See above. I agree if the software cannot assure in-order reception. But
it's not yet obvious to me that it cannot be achieved. I will have a
closer look to the manual. Just one RX message object without any
further buffering is really bad as message losses are likely to happen.

Wolfgang.

  reply	other threads:[~2010-10-12  7:41 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-24 10:24 [MeeGo-Dev][PATCH v3] Topcliff: Update PCH_CAN driver to 2.6.35 Masayuki Ohtak
2010-09-27  8:38 ` Wolfgang Grandegger
2010-09-30  9:10 ` Wolfgang Grandegger
2010-09-30 18:50   ` David Miller
2010-10-01 10:02   ` Masayuki Ohtake
2010-10-01 12:40     ` Wolfgang Grandegger
2010-10-05 10:21       ` Masayuki Ohtake
2010-10-05 11:08         ` Marc Kleine-Budde
2010-10-05 12:09           ` Masayuki Ohtake
2010-10-05 18:45             ` David Miller
2010-10-06  3:07               ` Masayuki Ohtake
2010-10-06  3:09                 ` David Miller
2010-10-06  9:12                   ` Wolfgang Grandegger
2010-10-12  7:09                     ` Masayuki Ohtake
2010-10-12  7:42                       ` Wolfgang Grandegger [this message]
2010-10-12  7:56                       ` Marc Kleine-Budde
2010-10-13  4:23                         ` Masayuki Ohtake
2010-10-13  7:38                           ` Marc Kleine-Budde
2010-10-13 10:09   ` Masayuki Ohtake
2010-10-13 11:08     ` Wolfgang Grandegger
2010-10-13 12:05       ` Masayuki Ohtake

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=4CB4117C.4070207@grandegger.com \
    --to=wg@grandegger.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=mkl@pengutronix.de \
    --cc=morinaga526@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=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