From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Anders Blomdell <anders.blomdell@control.lth.se>
Cc: "Xenomai@xenomai.org" <Xenomai@xenomai.org>
Subject: Re: [Xenomai] xenomai-3/next: modprobe rtpacket fails with -EINVAL
Date: Thu, 5 Feb 2015 12:50:20 +0100 [thread overview]
Message-ID: <20150205115020.GA32156@hermes.click-hack.org> (raw)
In-Reply-To: <54D350CA.90801@control.lth.se>
On Thu, Feb 05, 2015 at 12:15:22PM +0100, Anders Blomdell wrote:
> AFAICT there are two ways to fix it, either change kernel/cobalt/rtdm/device.c:
>
> if (drv->device_count <= 0)
> return -EINVAL;
> to:
> if (drv->device_count <= 0 ||
> (drv->device_count == 0 &&
> (drv->device_flags & RTDM_DEVICE_TYPE_MASK) != RTDM_PROTOCOL_DEVICE)))
> return -EINVAL;
>
> or change kernel/drivers/net/stack/packet/af_packet.c:
>
> static struct rtdm_driver packet_proto_drv = {
> .profile_info = RTDM_PROFILE_INFO(packet,
> RTDM_CLASS_NETWORK,
> RTDM_SUBCLASS_RTNET,
> RTNET_RTDM_VER),
> .device_flags = RTDM_PROTOCOL_DEVICE,
> .context_size = sizeof(struct rtsocket),
> ...
> }
>
> to:
>
> static struct rtdm_driver packet_proto_drv = {
> .profile_info = RTDM_PROFILE_INFO(packet,
> RTDM_CLASS_NETWORK,
> RTDM_SUBCLASS_RTNET,
> RTNET_RTDM_VER),
> .device_flags = RTDM_PROTOCOL_DEVICE,
> .device_count = 1,
> .context_size = sizeof(struct rtsocket),
> ...
> }
>
> Since the second change is what 'rtdm_driver raw_packet_proto_drv', and the code looks
> prettier, I guess that the second way is the preferred one?
I received a patch for this issue, I simply need to merge it. Thanks
for the reminder.
--
Gilles.
next prev parent reply other threads:[~2015-02-05 11:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-05 11:15 [Xenomai] xenomai-3/next: modprobe rtpacket fails with -EINVAL Anders Blomdell
2015-02-05 11:50 ` Gilles Chanteperdrix [this message]
2015-02-05 13:59 ` Anders Blomdell
2015-02-05 14:03 ` 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=20150205115020.GA32156@hermes.click-hack.org \
--to=gilles.chanteperdrix@xenomai.org \
--cc=Xenomai@xenomai.org \
--cc=anders.blomdell@control.lth.se \
/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.