netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vadim Fedorenko <vadim.fedorenko@linux.dev>
To: Jiawen Wu <jiawenwu@trustnetic.com>,
	andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, richardcochran@gmail.com,
	linux@armlinux.org.uk, horms@kernel.org,
	jacob.e.keller@intel.com, netdev@vger.kernel.org
Cc: mengyuanlou@net-swift.com
Subject: Re: [PATCH net-next 1/4] net: wangxun: Add support for PTP clock
Date: Thu, 2 Jan 2025 17:33:58 +0000	[thread overview]
Message-ID: <ce5f90f8-4471-43c7-b580-0fa42343d448@linux.dev> (raw)
In-Reply-To: <20250102103026.1982137-2-jiawenwu@trustnetic.com>

On 02/01/2025 10:30, Jiawen Wu wrote:
> Implement support for PTP clock on Wangxun NICs.
> 
> Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>

[...]

>   
> +int wx_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
> +{
> +	struct wx *wx = netdev_priv(netdev);
> +
> +	switch (cmd) {
> +	case SIOCGHWTSTAMP:
> +		return wx_ptp_get_ts_config(wx, ifr);
> +	case SIOCSHWTSTAMP:
> +		return wx_ptp_set_ts_config(wx, ifr);
> +	default:
> +		return -EOPNOTSUPP;
> +	}
> +}
> +EXPORT_SYMBOL(wx_ioctl);
> +
>   MODULE_DESCRIPTION("Common library for Wangxun(R) Ethernet drivers.");
>   MODULE_LICENSE("GPL");

[...]

> @@ -507,6 +513,7 @@ static const struct net_device_ops ngbe_netdev_ops = {
>   	.ndo_get_stats64        = wx_get_stats64,
>   	.ndo_vlan_rx_add_vid    = wx_vlan_rx_add_vid,
>   	.ndo_vlan_rx_kill_vid   = wx_vlan_rx_kill_vid,
> +	.ndo_eth_ioctl          = wx_ioctl,
>   };
>   
>   /**

[...]

> @@ -479,6 +488,7 @@ static const struct net_device_ops txgbe_netdev_ops = {
>   	.ndo_get_stats64        = wx_get_stats64,
>   	.ndo_vlan_rx_add_vid    = wx_vlan_rx_add_vid,
>   	.ndo_vlan_rx_kill_vid   = wx_vlan_rx_kill_vid,
> +	.ndo_eth_ioctl          = wx_ioctl,
>   };
> 

ioctl interface is deprecated for this case. Could you please use
.ndo_hwtstamp_get and .ndo_hwtstamp_set for the new code?



  parent reply	other threads:[~2025-01-02 17:34 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-02 10:30 [PATCH net-next 0/4] Support PTP clock for Wangxun NICs Jiawen Wu
2025-01-02 10:30 ` [PATCH net-next 1/4] net: wangxun: Add support for PTP clock Jiawen Wu
2025-01-02 14:13   ` Andrew Lunn
2025-01-06  7:42     ` Jiawen Wu
2025-01-06 14:26       ` Andrew Lunn
2025-01-07  2:24         ` Jiawen Wu
2025-01-07 13:33           ` Andrew Lunn
2025-01-08  0:34             ` Keller, Jacob E
2025-01-08  7:26               ` Jiawen Wu
2025-01-08 18:32                 ` Andrew Lunn
2025-01-02 16:16   ` kernel test robot
2025-01-02 17:33   ` Vadim Fedorenko [this message]
2025-01-06 21:29   ` Keller, Jacob E
2025-01-02 10:30 ` [PATCH net-next 2/4] net: wangxun: Implement get_ts_info Jiawen Wu
2025-01-02 17:44   ` Vadim Fedorenko
2025-01-06  2:35     ` Jiawen Wu
2025-01-02 10:30 ` [PATCH net-next 3/4] net: wangxun: Add watchdog task for PTP clock Jiawen Wu
2025-01-02 17:53   ` Vadim Fedorenko
2025-01-03  8:45     ` Richard Cochran
2025-01-02 10:30 ` [PATCH net-next 4/4] net: ngbe: Add support for 1PPS and TOD Jiawen Wu

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=ce5f90f8-4471-43c7-b580-0fa42343d448@linux.dev \
    --to=vadim.fedorenko@linux.dev \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jacob.e.keller@intel.com \
    --cc=jiawenwu@trustnetic.com \
    --cc=kuba@kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mengyuanlou@net-swift.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.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).