[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191012190717.GL3165@localhost>
Date: Sat, 12 Oct 2019 12:07:17 -0700
From: Richard Cochran <richardcochran@...il.com>
To: Igor Russkikh <Igor.Russkikh@...antia.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"davem@...emloft.net" <davem@...emloft.net>,
Egor Pomozov <Egor.Pomozov@...antia.com>,
Dmitry Bezrukov <Dmitry.Bezrukov@...antia.com>,
"andrew@...n.ch" <andrew@...n.ch>,
Simon Edelhaus <sedelhaus@...vell.com>,
Sergey Samoilenko <Sergey.Samoilenko@...antia.com>
Subject: Re: [PATCH v2 net-next 09/12] net: aquantia: implement get_ts_info
ethtool
On Tue, Oct 08, 2019 at 10:56:54AM +0000, Igor Russkikh wrote:
> +static int aq_ethtool_get_ts_info(struct net_device *ndev,
> + struct ethtool_ts_info *info)
> +{
> + struct aq_nic_s *aq_nic = netdev_priv(ndev);
> +
> + ethtool_op_get_ts_info(ndev, info);
> +
> + info->so_timestamping |=
> + SOF_TIMESTAMPING_TX_HARDWARE |
> + SOF_TIMESTAMPING_RX_HARDWARE |
> + SOF_TIMESTAMPING_RAW_HARDWARE;
> +
> + info->tx_types =
> + BIT(HWTSTAMP_TX_OFF) |
> + BIT(HWTSTAMP_TX_ON);
> +
> + info->rx_filters = BIT(HWTSTAMP_FILTER_NONE);
> +
> + if (aq_nic->aq_ptp)
Shouldn't the test for (aq_nic->aq_ptp) also effect
info->so_timestamping and info->tx_types ?
> + info->rx_filters |= BIT(HWTSTAMP_FILTER_PTP_V2_L4_EVENT) |
> + BIT(HWTSTAMP_FILTER_PTP_V2_L2_EVENT) |
> + BIT(HWTSTAMP_FILTER_PTP_V2_EVENT);
> +
> + info->phc_index = (aq_nic->aq_ptp) ?
> + ptp_clock_index(aq_ptp_get_ptp_clock(aq_nic->aq_ptp)) : -1;
> +
> + return 0;
> +}
Thanks,
Richard
Powered by blists - more mailing lists