Subject: Re: [PATCH v2 net 3/3] mtk_sgmii: enable PCS polling to allow SFP work

From: "Russell King (Oracle)" <[email-masked]>
Date: Fri, 20 Jan 2023 12:29:27 +0000

On Fri, Jan 20, 2023 at 11:49:47AM +0100, Bjørn Mork wrote:
> From: Alexander Couzens <[email-masked]>
> 
> Currently there is no IRQ handling (even the SGMII supports it).
> Enable polling to support SFP ports.
> 
> Signed-off-by: Alexander Couzens <[email-masked]>
> Signed-off-bu: Bjørn Mork <[email-masked]>

Typo in this attributation.

> ---
>  drivers/net/ethernet/mediatek/mtk_sgmii.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ethernet/mediatek/mtk_sgmii.c b/drivers/net/ethernet/mediatek/mtk_sgmii.c
> index c4261069b521..24ea541bf7d7 100644
> --- a/drivers/net/ethernet/mediatek/mtk_sgmii.c
> +++ b/drivers/net/ethernet/mediatek/mtk_sgmii.c
> @@ -187,6 +187,7 @@ int mtk_sgmii_init(struct mtk_sgmii *ss, struct device_node *r, u32 ana_rgc3)
>  			return PTR_ERR(ss->pcs[i].regmap);
>  
>  		ss->pcs[i].pcs.ops = &mtk_pcs_ops;
> +		ss->pcs[i].pcs.poll = 1;

As "poll" is a bool, we prefer true/false rather than 1/0. Using
1/0 will probably cause someone to submit a patch changing this, so
it's probably best to fix this up at submission time.

Thanks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!