Linux CAN drivers development
 help / color / mirror / Atom feed
From: "Rost, Martin" <Martin.Rost@tonfunk.de>
To: "linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Cc: Francesco Rocca <roccafrancesco@gmail.com>
Subject: RE: mcp251x issue
Date: Thu, 8 May 2014 06:17:51 +0000	[thread overview]
Message-ID: <2E9F00CBB66AB544A1ACDC59627518BA0DC7ECF5@mailserver> (raw)
In-Reply-To: <536A56CD.8020709@hartkopp.net>

[-- Attachment #1: Type: text/plain, Size: 5880 bytes --]

Hi,

this is exactly the problem I've been seeing.
For reference: see http://article.gmane.org/gmane.linux.can/5319

I'll prepare a patch from my code.

Mit freundlichen Gruessen
Best regards

Martin Rost


___________________________________________________________________________
Tonfunk Systementwicklung und Service GmbH, Anger 20 OT Ermsleben, 06463 Falkenstein/ Harz, Deutschland
Phone: +49 34743 5032
Fax: 
Mobil: 
Email: Martin.Rost@tonfunk.de
http://www.tonfunk.de

Geschaeftsfuehrer: René Grzega, Fred Lindecke
AG Stendal HRB 115242
St-Nr.: 117/107/04378, Ust-IdNr.: DE248362256

Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtuemlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.

This e-mail may contain confidential and/ or privileged information.
If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail.
Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.


> -----Original Message-----
> From: linux-can-owner@vger.kernel.org [mailto:linux-can-
> owner@vger.kernel.org] On Behalf Of Oliver Hartkopp
> Sent: Wednesday, May 07, 2014 5:53 PM
> To: Francesco Rocca
> Cc: linux-can@vger.kernel.org
> Subject: mcp251x issue
> 
> Hello Francesco,
> 
> the mcp251x is an SPI attached CAN controller which was reported to have
> some issues on your 2.6.36 Kernel.
> 
> Please take a look to the 2.6.36 log:
> http://git.kernel.org/cgit/linux/kernel/git/stable/linux-
> stable.git/log/drivers/net/can/mcp251x.c?h=linux-2.6.36.y
> 
> And here the latest one:
> http://git.kernel.org/cgit/linux/kernel/git/stable/linux-
> stable.git/log/drivers/net/can/mcp251x.c?h=linux-3.14.y
> 
> I would suggest to upgrade your Linux kernel.
> 
> As you still(!) did not write about your kind of embedded hardware, it's hard
> to help.
> 
> E.g. for the Raspberry Pi there are many community hints focusing the (often
> used) mcp251x - but they are already using a Linux 3.6.
> 
> Ah - and I CC'ed the Linux CAN mailing list.
> Please always ask questions like this on the mailing list and not to me.
> I'm not a mcp251x expert - but you might find them here.
> 
> Regards,
> Oliver
> 
> On 07.05.2014 08:26, Francesco Rocca wrote:
> > hello
> > thank you for your support. the data request are following:
> >
> > before
> >
> > 3: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state
> UNKNOWN qlen 10
> >     link/can
> >     can state ERROR-ACTIVE restart-ms 0
> >     bitrate 500000 sample-point 0.875
> >     tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
> >     mcp251x: tseg1 3..16 tseg2 2..8 sjw 1..4 brp 1..64 brp-inc 1
> >     clock 8000000
> >
> >
> > after
> > 3: can0: <NO-CARRIER,NOARP,UP,ECHO> mtu 16 qdisc pfifo_fast state
> DOWN qlen 10
> >     link/can
> >     can state BUS-OFF restart-ms 0
> >     bitrate 500000 sample-point 0.875
> >     tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
> >     mcp251x: tseg1 3..16 tseg2 2..8 sjw 1..4 brp 1..64 brp-inc 1
> >     clock 8000000
> >
> > you can see the bus goes OFF after few minutes! Performing can down and
> again
> > can up the CAN module start to work! do you suggest to insert the
> command  ip
> > link set can0 type can restart-ms 500? anyway is it a normal behavior? is
> > there a way to avoid the bus off?
> > thank you very much in advance!!
> >
> > francesco
> >
> >
> >
> > ---------- Forwarded message ----------
> > From: *Oliver Hartkopp* <socketcan@hartkopp.net
> <mailto:socketcan@hartkopp.net>>
> > Date: 2014-05-05 18:35 GMT+02:00
> > Subject: Re: Socket CAN Issue
> > To: Francesco Rocca <roccafrancesco@gmail.com
> <mailto:roccafrancesco@gmail.com>>
> >
> >
> > What kind of CAN hardware are you using?
> >
> > Please send the output of:
> >
> > ip -details link show can0
> >
> > At the beginning (before running your app) and when it is stuck (after
> running
> > your app).
> >
> >
> > Regards,
> > Oliver
> >
> >
> > On 05.05.2014 12:03, Francesco Rocca wrote:
> >> Hello
> >> I wrote you last time about BCM Interface; i Tried to use it but i had
> problem;
> >> I use Embedded system with Linux kernel 2.6.36.
> >> My Mutlihtrading application have a CAN BUS software module
> connected to
> >> machine that receive message and answer to them.  The CAN MODULE
> open the
> >> socket  on real interface "can0" and perform as following:
> >>
> >> - Send Cycling request
> >> - Perform filtering on specific can id
> >> -A loop that read the answers.
> >>
> >> A loop is built using CAN utility as base(CAN  dump, can sniffer etc)
> >> After few seconds the module doesn't work anymore also if i try to open
> again
> >> the socket!!
> >>
> >> The same things happen if i use RAW Protocol; in this last case i tried to
> use
> >> also open and close conntection for any request but after 15 minutes
> more or
> >> less does't work anymore!!!
> >>
> >> I'm using read and wirte fuction in the code and the other module of my
> >> application as the CAN module write on log file by fprintf function. Is it
> >> possible that is there interaction in the buffer I/O?
> >> Is it the linux version too old?
> >> It would be a pleasure if you suggest what i have to do to avoid this havy
> >> problem!!
> >>
> >> Best Regards
> >> Francesco
> >
> --
> To unsubscribe from this list: send the line "unsubscribe linux-can" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 2015 bytes --]

  reply	other threads:[~2014-05-08  6:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CADZ8cjkTH5=iYz1fD2Pua2nMZns1xinA+gEWaDLHqMM=WxR62g@mail.gmail.com>
     [not found] ` <5367BDDC.70709@hartkopp.net>
     [not found]   ` <CADZ8cjnEUT6r8EUxZdKbnuVADQ3bCbYJ1cU5evXxJrorJmNK3g@mail.gmail.com>
2014-05-07 15:52     ` mcp251x issue Oliver Hartkopp
2014-05-08  6:17       ` Rost, Martin [this message]
     [not found]         ` <CADZ8cjmOw+Ns7Zf7PDqpFwRRRAQn19Go8G2iPAJuQYnE9oSGAw@mail.gmail.com>
2014-05-19  5:06           ` Rost, Martin

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=2E9F00CBB66AB544A1ACDC59627518BA0DC7ECF5@mailserver \
    --to=martin.rost@tonfunk.de \
    --cc=linux-can@vger.kernel.org \
    --cc=roccafrancesco@gmail.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