Oliver Hartkopp wrote: > Pavel B. Cheblakov wrote: > >> Oliver Hartkopp wrote: >> >>> P.B.Cheblakov wrote: >>> >>> >>>> Hi! >>>> >>>> I have a some problem and need a help! >>>> We experiment with pulse device which is controlled via CAN. >>>> We use sja1000-based CAN-controller and BUG_ON take place periodically. >>>> I suppose that the pulse device generates breakthrough and sja1000 >>>> receives can-frame with can_dlc greater than 8. And it causes a BUG_ON >>>> in can_rcv function (af_can.c): >>>> BUG_ON(skb->len != sizeof(struct can_frame) || cf->can_dlc > 8); >>>> >>>> >>> Hi Pavel, >>> >>> we already changed the BUG_ON() to WARN_ONCE() in Linux Mainline: >>> >>> http://git.kernel.org/?p=linux/kernel/git/davem/net-2.6.git;a=commitdiff;h=1758c0947605211ef953cc91d6bbdf847a21b822 >>> >>> You may apply the patch to your Kernel also. >>> >>> >> Oh, thanks for the link! I'll patch my Kernel! >> I saw some discussions about this problem earlier, but proposed solution >> wasn't good for me (and, I think, wasn't right). >> > > As the above patch only turns the BUG_ON() into a WARN_ONCE() the received > frame is still dropped. > > Please apply the attached patch to your sja1000.c to see, if we get strange > values out of the SJA1000 here. The attached patch also reduces the dlc to 8 > if it's (illegally) greater than 8. > > You might need to use the '-p ..' option of the tool 'patch' to apply this. > I'll modify my sja1000.c in accordance with subsequent discussion, but this error is infrequent and unpredictable (at least now). > Do you have a 'real' Philips/NXP SJA1000 on your CEAxxx boards or is it a CAN > macro inside another FPGA/processor that only behaves like a SJA1000? > Yes, I have a real SJA1000 chip on TEWS TPMC810 cPCI-card. > Best regards, > Oliver > > ps. @Wolfgang: Should i send this attached patch also to netdev-ML? > >
_______________________________________________ Socketcan-core mailing list [email protected] https://lists.berlios.de/mailman/listinfo/socketcan-core
