Message ID | 20240906144632.404651-6-gal@nvidia.com (mailing list archive) |
---|---|
State | Accepted |
Commit | a8fe0c07f56c1bd5e8d06fbbde2235ab56266575 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | RX software timestamp for all - round 3 | expand |
On 06/09/2024 at 16:46, Gal Pressman wrote: > The responsibility for reporting of RX software timestamp has moved to > the core layer (see __ethtool_get_ts_info()), remove usage from the > device drivers. > > Reviewed-by: Carolina Jubran <cjubran@nvidia.com> > Reviewed-by: Rahul Rameshbabu <rrameshbabu@nvidia.com> > Signed-off-by: Gal Pressman <gal@nvidia.com> Looks good to me: Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Thanks, best regards, Nicolas > --- > drivers/net/ethernet/cadence/macb_main.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c > index 95e8742dce1d..e41929c61a04 100644 > --- a/drivers/net/ethernet/cadence/macb_main.c > +++ b/drivers/net/ethernet/cadence/macb_main.c > @@ -3410,8 +3410,6 @@ static int gem_get_ts_info(struct net_device *dev, > > info->so_timestamping = > SOF_TIMESTAMPING_TX_SOFTWARE | > - SOF_TIMESTAMPING_RX_SOFTWARE | > - SOF_TIMESTAMPING_SOFTWARE | > SOF_TIMESTAMPING_TX_HARDWARE | > SOF_TIMESTAMPING_RX_HARDWARE | > SOF_TIMESTAMPING_RAW_HARDWARE; > @@ -3423,7 +3421,8 @@ static int gem_get_ts_info(struct net_device *dev, > (1 << HWTSTAMP_FILTER_NONE) | > (1 << HWTSTAMP_FILTER_ALL); > > - info->phc_index = bp->ptp_clock ? ptp_clock_index(bp->ptp_clock) : -1; > + if (bp->ptp_clock) > + info->phc_index = ptp_clock_index(bp->ptp_clock); > > return 0; > } > -- > 2.40.1 >
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index 95e8742dce1d..e41929c61a04 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -3410,8 +3410,6 @@ static int gem_get_ts_info(struct net_device *dev, info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE | - SOF_TIMESTAMPING_RX_SOFTWARE | - SOF_TIMESTAMPING_SOFTWARE | SOF_TIMESTAMPING_TX_HARDWARE | SOF_TIMESTAMPING_RX_HARDWARE | SOF_TIMESTAMPING_RAW_HARDWARE; @@ -3423,7 +3421,8 @@ static int gem_get_ts_info(struct net_device *dev, (1 << HWTSTAMP_FILTER_NONE) | (1 << HWTSTAMP_FILTER_ALL); - info->phc_index = bp->ptp_clock ? ptp_clock_index(bp->ptp_clock) : -1; + if (bp->ptp_clock) + info->phc_index = ptp_clock_index(bp->ptp_clock); return 0; }