All of lore.kernel.org
 help / color / mirror / Atom feed
* mcp251x issue
       [not found]   ` <CADZ8cjnEUT6r8EUxZdKbnuVADQ3bCbYJ1cU5evXxJrorJmNK3g@mail.gmail.com>
@ 2014-05-07 15:52     ` Oliver Hartkopp
  2014-05-08  6:17       ` Rost, Martin
  0 siblings, 1 reply; 3+ messages in thread
From: Oliver Hartkopp @ 2014-05-07 15:52 UTC (permalink / raw)
  To: Francesco Rocca; +Cc: linux-can

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
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: mcp251x issue
  2014-05-07 15:52     ` mcp251x issue Oliver Hartkopp
@ 2014-05-08  6:17       ` Rost, Martin
       [not found]         ` <CADZ8cjmOw+Ns7Zf7PDqpFwRRRAQn19Go8G2iPAJuQYnE9oSGAw@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Rost, Martin @ 2014-05-08  6:17 UTC (permalink / raw)
  To: linux-can; +Cc: Francesco Rocca

[-- 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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: mcp251x issue
       [not found]         ` <CADZ8cjmOw+Ns7Zf7PDqpFwRRRAQn19Go8G2iPAJuQYnE9oSGAw@mail.gmail.com>
@ 2014-05-19  5:06           ` Rost, Martin
  0 siblings, 0 replies; 3+ messages in thread
From: Rost, Martin @ 2014-05-19  5:06 UTC (permalink / raw)
  To: Francesco Rocca; +Cc: linux-can

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

Hello Francesco.

The patch went to the official mailing list; you should have seen it.
There was also some discussion about it, in the current state it probably won't make it into an official code repository.
http://thread.gmane.org/gmane.linux.can/5796

Please note that I am only one single user of the mcp2515 and can only comment on the problem I have been seeing.
There are, however, numerous other people using the mcp2515 on the official linux-can list, your chance of getting a helpful response is much higher there.
http://vger.kernel.org/vger-lists.html#linux-can

Mit freundlichen Gruessen
Best regards

Martin Rost


> -----Original Message-----
> From: Francesco Rocca [mailto:roccafrancesco@gmail.com]
> Sent: Friday, May 16, 2014 3:35 PM
> To: Rost, Martin
> Subject: Re: mcp251x issue
> 
> Hello Martin
> 
> we continue to have problem in our side with can communication;
>  the problem seem occurs eralier when also trasmit socket on same can port
> is activated; the bus once off doesn't recovery as expected.
> 
> How do you suggest? i wrote that you are preparing a patch! can we have
> notice about it?
> 
> your help wiil be very appreciate!
> Thanks in advance!
> 
> Francesco
> 
> 
> 
> 2014-05-08 8:17 GMT+02:00 Rost, Martin <Martin.Rost@tonfunk.de>:
> 
> 
> 	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
> 
> 

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-19  5:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [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
     [not found]         ` <CADZ8cjmOw+Ns7Zf7PDqpFwRRRAQn19Go8G2iPAJuQYnE9oSGAw@mail.gmail.com>
2014-05-19  5:06           ` Rost, Martin

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.