diff mbox series

[v2,net,3/3] mtk_sgmii: enable PCS polling to allow SFP work

Message ID 20230120104947.4048820-4-bjorn@mork.no (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series fixes for mtk_eth_soc | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/fixes_present fail Series targets non-next tree, but doesn't contain any Fixes tags
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 7 maintainers not CCed: edumazet@google.com davem@davemloft.net linux-mediatek@lists.infradead.org matthias.bgg@gmail.com kuba@kernel.org pabeni@redhat.com linux-arm-kernel@lists.infradead.org
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Bjørn Mork Jan. 20, 2023, 10:49 a.m. UTC
From: Alexander Couzens <lynxis@fe80.eu>

Currently there is no IRQ handling (even the SGMII supports it).
Enable polling to support SFP ports.

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Signed-off-bu: Bjørn Mork <bjorn@mork.no>
---
 drivers/net/ethernet/mediatek/mtk_sgmii.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Russell King (Oracle) Jan. 20, 2023, 12:29 p.m. UTC | #1
On Fri, Jan 20, 2023 at 11:49:47AM +0100, Bjørn Mork wrote:
> From: Alexander Couzens <lynxis@fe80.eu>
> 
> Currently there is no IRQ handling (even the SGMII supports it).
> Enable polling to support SFP ports.
> 
> Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
> Signed-off-bu: Bjørn Mork <bjorn@mork.no>

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.
Bjørn Mork Jan. 20, 2023, 12:48 p.m. UTC | #2
"Russell King (Oracle)" <linux@armlinux.org.uk> writes:
> On Fri, Jan 20, 2023 at 11:49:47AM +0100, Bjørn Mork wrote:
>> From: Alexander Couzens <lynxis@fe80.eu>
>> 
>> Currently there is no IRQ handling (even the SGMII supports it).
>> Enable polling to support SFP ports.
>> 
>> Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
>> Signed-off-bu: Bjørn Mork <bjorn@mork.no>
>
> Typo in this attributation.

Impressive!  Thanks.

I tend to forget the -s when doing anything but "git commit" (and this
came from "git am").  And then I try to fix it manually.  Forgetting
that I'm unable to type a three-letter word with less than four errors.

A bit surprised checkpatch didn't catch it.  I guess it's happy with one
SoB, and silently accepting all unknown tags.

>> ---
>>  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.

Yes. Will fix.


Bjørn
diff mbox series

Patch

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;
 		ss->pcs[i].interface = PHY_INTERFACE_MODE_NA;
 	}