Alexandre Vézina wrote: > Sorry for the "reply to all" problem.. > > On Tue, Oct 27, 2009 at 2:20 PM, Wolfgang Grandegger > <[email protected]>wrote: > >>>> Does this problem show up with CONFIG_CAN_DEV_SYSFS=y? >>>> >>> No actually it doesn't thanks. >>> >>> But I have another problem. Again I get a segfault while calling *rmmod*. >>> >>> I looked at the resource flags at different point in the code and I found >>> out that they were still ok at the end of the *init *function (but not in >>> exit or remove). >>> >>> So I did: >>> *modprobe tscan1 >>> echo 1000 > /sys/class/net/can0/tx_queue_len >>> echo 12500 > /sys/class/net/can0/can_bittiming/bitrate >>> ip link set can0 up type can* >>> >>> I then saw that the resource flags were set to a wrong value (like >>> 102840504) in the *write_reg *function (after setting the can0 >> interface). >>> Do you know what is happening between the end of *init* and the moment >> that >>> *write_reg *is called? >> >> static int __init tscan1_init(void) >> { >> int irq; >> void *reg_end; >> struct resource tscan1_res[2]; >> >> Shouldn't there be a "static" in front of "struct resource >> tscan1_res[2];". Does it fix your problem? >> > > Thanks a lot it worked, but can you explain (or point me what to look for > :P) why this struct needs to be declared static. I do not understand what is > wrong there so I don't know where to search... > > I tried can{ gen | dump }ing and it seems that write_reg is never called. > > Calling *ip link set can0 type can bitrate 125000* gives the output: > *RTNETLINK answers: Operation not supported* > > I am really confused about the role of RTNELINK vs iproute2 (compiled from > git if it can help). > > Here are the details and stats of the interface: > ip -details -statistics link show can0 > 7: can0: <LOOPBACK,NOARP,UP,LOWER_UP> mtu 16 qdisc pfifo_fast state UNKNOWN > qlen 1000 > link/can > RX: bytes packets errors dropped overrun mcast > 574016 71752 71752 0 0 0 > TX: bytes packets errors dropped carrier collsns > 0 0 0 0 0 0 > > Thank you very much
I just sent a patch fixing the oops when the device is registered with the netlink interface with subject: [PATCH] can: fix WARN_ON dump in net/core/rtnetlink.c:rtmsg_ifinfo() Please give it a try and don't use the deprecated SysFS interface. Wolfgang. _______________________________________________ Socketcan-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/socketcan-users
