Re: [RFC/PATCH 05/18] ravb: Exclude gPTP feature support for RZ/G2L

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/23/21 5:08 PM, Biju Das wrote:

> R-Car supports gPTP feature whereas RZ/G2L does not support it.
> This patch excludes gtp feature support for RZ/G2L by enabling
> no_gptp feature bit.
> 
> Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
> ---
>  drivers/net/ethernet/renesas/ravb_main.c | 46 ++++++++++++++----------
>  1 file changed, 28 insertions(+), 18 deletions(-)
> 
> diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
> index d38fc33a8e93..8663d83507a0 100644
> --- a/drivers/net/ethernet/renesas/ravb_main.c
> +++ b/drivers/net/ethernet/renesas/ravb_main.c
[...]
> @@ -953,7 +954,7 @@ static irqreturn_t ravb_interrupt(int irq, void *dev_id)
>  	}
>  
>  	/* gPTP interrupt status summary */
> -	if (iss & ISS_CGIS) {

   Isn't this bit always 0 on RZ/G2L?

> +	if (!info->no_gptp && (iss & ISS_CGIS)) {
>  		ravb_ptp_interrupt(ndev);
>  		result = IRQ_HANDLED;
>  	}
> @@ -1378,6 +1379,7 @@ static int ravb_get_ts_info(struct net_device *ndev,
>  			    struct ethtool_ts_info *info)
>  {
>  	struct ravb_private *priv = netdev_priv(ndev);
> +	const struct ravb_hw_info *hw_info = priv->info;
>  
>  	info->so_timestamping =
>  		SOF_TIMESTAMPING_TX_SOFTWARE |
> @@ -1391,7 +1393,8 @@ static int ravb_get_ts_info(struct net_device *ndev,
>  		(1 << HWTSTAMP_FILTER_NONE) |
>  		(1 << HWTSTAMP_FILTER_PTP_V2_L2_EVENT) |
>  		(1 << HWTSTAMP_FILTER_ALL);
> -	info->phc_index = ptp_clock_index(priv->ptp.clock);
> +	if (!hw_info->no_gptp)
> +		info->phc_index = ptp_clock_index(priv->ptp.clock);
>  
>  	return 0;
>  }
> @@ -2116,6 +2119,7 @@ static const struct ravb_hw_info rgeth_hw_info = {
>  	.emac_init = ravb_rgeth_emac_init,
>  	.aligned_tx = 1,
>  	.tx_counters = 1,
> +	.no_gptp = 1,

   Mhm, I definitely don't like the way you "extend" the GbEthernet info structure. All the applicable flags
should be set in the last patch of the series, not amidst of it.

[...]

MBR, Sergey



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux