linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan@hartkopp.net>
To: "Harrington, Sean M." <harrington.234@buckeyemail.osu.edu>,
	Marc Kleine-Budde <mkl@pengutronix.de>,
	"linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: Re: C-Can or Other SocketCAN Issue
Date: Tue, 04 Mar 2014 07:53:59 +0100	[thread overview]
Message-ID: <53157887.1040000@hartkopp.net> (raw)
In-Reply-To: <41be4e6aa0ed40b9a4374aa6c565f8b4@BN1PR01MB071.prod.exchangelabs.com>



On 03.03.2014 21:48, Harrington, Sean M. wrote:
> On 03.03.2014 20:16, Marc Kleine-Budde wrote:
>> On 03/03/2014 06:31 PM, Harrington, Sean M. wrote:
>>>>>> The Beaglebone Black should be running Ubuntu 13.04. I'm willing to
>>>>>> rebuild the kernel and install the latest distribution if I can some
>>>>>> feedback on the proper method to get SocketCAN functional and if it
>>>>>> would most likely resolve the issue.
>>>>
>>>>> Which Kernel version are you using?
>>>>
>>>> Here is what uname -a returned:
>>>> Linux arm 3.8.13-bone35 #2 SMP Sat Jan 4 10:18:07 PST 2014 armv7l armv7l armv7l GNU/Linux
>>>
>>> Your kernel is probably missing the following patch:
>>>
>>>> 5d0f801 can: c_can: Fix RX message handling, handle lost message before EOB
>>>
>>> You should update to at least the newest v3.10.x or v3.13.x. You might
>>> also cherry-pick the above patch into you kernel.
> 
>> Indeed two patches made it into linux-3.10.y stable:
>>
>> http://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/log/drivers/net/can/c_can?h=linux-3.10.y
>>
>> - "can: c_can: Fix RX message handling, handle lost message before EOB"
>> - "can: c_can: don't call pm_runtime_get_sync() from interrupt context"
>>
>> So applying these patches ...
>>
>> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=5d0f801a2ccec3b1fdabc3392c8d99ed0413d216
>> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=e35d46adc49b469fd92bdb64fea8af93640e6651
>>
>> to the 3.8.13 tree could help :-)
> 
> I appreciate the help everyone. This looks promising. On a side note though I've never done a kernel patch. Should I do a complete patch or is there a way for me to patch just the c_can file? I'm also assuming any of the linux-3.10.x patches will work such as this one: ftp://ftp.kernel.org/pub/linux/kernel/v3.x/linux-3.10.32.tar.xz
> 
> Perhaps the applying patches documentation is throwing me off a bit. I thought patching 3.8 files to 3.10 wouldn't work since the fixes are incremental and 3.X to 3.Y is a large jump? 

Hello Sean,

if you have your 3.8.13-bone35 kernel on your box and you managed to compile
this kernel on your own and successfully booted your self compiled kernel,
then it's no problem at all.

In the URLs above there's a link called "(patch)" which allows you to
download JUST THIS specific patch, which indeed only patches c_can.c to
fix the potential issue.

Download the above patch to a file:

E.g. use "Save Link as ..." for the "(patch)"
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/patch/?id=5d0f801a2ccec3b1fdabc3392c8d99ed0413d216

which creates a file 5d0f801a2ccec3b1fdabc3392c8d99ed0413d216.patch

Then go to your linux 3.8.13-bone35 source tree (where you can see the
MAINTAINERS file in the directory) and say:

patch -p1 < ../Downloads/5d0f801a2ccec3b1fdabc3392c8d99ed0413d216.patch

Then your c_can.c file is fixed.

Recompile the kernel and boot the kernel (and the updated modules!).

Regards,
Oliver


  reply	other threads:[~2014-03-04  6:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-03 16:26 C-Can or Other SocketCAN Issue Harrington, Sean M.
2014-03-03 16:36 ` Marc Kleine-Budde
     [not found]   ` <4179fe0897d74eccba72d6c9ba63694c@BN1PR01MB071.prod.exchangelabs.com>
2014-03-03 17:31     ` Harrington, Sean M.
2014-03-03 19:16       ` Marc Kleine-Budde
2014-03-03 19:37         ` Oliver Hartkopp
2014-03-03 20:48           ` Harrington, Sean M.
2014-03-04  6:53             ` Oliver Hartkopp [this message]
2014-03-05  1:10               ` Harrington, Sean M.

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=53157887.1040000@hartkopp.net \
    --to=socketcan@hartkopp.net \
    --cc=harrington.234@buckeyemail.osu.edu \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    /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).