All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: renjun wang <renjunw0@foxmail.com>
Cc: hkallweit1@gmail.com, linux@armlinux.org.uk,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: phy: update fields of mii_ioctl_data for transferring C45 data.
Date: Sat, 20 Apr 2024 16:17:50 +0200	[thread overview]
Message-ID: <01d9fc07-ffaf-4353-b4b2-d7fcaa146024@lunn.ch> (raw)
In-Reply-To: <tencent_78F3412B4E523FEC8F19FADAC32475318706@qq.com>

On Sat, Apr 20, 2024 at 08:41:10AM +0800, renjun wang wrote:
> The phy_id is used as u32 type in function mdio_phy_id_is_c45()
> with the 30th bit for distinguishing C22 and C45. The reg_num is
> also used as u32 type in function mdiobus_c45_read() or someplace
> else. For more C45 information needed and data structure alignment
> consideration, change these two fields to __u32 type which can make
> user space program transferring clause 45 type information to kernel
> directly.
> 
> Signed-off-by: renjun wang <renjunw0@foxmail.com>
> ---
>  include/uapi/linux/mii.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/uapi/linux/mii.h b/include/uapi/linux/mii.h

Just adding a general point to others comments. You have to be very
careful with changes to files inside include/uapi. These define the
API between user space and the kernel. You cannot make changes which
break existing binaries of user space tools.

Sometimes you can add new members to the end of a structure. Sometimes
you can add new enum values after all other enums, but you cannot make
changes in the middle.


    Andrew

---
pw-bot: cr

      parent reply	other threads:[~2024-04-20 14:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-20  0:41 [PATCH] net: phy: update fields of mii_ioctl_data for transferring C45 data renjun wang
2024-04-20  8:00 ` Heiner Kallweit
2024-04-20  8:37 ` Russell King (Oracle)
2024-04-20 14:17 ` Andrew Lunn [this message]

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=01d9fc07-ffaf-4353-b4b2-d7fcaa146024@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=hkallweit1@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=renjunw0@foxmail.com \
    /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.