This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] fixes for at91 can driver


Hi,

I have two problems with can_at91sam7 driver when
try to use it with at91sam9263 cpu, but I suppose
the same problems should happened with at91sam7 also.

Problem 1.
If standard id parameter is on,
then I always receive messages with zero length.

The root of evil is that driver hold id and length
data in the same field of structure, and set id after
length, so it zeroize the length part of field.

See the first attached patch.

Problem 2.

If I call can_write several times without delay,
can controller actualy send only the first one message.
This is because of isr in can_at91sam7.c masks interrupt after
it occurs, and interrupt enabled only in start_xmit implementation,
start_xmit called only in can_write, so if messages copied
into internal buffer, only the first one will be send,
because of isr mask transmit notification interrupt,
and it never enabled, so no new isr, no new dsr.
But only can_at91sam7's dsr handler call can_xmt_msg, so no new
messages will be copied from internal buffer to can controller.

See the second attached patch.

-- 
/Evgeniy

Attachment: 0001-fix-dlc-always-zero-if-CYGOPT_IO_CAN_STD_CAN_ID-is.patch
Description: Text document

Attachment: 0002-fix-such-case.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]