All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Huy Cong Vu <huy-cong.vu@wandercraft.eu>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai] Patch rtnet support Intel i217/i218 Ethernet Controller
Date: Tue, 10 Feb 2015 13:26:57 +0100	[thread overview]
Message-ID: <20150210122657.GG3200@hermes.click-hack.org> (raw)
In-Reply-To: <591131357.26954.1423565161829.JavaMail.zimbra@wandercraft.eu>

On Tue, Feb 10, 2015 at 11:46:01AM +0100, Huy Cong Vu wrote:
> 
> 
> ----- Mail original -----
> > De: "Huy Cong Vu" <huy-cong.vu@wandercraft.eu>
> > À: "Gilles Chanteperdrix" <gilles.chanteperdrix@xenomai.org>
> > Cc: xenomai@xenomai.org
> > Envoyé: Mardi 27 Janvier 2015 17:11:40
> > Objet: Re: [Xenomai] Patch rtnet support Intel i217/i218 Ethernet Controller
> 
> > ----- Mail original -----
> >> De: "Gilles Chanteperdrix" <gilles.chanteperdrix@xenomai.org>
> >> À: "Huy Cong Vu" <huy-cong.vu@wandercraft.eu>
> >> Cc: xenomai@xenomai.org
> >> Envoyé: Mardi 27 Janvier 2015 17:00:45
> >> Objet: Re: [Xenomai] Patch rtnet support Intel i217/i218 Ethernet Controller
> > 
> >> On Tue, Jan 27, 2015 at 04:54:39PM +0100, Huy Cong Vu wrote:
> >>> 
> >>> 
> >>> ----- Mail original -----
> >>> > De: "Gilles Chanteperdrix" <gilles.chanteperdrix@xenomai.org>
> >>> > À: "Huy Cong Vu" <huy-cong.vu@wandercraft.eu>
> >>> > Cc: xenomai@xenomai.org
> >>> > Envoyé: Mardi 27 Janvier 2015 16:39:03
> >>> > Objet: Re: [Xenomai] Patch rtnet support Intel i217/i218 Ethernet Controller
> >>> 
> >>> > On Tue, Jan 27, 2015 at 04:12:48PM +0100, Huy Cong Vu wrote:
> >>> >> Hello Xenomai group,
> >>> >> I recently run a test of rtnet on xenomai-3-next on my Intel NUC D54250WYK with
> >>> >> the Intel I218V Ethernet Controller.
> >>> >> It is patched on linux 3.14.17. Here I attached the patch to make rtnet work
> >>> >> with i217/i218 Intel family.
> >>> >> Also, I found out that in rtpacket module, the declaration of packet_proto_drv
> >>> >> lack of .device_count attribute, which makes the rtpacket & rtcap modules
> >>> >> unable to loaded ( -EINVAL is returned), so I merge it in my patch too.
> >>> >> I test on my system and all the following command is now working:
> >>> >> modprobe rtnet
> >>> >> modprobe rt_e1000e
> >>> >> modprobe rtpacket
> >>> >> modprobe rtcap
> >>> >> rtifconfig rteth0 up
> >>> >> ifconfig rteth0 up
> >>> >> ifconfig rteth0-mac up
> >>> >> But if I used the rteth0 interface, I can't unload rt_e1000e.
> >>> >> Could you take a look and see if anything is wrong, and if you find it useful,
> >>> >> merge it in your git repository.
> >>> >> Best regards,
> >>> > 
> >>> > In Xenomai 3, you need to deconfigure the interface before you try
> >>> > to unload it.
> >>> 
> >>> If I tried to turn off rteth0 interface after using it, I still can't unload
> >>> rt_e1000e.
> >>> For now, this work:
> >>> modprobe rt_e1000e
> >>> modprobe rtpacket
> >>> rtifconfig rteth0 up
> >>> rtifconfig rteth0 down
> >>> rmmod rt_e1000e
> >>> rmmod rtpacket
> >>> 
> >>> This doesn't work:
> >>> modprobe rt_e1000e
> >>> modprobe rtpacket
> >>> rtifconfig rteth0 up
> >>> //Send datagram through rteth0 interface
> >>> rtifconfig rteth0 down
> >>> rmmod rt_e1000e
> >>> 
> 
> This patch helps. 
> 
> diff --git a/kernel/drivers/net/stack/packet/af_packet.c b/kernel/drivers/net/stack/packet/af_packet.c
> index dd862fe..6a9f183 100644
> --- a/kernel/drivers/net/stack/packet/af_packet.c
> +++ b/kernel/drivers/net/stack/packet/af_packet.c
> @@ -456,6 +456,7 @@ rt_packet_sendmsg(struct rtdm_fd *fd, const struct msghdr *msg, int msg_flags)
>      }
>  
>   out:
> +    rtdev_dereference(rtdev);
>      return ret;
>  
>   err:
> 
> Now it seems ok to unload all modules for me.

Ok, will merge, thanks.

-- 
					    Gilles.


  reply	other threads:[~2015-02-10 12:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-27 15:12 [Xenomai] Patch rtnet support Intel i217/i218 Ethernet Controller Huy Cong Vu
2015-01-27 15:39 ` Gilles Chanteperdrix
2015-01-27 15:54   ` Huy Cong Vu
2015-01-27 16:00     ` Gilles Chanteperdrix
2015-01-27 16:11       ` Huy Cong Vu
2015-02-10 10:46         ` Huy Cong Vu
2015-02-10 12:26           ` Gilles Chanteperdrix [this message]
2015-02-11 20:23           ` Gilles Chanteperdrix
2015-02-11 20:22 ` Gilles Chanteperdrix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150210122657.GG3200@hermes.click-hack.org \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=huy-cong.vu@wandercraft.eu \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.