From: Wolfgang Grandegger <wg@grandegger.com>
To: Willy Lambert <lambert.willy@gmail.com>
Cc: "socketcan-users@lists.berlios.de"
<socketcan-users@lists.berlios.de>,
linux-can@vger.kernel.org
Subject: Re: [Socketcan-users] Using sja1000_isa on a 64b system
Date: Tue, 15 Nov 2011 09:06:45 +0100 [thread overview]
Message-ID: <4EC21D95.5070508@grandegger.com> (raw)
In-Reply-To: <CAKvQZ_24-FqBHcyZAtf+kR26TaU-Uhji50Q6uQUvOiM=txPCiQ@mail.gmail.com>
On 11/14/2011 04:57 PM, Willy Lambert wrote:
> 2011/11/14 Wolfgang Grandegger <wg@grandegger.com>:
>> On 11/14/2011 03:51 PM, Willy Lambert wrote:
>>> 2011/11/14 Wolfgang Grandegger <wg@grandegger.com>:
>>>> On 11/13/2011 08:31 PM, Wolfgang Grandegger wrote:
>>>>> On 11/13/2011 10:15 AM, Willy Lambert wrote:
>>>>>> 2011/11/13 Willy Lambert <lambert.willy@gmail.com>:
>>>>>>> 2011/11/12 Wolfgang Grandegger <wg@grandegger.com>:
>>>>>>>> On 11/12/2011 10:08 PM, Wolfgang Grandegger wrote:
>>>>>>>>> On 11/12/2011 10:55 AM, Willy Lambert wrote:
>>>>>>>> ...
>>>>>>>>>>> I failed to apply the patch, is it for 2.6.38.8 kernels ?
>>>>>>>>>
>>>>>>>>> No, it's for up-to-date *mainline* linux version 3.1.x. Any chance to
>>>>>>>>> switch to David Miller's "net-nex-2.6" tree?. Otherwise I'm going to
>>>>>>>>> adapt the patch to 2.6.38.8.
>>>>>>>>
>>>>>>>> Well, the patch also applies to 2.6.38.8. Maybe you have some problems
>>>>>>>> extracting the patch. Therefore I have attached it as attachment this
>>>>>>>> time. Good luck.
>>>>>>>
>>>>>>> It's ok now :
>>>>>>> ard@ard-host:~/src/linux-2.6.38.8$ patch -p1 < wg_platform.patch
>>>>>>> patching file drivers/net/can/sja1000/Kconfig
>>>>>>> patching file drivers/net/can/sja1000/sja1000_isa.c
>>>>>>>
>>>>>>> I must have done something wrong. I am going to test it now
>>>>>>>
>>>>>>
>>>>>> arg, it doesn't compile I had a look a sources but I don't see the error :
>>>>>>
>>>>>> CC [M] drivers/xenomai/can/rtcan_raw_dev.o
>>>>>> drivers/net/can/sja1000/sja1000_isa.c: In function ‘sja1000_isa_init’:
>>>>>> drivers/net/can/sja1000/sja1000_isa.c:297: error: invalid storage
>>>>>> class for function ‘sja1000_isa_exit’
>>>>>> drivers/net/can/sja1000/sja1000_isa.c:296: warning: ISO C90 forbids
>>>>>> mixed declarations and code
>>>>>> drivers/net/can/sja1000/sja1000_isa.c:307: error: invalid storage
>>>>>> class for function ‘__inittest’
>>>>>> drivers/net/can/sja1000/sja1000_isa.c:307: warning: ‘alias’ attribute ignored
>>>>>> drivers/net/can/sja1000/sja1000_isa.c:308: error: invalid storage
>>>>>> class for function ‘__exittest’
>>>>>> drivers/net/can/sja1000/sja1000_isa.c:308: warning: ISO C90 forbids
>>>>>> mixed declarations and code
>>>>>> drivers/net/can/sja1000/sja1000_isa.c:308: warning: ‘alias’ attribute ignored
>>>>>> drivers/net/can/sja1000/sja1000_isa.c:308: error: expected declaration
>>>>>> or statement at end of input
>>>>>> make[5]: *** [drivers/net/can/sja1000/sja1000_isa.o] Error 1
>>>>>
>>>>> Argh, a "}" is missing, sorry. I will test the patch more carefully
>>>>> before re-sending.
>>>>
>>>> See attachment.
>>>
>>> Thanks, the compilation is now ok, but when I load them on my target I
>>> have this in dmesg :
>>> CAN device driver interface
>>> sja1000 CAN netdevice driver
>>> sja1000_isa: insufficient parameters supplied
>>>
>>> The loading command is :
>>> modprobe sja1000_isa irq=10,10 mem=0xD0000,0xD0200 ocr=0x5e,0x5e cdr=0,0
>>> And I am sure it is the same than before, so I think there is a
>>> problem when you read the parameters
>>
>> Again, my fault., sorry
>
> Don't be sorry, it is dev aleas and I am glad to have your time for
> this feature :)
>
>> Could you please retry with the attached patch.
>
> It seems to work :
> CAN device driver interface
> sja1000 CAN netdevice driver
> sja1000_isa sja1000_isa.0: sja1000_isa device registered
> (reg_base=0xc00d0000, irq=10)
> sja1000_isa sja1000_isa.1: sja1000_isa device registered
> (reg_base=0xc00d0200, irq=10)
> Legacy sja1000_isa driver for max. 8 devices registered
> sja1000_isa sja1000_isa.0: setting BTR0=0x00 BTR1=0x14
> sja1000_isa sja1000_isa.1: setting BTR0=0x00 BTR1=0x14
>
>
> I did :
> cansend can1 000#81.00
> cansend can1 000#01.00
>
> My device "Operationnal" Led switch state and candump tells :
> (1321289653.149877) can1 0 [2] 81 00 '..'
> (1321289653.177209) can1 705 [1] 00 '.'
> (1321289653.177267) can1 706 [1] 00 '.'
> (1321289660.349837) can1 0 [2] 01 00 '..'
> (1321289660.350785) can1 186 [2] 00 00 '..'
> (1321289660.350846) can1 185 [2] 02 00 '..'
>
>
> Do you wish any further tests ?
Does the following command work as well?
modprobe sja1000_isa irq=10,10 mem=0xD0000,0xD0200 ocr=0x5e cdr=0
Does re-loading of the driver work properly?
rmmod sja1000_isa; insmod sja1000_isa ...
Similar tests on a x86_64 system and with a recent kernel version would
be nice to have.
Thanks,
Wolfgang.
next prev parent reply other threads:[~2011-11-15 8:06 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAKvQZ_3HSdfOn4xGq7j8GsWJ+iHVan0Ygr=tR+cQm-tpQQWV2A@mail.gmail.com>
[not found] ` <4E4CA945.7080504@hartkopp.net>
[not found] ` <4E4CC9D5.6040708@pengutronix.de>
[not found] ` <CAKvQZ_0raVFUsCFYA2FVH_138DCMw6ipKHdz=Dh62K4YpM5o=Q@mail.gmail.com>
[not found] ` <4E5CCAA5.4030009@grandegger.com>
[not found] ` <CAKvQZ_0TFUd4FwOvr4AXArviMYPGHH6Xex4Cjy7LxYoEuBUpxA@mail.gmail.com>
[not found] ` <4E6271CD.6040407@grandegger.com>
[not found] ` <CAKvQZ_2PyM5zo5-4PtrMGjMEML3j02MKCCJU=zpnkSK2N_XUjg@mail.gmail.com>
[not found] ` <4E64B6CB.8010505@grandegger.com>
[not found] ` <CAKvQZ_1gp9XvVmh+ZEUdEVz2TrvkhHtVKc20ViNgSx=uuPWajQ@mail.gmail.com>
[not found] ` <4E653775.4030503@grandegger.com>
[not found] ` <4E653775.4030503-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
2011-11-09 18:03 ` Using sja1000_isa on a 64b system Willy Lambert
2011-11-09 18:05 ` Fwd: [Socketcan-users] " Willy Lambert
2011-11-10 8:36 ` Wolfgang Grandegger
[not found] ` <4EBB8CFD.3050602-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
2011-11-10 8:39 ` Willy Lambert
[not found] ` <CAKvQZ_1A5H_wDjnmvd5bDmtXvAyL3XNy6HesPR6jGzisoUe8eA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-11-10 8:48 ` Wolfgang Grandegger
[not found] ` <4EBB8FDC.40704-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
2011-11-10 10:58 ` Willy Lambert
2011-11-12 9:27 ` Willy Lambert
[not found] ` <CAKvQZ_3d=2-0+RrxkjCe7Nxvtgn42uYOS4f4B7_6TmaxEji7UQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-11-12 9:55 ` Willy Lambert
2011-11-12 21:08 ` [Socketcan-users] " Wolfgang Grandegger
[not found] ` <4EBEE043.6070601-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
2011-11-12 21:15 ` Wolfgang Grandegger
2011-11-13 8:42 ` [Socketcan-users] " Willy Lambert
[not found] ` <CAKvQZ_1QmJAPUZAEvV-2FSo2HR4byApoEqWPnOts9up90U4BVg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-11-13 9:15 ` Willy Lambert
[not found] ` <CAKvQZ_3anOf1SbE5TK6gvJf4v3gw1MBae0hw5JGr__szt7KoQQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-11-13 19:31 ` Wolfgang Grandegger
2011-11-14 9:51 ` [Socketcan-users] " Wolfgang Grandegger
[not found] ` <4EC0E4BE.4010101-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
2011-11-14 14:51 ` Willy Lambert
[not found] ` <CAKvQZ_2GkTqFrp-9quut0f33KL9tdD9NSTZ3btDHLZNP=a2VwQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-11-14 15:19 ` Wolfgang Grandegger
[not found] ` <4EC13191.6070901-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
2011-11-14 15:57 ` Willy Lambert
2011-11-15 8:06 ` Wolfgang Grandegger [this message]
[not found] ` <4EC21D95.5070508-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
2011-11-15 12:28 ` Willy Lambert
[not found] ` <CAKvQZ_2YrdYiq1_wge1zgyyDQws4+mn02+iZ-E5jgaqTma_3dw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-11-15 12:36 ` Wolfgang Grandegger
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=4EC21D95.5070508@grandegger.com \
--to=wg@grandegger.com \
--cc=lambert.willy@gmail.com \
--cc=linux-can@vger.kernel.org \
--cc=socketcan-users@lists.berlios.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).