netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Francois Romieu <romieu@fr.zoreil.com>
To: glenn_engel@agilent.com
Cc: netdev@vger.kernel.org, jgarzik@pobox.com
Subject: Re: natsemi.c ioctl fix or mii register access
Date: Fri, 16 May 2008 22:57:05 +0200	[thread overview]
Message-ID: <20080516205705.GA19586@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <010200463BAAFF45926C5BFD8E21F515F523F0@cos-us-mb01.cos.agilent.com>

(please shorten your lines below 80 cols)

glenn_engel@agilent.com <glenn_engel@agilent.com> :
[...]
> The specific problems noted and fixed:
> 
> 1. The if_mii macro casts it's return to be (struct mii_ioctl_data *) but
> in reality it returns a pointer to the user space pointer (struct
> mii_ioctl_data**).   This looks to be a problem with the mii_macro to me.
> I changed this to use the ifr_data macro instead.

Which user space application did you read the source of ?

Afaiks the kernel side looks very similar to any usual network device
driver ioctl.

> 2. Since the mii_ioctl_data structure resides in user space, it must be
> copied into kernel space before access and copied back for read results.

Is not it what net/core/dev.c::dev_ioctl does.

-- 
Ueimor

  reply	other threads:[~2008-05-16 21:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-15 23:23 natsemi.c ioctl fix or mii register access glenn_engel
2008-05-16 20:57 ` Francois Romieu [this message]
2008-05-22 18:04 ` Jeff Garzik
2008-05-22 18:46   ` glenn_engel
2008-05-24 10:04     ` Francois Romieu
2008-05-27 16:29       ` glenn_engel

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=20080516205705.GA19586@electric-eye.fr.zoreil.com \
    --to=romieu@fr.zoreil.com \
    --cc=glenn_engel@agilent.com \
    --cc=jgarzik@pobox.com \
    --cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).