On Sat, Sep 26, 2009 at 10:00 PM, Erik Calissendorff
<[email protected]> wrote:
> Hi I have tried to get the mcp251x driver to work with the Overo
> Gumstix for sometime now.
Hi,
> ------------[ cut here ]------------
> WARNING: at
> /home/plejd/overo-oe/tmp/work/overo-angstrom-linux-gnueabi/socketcan-modules-0.0+svnr1064-r45/trunk/kernel/2.6/drivers/net/can/mcp251x.c:840
> mcp251x_irq_work_handler+0x24c/0x5d0 [mcp251x]()
huh you added debugging lines so I don't know to which line in SVN
does 840 refer. Anyway the WARN_ON in that function can be triggered
only if the read from registers is not meaningful (for example tx done
when there is not tx pending). Or the cause may be a bug in the driver
of course.
BTW if you need to have entry and exit function information you should
definitely check ftrace.
Can you please just use SVN version with just the following patch:
Index: drivers/net/can/mcp251x.c
===================================================================
--- drivers/net/can/mcp251x.c (revision 1064)
+++ drivers/net/can/mcp251x.c (working copy)
@@ -243,6 +243,19 @@
ret = spi_sync(spi, &m);
if (ret < 0)
dev_err(&spi->dev, "%s: failed: ret = %d\n", __func__, ret);
+#if 1
+ {
+ int i;
+
+ printk("tx:");
+ for(i = 0; i < len; i++)
+ printk(" %02x", priv->spi_tx_buf[i]);
+ printk("rx:");
+ for(i = 0; i < len; i++)
+ printk(" %02x", priv->spi_rx_buf[i]);
+ printk("\n");
+ }
+#endif
return ret;
}
so I could be able to quickly tell you if SPI communications looks meaningful?
--
Christian Pellegrin, see http://www.evolware.org/chri/
"Real Programmers don't play tennis, or any other sport which requires
you to change clothes. Mountain climbing is OK, and Real Programmers
wear their climbing boots to work in case a mountain should suddenly
spring up in the middle of the computer room."
_______________________________________________
Socketcan-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-users