> -----Original Message----- > From: Marc Kleine-Budde [mailto:mkl@xxxxxxxxxxxxxx] > Sent: Monday, July 30, 2018 8:16 PM > To: Pankaj Bansal <pankaj.bansal@xxxxxxx>; linux-can@xxxxxxxxxxxxxxx > Subject: Re: [PATCH 6/6] net: can: flexcan: use CAN FD frames for Tx/Rx > > On 07/30/2018 06:07 PM, Pankaj Bansal wrote: > > Use can FD frames for Tx/Rx operations. This would be needed in > > upcoming SOC LX2160A, which supports CAN FD protocol > > Have you tested this with a CAN-2.0 compatible controller? Does the > userspace still work as expected if you pass CAN_RAW a CAN-FD frames > which only carries CAN-2.0? See > https://elixir.bootlin.com/linux/latest/source/net/can/raw.c#L811 I have tested this using cangen command to generate CAN 2.0 frames, in LS1021A-TWR board. # ip link set can0 up type can bitrate 125000 [ 103.699095] IPv6: ADDRCONF(NETDEV_CHANGE): can0: link becomes ready # ip link set can1 up type can bitrate 125000 [ 107.832078] IPv6: ADDRCONF(NETDEV_CHANGE): can1: link becomes ready # candump can0 & # candump can1 & # cangen -e can0 -n 10 can0 14603885 [8] 80 ED 5D 67 9A D9 54 67 can1 14603885 [08] 80 ED 5D 67 9A D9 54 67 can0 1FA9F7B2 [2] A9 C2 can1 1FA9F7B2 [02] A9 C2 can0 1ACFD3E8 [7] 31 1E DB 00 2A 92 A4 can1 1ACFD3E8 [07] 31 1E DB 00 2A 92 A4 can0 09F14CC0 [8] EF D7 27 30 E5 D1 DF 49 can1 09F14CC0 [08] EF D7 27 30 E5 D1 DF 49 can0 052A1A18 [4] AD 7D 7E 2F can1 052A1A18 [04] AD 7D 7E 2F can0 1B9A983E [2] BE FB can1 1B9A983E [02] BE FB can0 0863E2EE [8] AA 88 84 50 84 18 49 52 can1 0863E2EE [08] AA 88 84 50 84 18 49 52 can1 0B322BC3 [05] 2B 4D B7 2E 48 can0 0B322BC3 [5] 2B 4D B7 2E 48 can0 0720BEAE [8] E3 3D E7 26 60 B6 CA 46 can1 0720BEAE [08] E3 3D E7 26 60 B6 CA 46 can0 0470E1AE [8] F7 17 D8 2F 96 B5 40 1F can1 0470E1AE [08] F7 17 D8 2F 96 B5 40 1F # cangen -R can0 -n 10 can0 149 [8] remote request can1 149 [08] F7 17 D8 2F 96 B5 40 1F can0 2FE [7] remote request can1 2FE [07] F7 17 D8 2F 96 B5 40 can1 2C0 [00] can0 2C0 [0] remote request can0 68A [4] remote request can1 68A [04] F7 17 D8 2F can0 0AB [8] remote request can1 0AB [08] F7 17 D8 2F 96 B5 40 1F can0 201 [2] remote request can1 201 [02] F7 17 can0 166 [1] remote request can1 166 [01] F7 can0 439 [8] remote request can1 439 [08] F7 17 D8 2F 96 B5 40 1F can0 4F9 [8] remote request can1 4F9 [08] F7 17 D8 2F 96 B5 40 1F can0 303 [8] remote request can1 303 [08] F7 17 D8 2F 96 B5 40 1F # cangen can0 -n 10 can0 074 [7] A0 A9 96 03 6A 71 E6 can1 074 [07] A0 A9 96 03 6A 71 E6 can0 2DD [3] FD 22 84 can1 2DD [03] FD 22 84 can0 45E [8] 84 92 27 7D 02 D4 B6 20 can1 45E [08] 84 92 27 7D 02 D4 B6 20 can0 2C6 [8] AD 47 12 23 4D 86 F2 05 can1 2C6 [08] AD 47 12 23 4D 86 F2 05 can1 7C3 [05] D5 91 AD 0F 39 can0 7C3 [5] D5 91 AD 0F 39 can0 652 [8] 3B BC 64 79 D8 7C 1C 4E can1 652 [08] 3B BC 64 79 D8 7C 1C 4E can0 255 [8] 25 D6 1C 44 2F 62 D5 17 can1 255 [08] 25 D6 1C 44 2F 62 D5 17 can0 417 [8] 4B 87 05 72 8B F4 AB 6C can1 417 [08] 4B 87 05 72 8B F4 AB 6C can0 320 [8] F6 65 92 5A FE 2D AD 3F can1 320 [08] F6 65 92 5A FE 2D AD 3F can0 11F [3] BC 41 9C can1 11F [03] BC 41 9C # cangen -f can0 -n 10 CAN interface is not CAN FD capable - sorry. # cangen -b can0 -n 10 CAN interface is not CAN FD capable - sorry. # > > 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 | ��.n��������+%������w��{.n�����{����*jg��������ݢj����G�������j:+v���w�m������w�������h�����٥