All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: romain.perier@scle.fr
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai] RTNET
Date: Tue, 14 Apr 2015 09:34:54 +0200	[thread overview]
Message-ID: <20150414073454.GA1589@hermes.click-hack.org> (raw)
In-Reply-To: <299A38B133279A4EBA47BCB60993FEAF858030C89D@xs203433.MELINDA.LOCAL>

On Tue, Apr 14, 2015 at 09:17:59AM +0200, romain.perier@scle.fr wrote:
> Hi all,
> 
> We're deploying Xenomai 3.0-rc4 (3.16.7 mainline kernel, in dual-kernel
> mode) on a Zynq ZC702. Everything works fine except when we try to use
> ethernet in the xenomai mode. The driver is called "macb" and it is
> already ported to RTDM. macb is correctly loaded and initialized, the
> mac controller is correctly connected to the phy, BUT, when I play a bit
> with rtifconfig , the systems hangs.
> 
> # rtifconfig rteth0 up
>  [  495.846877] macb e000b000.ethernet eth0: link up (1000/Full)
>  # and now everything is freezed (only when the cable is plugged)
> 
> After some investigations, if I disable the call to rtdm_irq_request(),
> the systems no longer freezes. So, It seems to be an issue caused by
> interrupts handling.
> I use the devicetree to tells to linux which driver I want to use for
> the corresponding mac controller, I just change the "compatible" string.
> I renamed xeno-macb compatible string to "cdns,rtgem" instead of
> "cdns,gem" .In this way I can use the first mac controller in linux and
> the second one in xenomai, each one with a different device driver. Both
> interrupts are from Cortex-A9 GIC.
> (I already tested to use only one mac controller at a time, same problem)

This is a bad way to use devicetree go, the devicetree is a
description of the hardware, not of the software handling it, so the
rtnet driver should use exactly the same compatible device as linux
driver. If you need to bind a device to a driver, use the
bind/unbind files in the /sys filesystem:
https://lwn.net/Articles/143397/


> 
> I have two questions :
> 
> 1. Have you any ideas about the problem described above ?

No, the macb driver has been tested on AT91, and was working. Have
you tried loading rtipv4 and passing an IP address to rtifconfig (in
that order)?

> 2. I was wondering, if it is possible to use ethernet from a xenomai
> application without rtdm and rtnet. in other words, it is possible to
> use linux device driver from xenomai mode ? (if it is possible,
> I guess that my application will switch from the primary mode to the
> secondary mode very often, no?)

Question contains a contradiction: if you want to use an ethernet
from xenomai (or primary) mode, then obviously, there is no way
around an RTDM driver. If you want to use Linux IP stack from
secondary mode, then obviously, yes, it should work.

-- 
					    Gilles.


  reply	other threads:[~2015-04-14  7:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-14  7:17 [Xenomai] RTNET romain.perier
2015-04-14  7:34 ` Gilles Chanteperdrix [this message]
2015-04-14  8:04   ` Gilles Chanteperdrix
2015-04-14  8:15   ` romain.perier
2015-10-03 12:29     ` Gilles Chanteperdrix
  -- strict thread matches above, loose matches on Subject: below --
2018-02-28 14:13 [Xenomai] RTnet Шевченко Тарас Григорьевич
2018-02-28 15:01 ` Greg Gallagher
     [not found]   ` <429130936.8886425.1519831182179.JavaMail.zimbra@triolcorp.com.ua>
2018-02-28 15:33     ` Greg Gallagher
     [not found]       ` <1139048827.8910394.1519833759993.JavaMail.zimbra@triolcorp.com.ua>
2018-02-28 16:37         ` Greg Gallagher
2018-02-28 16:46           ` Шевченко Тарас Григорьевич
2018-02-28 16:55             ` Greg Gallagher
2018-02-28 17:15               ` Шевченко Тарас Григорьевич
2018-02-28 17:16                 ` Greg Gallagher

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=20150414073454.GA1589@hermes.click-hack.org \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=romain.perier@scle.fr \
    --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.