Major progress! I can get messages through can0 now, I'll look at can1
later. But I'm not sure I understand the fix!

The problem as I see it is that the mcp251x driver requests a falling
edge triggered interrupt but function gpio_irq_type() (in gpio.c)
doesn't allow that for some reason.

The (temporary?) fix is to make gpio_irq_type() accept
IRQ_TYPE_EDGE_FALLING as well, but I suspect that will blow other stuff
out of the water.

What would be the best way to fix this properly?

Cheers
John


> -----Original Message-----
> From: [email protected]
[mailto:socketcan-users-
> [email protected]] On Behalf Of Ansell, John
> Sent: 24 August 2011 07:09
> To: [email protected]
> Subject: Re: [Socketcan-users] Need help starting socketCAN
> 
> Hi Ulrich,
> 
> I get the same errors with either method.
> 
> Only difference is the final message, instead of RNETLINK moaning,
> ifconfig does:
> 
> setting trigger mode 2 for irq 157 failed (gpio_irq_type+0x0/0x2c)
> mcp251x spi0.1: failed to acquire irq 157
> ifconfig: SIOCSIFFLAGS: Invalid argument
> 
> Nice try, keep 'em coming!
> 
> Cheers
> 
> > -----Original Message-----
> > From: Ulrich Prinz [mailto:[email protected]]
> > Sent: 23 August 2011 23:39
> > To: Ansell, John
> > Subject: Re: [Socketcan-users] Need help starting socketCAN
> >
> > Hi!
> >
> > Could you try "ifconfig can0 up" instead of the ip tool?
> >
> > I had the same thing, ip tool works fine for the configuration, but
> not
> > for starting/stopping it. My scripts now use this configuration and
I
> > never checked again, if ip tool could do the job.
> >
> > Kind Regards
> > Ulrich
> >
> >
> >
> > On 23.08.2011 17:02, Ansell, John wrote:
> > > Some progress at last, thanks to Oliver and Rene!
> > >
> > > I built the ip tool from the 2.6.38 tag. Decided to ignore its
> > struggles with the misc directory and found that the ip tool does
> seem
> > to work. So, I can set the bitrate etc.
> > >
> > > On to the next problem...
> > >
> > > When I try to bring the interface up (ip link set can0 up) I get
> two
> > error messages:
> > > "setting trigger mode 2 for irq 157 failed
> (gpio_irq_type+0x0/0x2c)"
> > and
> > > "mcp251x spi0.1: failed to acquire irq157"
> > > RNETLINK answers: Invalid argument
> > >
> > > Now, 157 corresponds to port D pin 29 which is where the irq is
> wired
> > to. So I guess the fault may be in the board setup.
> > >
> > > Any ideas guys?
> > >
> 
> _______________________________________________
> Socketcan-users mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/socketcan-users
_______________________________________________
Socketcan-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-users

Reply via email to