lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6ef06c2e-c661-4f85-a61b-57974121c192@microchip.com>
Date: Thu, 28 Aug 2025 08:30:23 +0000
From: <Parthiban.Veerasooran@...rochip.com>
To: <pabeni@...hat.com>, <andrew+netdev@...n.ch>, <davem@...emloft.net>,
	<edumazet@...gle.com>, <kuba@...nel.org>
CC: <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next] microchip: lan865x: add ndo_eth_ioctl handler to
 enable PHY ioctl support

Hi Paolo Abeni,

On 28/08/25 12:54 pm, Paolo Abeni wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> On 8/22/25 10:50 AM, Parthiban Veerasooran wrote:
>> diff --git a/drivers/net/ethernet/microchip/lan865x/lan865x.c b/drivers/net/ethernet/microchip/lan865x/lan865x.c
>> index 84c41f193561..7f586f9558ff 100644
>> --- a/drivers/net/ethernet/microchip/lan865x/lan865x.c
>> +++ b/drivers/net/ethernet/microchip/lan865x/lan865x.c
>> @@ -320,12 +320,22 @@ static int lan865x_net_open(struct net_device *netdev)
>>        return 0;
>>   }
>>
>> +static int lan865x_eth_ioctl(struct net_device *netdev, struct ifreq *rq,
>> +                          int cmd)
>> +{
>> +     if (!netif_running(netdev))
>> +             return -EINVAL;
>> +
>> +     return phy_mii_ioctl(netdev->phydev, rq, cmd);
>> +}
>> +
>>   static const struct net_device_ops lan865x_netdev_ops = {
>>        .ndo_open               = lan865x_net_open,
>>        .ndo_stop               = lan865x_net_close,
>>        .ndo_start_xmit         = lan865x_send_packet,
>>        .ndo_set_rx_mode        = lan865x_set_multicast_list,
>>        .ndo_set_mac_address    = lan865x_set_mac_address,
>> +     .ndo_eth_ioctl          = lan865x_eth_ioctl,
> 
> It looks like you could use directly phy_do_ioctl_running() and avoid
> some code duplication.
Yes, thank you for pointing that out. I will update it in the next version.

Best regards,
Parthiban V
> 
> /P
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ