2011/11/15 Wolfgang Grandegger <[email protected]>: > On 11/14/2011 04:57 PM, Willy Lambert wrote: >> 2011/11/14 Wolfgang Grandegger <[email protected]>: >>> On 11/14/2011 03:51 PM, Willy Lambert wrote: >>>> 2011/11/14 Wolfgang Grandegger <[email protected]>: >>>>> 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 <[email protected]>: >>>>>>>> 2011/11/12 Wolfgang Grandegger <[email protected]>: >>>>>>>>> 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 ... >
all this is working. > Similar tests on a x86_64 system and with a recent kernel version would > be nice to have. > > Thanks, This is not possible a present time, I don't have any 64b img to put on my board and I don't have the time to create a new one. Sorry. > > Wolfgang. > > _______________________________________________ Socketcan-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/socketcan-users
