Message ID | 20250218085829.3172126-7-shaojijie@huawei.com (mailing list archive) |
---|---|
State | New |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | Support some enhances features for the HIBMCGE driver | expand |
On Tue, Feb 18, 2025 at 04:58:29PM +0800, Jijie Shao wrote: > This patch implements the .ndo_eth_ioctl() to > read and write the PHY register. > > Signed-off-by: Jijie Shao <shaojijie@huawei.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Andrew
diff --git a/drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c b/drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c index be2279cbba00..de0c39559dea 100644 --- a/drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c +++ b/drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c @@ -5,6 +5,7 @@ #include <linux/if_vlan.h> #include <linux/netdevice.h> #include <linux/pci.h> +#include <linux/phy.h> #include "hbg_common.h" #include "hbg_diagnose.h" #include "hbg_err.h" @@ -284,6 +285,7 @@ static const struct net_device_ops hbg_netdev_ops = { .ndo_set_rx_mode = hbg_net_set_rx_mode, .ndo_get_stats64 = hbg_net_get_stats, .ndo_fix_features = hbg_net_fix_features, + .ndo_eth_ioctl = phy_do_ioctl_running, }; static void hbg_service_task(struct work_struct *work)
This patch implements the .ndo_eth_ioctl() to read and write the PHY register. Signed-off-by: Jijie Shao <shaojijie@huawei.com> --- ChangeLog: v1 -> v2: - Use phy_do_ioctl() to simplify ioctl code, suggested by Andrew. v1: https://lore.kernel.org/all/20250213035529.2402283-1-shaojijie@huawei.com/ --- drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c | 2 ++ 1 file changed, 2 insertions(+)