Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1460425
| From | Oliver Hartkopp <socketcan@hartkopp.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH RESEND] net: can: Introduce MEN 16Z192-00 CAN controller driver |
| Date | 2016-08-11 13:50 +0200 |
| Message-ID | <s4WEO-3hd-11@gated-at.bofh.it> (permalink) |
| References | (6 earlier) <s48yl-3Q0-11@gated-at.bofh.it> <s4Iiv-1wh-49@gated-at.bofh.it> <s4Srv-5i-5@gated-at.bofh.it> <s4TQB-1tP-9@gated-at.bofh.it> <s4U0i-1xh-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 08/11/2016 10:58 AM, Andreas Werner wrote:
> On Thu, Aug 11, 2016 at 10:45:00AM +0200, Oliver Hartkopp wrote:
>> When you still have the possibility to change the IP core I would suggest to
>> create some kind of 16/32 bit value which you can pass to the CAN controller
>> along with the CAN frame to be sent.
>>
>> And when this frame comes back due to the loopback you can use this non-zero
>> 16/32 bit value to match into a list of tx skb pointers for IFF_ECHO.
>>
>> E.g. when this 16/32 bit value is zero this CAN frame obviously was received
>> from another CAN node.
>>
>> Just an idea.
>>
>
> I am not sure if we have a way to change the IP but i will try to talk with
> my IC designer. He will be available next week.
>
> Your idea sounds good. I will check a few more driver to get more information
> how they did the implementation.
>
I just looked into your patch at
http://marc.info/?l=linux-can&m=146952497113100&w=2
The
struct men_z192_cf_buf {
u32 can_id;
u32 data[2];
u32 length;
};
has a u32 for the length which is masked by
#define MEN_Z192_CFBUF_LEN GENMASK(3, 0)
in men_z192_read_frame() and is just copied in men_z192_xmit()
writel(cf->can_dlc, &cf_buf->length);
as only 4 bits are used in the u32 length you probably already can use
the upper 16 bits for the discussed IFF_ECHO purpose.
Don't know how your IP core handles this u32 length when you enable the
loopback - maybe the upper 16 bits are still there in the receive path
and you can implement this idea directly :-)
Regards,
Oliver
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH RESEND] net: can: Introduce MEN 16Z192-00 CAN controller driver Andreas Werner <andreas.werner@men.de> - 2016-07-26 11:20 +0200
Re: [PATCH RESEND] net: can: Introduce MEN 16Z192-00 CAN controller driver Benjamin Poirier <benjamin.poirier@gmail.com> - 2016-08-08 06:00 +0200
Re: [PATCH RESEND] net: can: Introduce MEN 16Z192-00 CAN controller driver Andreas Werner <andreas.werner@men.de> - 2016-08-08 09:40 +0200
Re: [PATCH RESEND] net: can: Introduce MEN 16Z192-00 CAN controller driver Benjamin Poirier <benjamin.poirier@gmail.com> - 2016-08-09 05:30 +0200
Re: [PATCH RESEND] net: can: Introduce MEN 16Z192-00 CAN controller driver Andreas Werner <andreas.werner@men.de> - 2016-08-09 08:20 +0200
Re: [PATCH RESEND] net: can: Introduce MEN 16Z192-00 CAN controller driver Wolfgang Grandegger <wg@grandegger.com> - 2016-08-08 11:40 +0200
Re: [PATCH RESEND] net: can: Introduce MEN 16Z192-00 CAN controller driver Andreas Werner <andreas.werner@men.de> - 2016-08-08 13:50 +0200
Re: [PATCH RESEND] net: can: Introduce MEN 16Z192-00 CAN controller driver Wolfgang Grandegger <wg@grandegger.com> - 2016-08-08 14:30 +0200
Re: [PATCH RESEND] net: can: Introduce MEN 16Z192-00 CAN controller driver Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be> - 2016-08-08 15:30 +0200
Re: [PATCH RESEND] net: can: Introduce MEN 16Z192-00 CAN controller driver Andreas Werner <andreas.werner@men.de> - 2016-08-08 16:20 +0200
Re: [PATCH RESEND] net: can: Introduce MEN 16Z192-00 CAN controller driver Andreas Werner <andreas.werner@men.de> - 2016-08-08 16:10 +0200
Re: [PATCH RESEND] net: can: Introduce MEN 16Z192-00 CAN controller driver Wolfgang Grandegger <wg@grandegger.com> - 2016-08-08 16:40 +0200
Re: [PATCH RESEND] net: can: Introduce MEN 16Z192-00 CAN controller driver Andreas Werner <andreas.werner@men.de> - 2016-08-09 08:20 +0200
Re: [PATCH RESEND] net: can: Introduce MEN 16Z192-00 CAN controller driver Wolfgang Grandegger <wg@grandegger.com> - 2016-08-09 14:00 +0200
Re: [PATCH RESEND] net: can: Introduce MEN 16Z192-00 CAN controller driver Oliver Hartkopp <socketcan@hartkopp.net> - 2016-08-10 22:30 +0200
Re: [PATCH RESEND] net: can: Introduce MEN 16Z192-00 CAN controller driver Andreas Werner <andreas.werner@men.de> - 2016-08-11 09:20 +0200
Re: [PATCH RESEND] net: can: Introduce MEN 16Z192-00 CAN controller driver Oliver Hartkopp <socketcan@hartkopp.net> - 2016-08-11 10:50 +0200
Re: [PATCH RESEND] net: can: Introduce MEN 16Z192-00 CAN controller driver Andreas Werner <andreas.werner@men.de> - 2016-08-11 11:00 +0200
Re: [PATCH RESEND] net: can: Introduce MEN 16Z192-00 CAN controller driver Oliver Hartkopp <socketcan@hartkopp.net> - 2016-08-11 13:50 +0200
RE: [PATCH RESEND] net: can: Introduce MEN 16Z192-00 CAN controller driver Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com> - 2016-08-09 11:40 +0200
csiph-web