From: <Parthiban.Veerasooran@microchip.com>
To: <pabeni@redhat.com>, <andrew+netdev@lunn.ch>,
<davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next] microchip: lan865x: add ndo_eth_ioctl handler to enable PHY ioctl support
Date: Thu, 28 Aug 2025 08:30:23 +0000 [thread overview]
Message-ID: <6ef06c2e-c661-4f85-a61b-57974121c192@microchip.com> (raw)
In-Reply-To: <646c6431-274f-4923-ab9d-bf0116645745@redhat.com>
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
>
prev parent reply other threads:[~2025-08-28 8:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-22 8:50 [PATCH net-next] microchip: lan865x: add ndo_eth_ioctl handler to enable PHY ioctl support Parthiban Veerasooran
2025-08-28 7:24 ` Paolo Abeni
2025-08-28 8:30 ` Parthiban.Veerasooran [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=6ef06c2e-c661-4f85-a61b-57974121c192@microchip.com \
--to=parthiban.veerasooran@microchip.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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 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).