On 09/23/2010 03:42 PM, David Jander wrote:
> On Thursday 23 September 2010 02:50:41 pm Marc Kleine-Budde wrote:
>> wOn 09/23/2010 10:29 AM, [email protected] wrote:
>>> From: David Jander <[email protected]>
>>>
>>> This patch drastically reduces the amount of SPI transactions needed in
>>> the ISR of the driver. This can have a significant performance impact.
>>
>> My git has found a trailing whitespace (see inline).
> 
> Ooops. Sorry, must have looked over it.
> Will fix it, but I'll rather wait with re-supmitting if you have more 
> feedback 
> from you test.

I've tested your first patch, not the second as I'm concentrating on the
RX for now. For multiple TX buffers we need proper buffer priorities,
though.

I'm using our 2.6.36-rc4 (the protonic/master) on MX35 with a mcp2515, 2
MHz SPI clock, currently using 250kbit on th CAN-bus.

Without your patch the RX of a single message (dlc doesn't matter) takes
19..20 SPI interrupts. I can receive 2 messages (with dlc==1)
back-to-back without loosing one. The third one just gets lost.

When trying to receive 6 messages I see something quite strange: The
CAN-ID should be always "2", the dlc "1" and the data should be increasing.

CAN-ID  dlc data

<0x002> [1] 00
<0x002> [1] 01
<0x002> [1] 03
<0x002> [1] 04
<0x000> [8] 00 00 00 00 00 00 00 00

The last frame looks quite broken. I haven't debugged the problem yet.

I've done this test with the pengutronix's can-utils. On the sending side:
        cansequence -p --loop=6
On the rx side:
        candump


With your patch it's 8 interrupts per message. And with the improvement
you talked about on the phone, i.e. 2515 clears the RX flag
automatically, I managed to get it down to 7. But I get still this
strage 8 byte long can message, although it takes much more messages to
trigger that problem.

cheers and good night,
Marc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Socketcan-core mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-core

Reply via email to