Thread (19 messages) 19 messages, 4 authors, 2010-10-13

Re: [MeeGo-Dev][PATCH v3] Topcliff: Update PCH_CAN driver to 2.6.35

From: Masayuki Ohtake <hidden>
Date: 2010-10-12 07:09:11
Also in: lkml

Possibly related (same subject, not in this thread)

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
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
Userspace Copies C from Driver
Userspace raceived packet order is like below
A-B-D-C

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

I will revert like the following spec.
  Rx 1 Message Object
  Tx 1 Message Object

Could you agree the above ?

Thanks, Ohtake(OKISemi)
----- Original Message ----- 
From: "Wolfgang Grandegger" <redacted>
To: "David Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Cc: <masa-korg-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org>; <redacted>; <sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>; <redacted>;
[off-list ref]; [off-list ref]; [off-list ref]; [off-list ref];
[off-list ref]; [off-list ref]; [off-list ref]; [off-list ref];
[off-list ref]; [off-list ref]; [off-list ref]
Sent: Wednesday, October 06, 2010 6:12 PM
Subject: Re: [MeeGo-Dev][PATCH v3] Topcliff: Update PCH_CAN driver to 2.6.35

On 10/06/2010 05:09 AM, David Miller wrote:
quoted
From: "Masayuki Ohtake" <masa-korg-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org>
Date: Wed, 6 Oct 2010 12:07:15 +0900
quoted
Does your mail mean, for accepting upstream, NAPI is essential for
CAN driver ?
It is up to the CAN maintainers :-)
Well, our SJA1000 reference driver does still not use NAPI. But NAPI is
for CAN especially useful to avoid the infamous *bus error irq
flooding*, which may hang low end systems if the interrupts are handled
in the IRQ context. Ohtake, if your system can handle well such CAN bus
error irq storms at 1MB/s, then NAPI is *not* a must to have. Anyway, as
you are at it, I also suggest to use NAPI right from the beginning.

Wolfgang.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help