All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] rtcan_flexcan on a i.MX28 board
@ 2013-11-27 17:32 Alexandre COFFIGNAL
  2013-11-27 20:02 ` Wolfgang Grandegger
  0 siblings, 1 reply; 2+ messages in thread
From: Alexandre COFFIGNAL @ 2013-11-27 17:32 UTC (permalink / raw)
  To: xenomai

Hi all.

I'm trying to use rtcan_flexcan on a i.MX28 board with Xenomai 2.6.3 
under Linux v3.8.13.
I use a dtb file and it seem to be a mistake in flexcan_probe function.

If flexcan device id is found in dtb, devtype_data points to the 
flexcan_id_table driver_data structure. In this case, the condition in 
flexcan_probe function (!devtype_data && pdev->id_entry->driver_data) 
will always fail and it will always return ENODEV, whereas devtype_data 
points to a valid value.

I submit this patch which fixes this issue

Best regards,
Alex.
-- 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xenomai-rtcan_flexcan-fix-devtype_data-initialization.patch
Type: text/x-patch
Size: 857 bytes
Desc: not available
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20131127/cade88f3/attachment.bin>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Xenomai] rtcan_flexcan on a i.MX28 board
  2013-11-27 17:32 [Xenomai] rtcan_flexcan on a i.MX28 board Alexandre COFFIGNAL
@ 2013-11-27 20:02 ` Wolfgang Grandegger
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Grandegger @ 2013-11-27 20:02 UTC (permalink / raw)
  To: Alexandre COFFIGNAL, xenomai

Hi Alexandre,

On 11/27/2013 06:32 PM, Alexandre COFFIGNAL wrote:
> Hi all.
> 
> I'm trying to use rtcan_flexcan on a i.MX28 board with Xenomai 2.6.3
> under Linux v3.8.13.
> I use a dtb file and it seem to be a mistake in flexcan_probe function.
> 
> If flexcan device id is found in dtb, devtype_data points to the
> flexcan_id_table driver_data structure. In this case, the condition in
> flexcan_probe function (!devtype_data && pdev->id_entry->driver_data)
> will always fail and it will always return ENODEV, whereas devtype_data
> points to a valid value.

I see the problem. It should be like in the Linux kernel:

http://lxr.linux.no/#linux/drivers/net/can/flexcan.c#L1041

> I submit this patch which fixes this issue

Could you please send your patch inline in a separate mail with the
subject "[PATCH] rtcan_flexcan: ...".  Apart from that, I your RTCAN
Flexcan driver working properly, I assume.

Wolfgang.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-11-27 20:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-27 17:32 [Xenomai] rtcan_flexcan on a i.MX28 board Alexandre COFFIGNAL
2013-11-27 20:02 ` Wolfgang Grandegger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.