From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?St=C3=A9phane_Reichert?= References: <004e01d43564$4970d4c0$dc527e40$@sepro-group.com> <007001d4361f$01d02010$05706030$@sepro-group.com> <346547f0-852d-ffe7-d1ff-f156db9a59d1@gmail.com> In-Reply-To: <346547f0-852d-ffe7-d1ff-f156db9a59d1@gmail.com> Date: Wed, 22 Aug 2018 10:24:31 +0200 (CEST) Message-ID: <00d201d439f1$8ccd3fb0$a667bf10$@sepro-group.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Language: fr Content-Transfer-Encoding: quoted-printable Subject: Re: [Xenomai] TR: RTNet - how to setup rt_fec on IMX6Q (Xenomai 3.0.7) List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Edouard Tisserant , xenomai@xenomai.org Hello Edouard, Thanks again for your patch. I tried it on my kernel, but unfortunately I am facing the same issue (ioctl: Resource temporarily unavailable error message on rtping). Best regards St=C3=A9phane -----Message d'origine----- De : Edouard Tisserant [mailto:edouard.tisserant@gmail.com] Envoy=C3=A9 : mardi 21 ao=C3=BBt 2018 23:19 =C3=80 : St=C3=A9phane Reichert; xenomai@xenomai.org Objet : Re: [Xenomai] TR: RTNet - how to setup rt_fec on IMX6Q (Xenomai=20 3.0.7) Hello St=C3=A9phane. I'm porting EtherLAB to Xenomai3 on Imx6, using RTNet instead of EtherLAB= =20 provided drivers. This is still work in progress, but the fec.c patch I have now may help. Find it attached. I built it last time on kernel 4.9.51 and xenomai 3.0.6. This is largely=20 untested, your feedback is welcome. Beware content of DTS for vanilla FEC from kernel 4.x may not be compatib= le=20 anymore with the one expected by FEC from RTnet. You may have to patch yo= u=20 DTS accordingly. Best regards, Edouard On 17/08/2018 13:39, St=C3=A9phane Reichert wrote: > Hello Philippe, > > I have noticed in the file fec.c that the function fec_enet_ioctl did > not match the prototype of do_ioctl (it looks like "request" and "arg" > parameters are switched). Is it a mistake ? > > (I tried to switch these parameters but it didn't solved my problem as > well). > > Stephane > > > -----Message d'origine----- > De : Philippe Gerum [mailto:rpm@xenomai.org] Envoy=C3=A9 : vendredi 17 = ao=C3=BBt > 2018 > 10:28 =C3=80 : St=C3=A9phane Reichert; xenomai@xenomai.org Objet : Re: = [Xenomai] > RTNet - how to setup rt_fec on IMX6Q (Xenomai 3.0.7) > > On 08/16/2018 03:23 PM, St=C3=A9phane Reichert wrote: >> Hello, >> >> >> >> We are trying to use the rt_fec driver for RTNet on a iMX6Q board. >> >> >> >> I have patched the KConfig to add this driver on buildroot and it >> compiles perfectly. >> >> >> >> But now, I am not able to use it on our board (it works when I =E2=80=9C= rtping=E2=80=9D >> the loopback, >> >> but it doesn=E2=80=99t work if I try to ping an external board). > The fec driver does not seem to tell the stack about the carrier > enable state. If so, you may want to try the following patch: > > diff --git a/kernel/drivers/net/drivers/fec.c > b/kernel/drivers/net/drivers/fec.c > index 36870ba16..d94ec690f 100644 > --- a/kernel/drivers/net/drivers/fec.c > +++ b/kernel/drivers/net/drivers/fec.c > @@ -1323,6 +1323,7 @@ fec_enet_open(struct rtnet_device *ndev) > return ret; > } > phy_start(fep->phy_dev); > + rtnetif_carrier_on(ndev); > rtnetif_start_queue(ndev); > fep->opened =3D 1; > return 0; > > -- > Philippe. > > _______________________________________________ > Xenomai mailing list > Xenomai@xenomai.org > https://xenomai.org/mailman/listinfo/xenomai