Re: [PATCH] net: phy: update fields of mii_ioctl_data for transferring C45 data.
From: Andrew Lunn
Date: Sat Apr 20 2024 - 10:18:12 EST
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@xxxxxxxxxxx>
> ---
> 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