diff mbox series

net: stmmac: add flexible PPS to dwmac 4.10a

Message ID 20191007154306.95827-5-antonio.borneo@st.com
State Accepted
Delegated to: David Miller
Headers show
Series net: stmmac: add flexible PPS to dwmac 4.10a | expand

Commit Message

Antonio Borneo Oct. 7, 2019, 3:43 p.m. UTC
All the registers and the functionalities used in the callback
dwmac5_flex_pps_config() are common between dwmac 4.10a [1] and
5.00a [2].

Reuse the same callback for dwmac 4.10a too.

Tested on STM32MP15x, based on dwmac 4.10a.

[1] DWC Ethernet QoS Databook 4.10a October 2014
[2] DWC Ethernet QoS Databook 5.00a September 2017

Signed-off-by: Antonio Borneo <antonio.borneo@st.com>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jakub Kicinski Oct. 9, 2019, 10:26 p.m. UTC | #1
On Mon, 7 Oct 2019 17:43:06 +0200, Antonio Borneo wrote:
> All the registers and the functionalities used in the callback
> dwmac5_flex_pps_config() are common between dwmac 4.10a [1] and
> 5.00a [2].
> 
> Reuse the same callback for dwmac 4.10a too.
> 
> Tested on STM32MP15x, based on dwmac 4.10a.
> 
> [1] DWC Ethernet QoS Databook 4.10a October 2014
> [2] DWC Ethernet QoS Databook 5.00a September 2017
> 
> Signed-off-by: Antonio Borneo <antonio.borneo@st.com>

Applied to net-next.
Ahmad Fatoum Nov. 24, 2020, 2:15 p.m. UTC | #2
Hello Jakub,

On 10.10.19 00:26, Jakub Kicinski wrote:
> On Mon, 7 Oct 2019 17:43:06 +0200, Antonio Borneo wrote:
>> All the registers and the functionalities used in the callback
>> dwmac5_flex_pps_config() are common between dwmac 4.10a [1] and
>> 5.00a [2].
>>
>> Reuse the same callback for dwmac 4.10a too.
>>
>> Tested on STM32MP15x, based on dwmac 4.10a.
>>
>> [1] DWC Ethernet QoS Databook 4.10a October 2014
>> [2] DWC Ethernet QoS Databook 5.00a September 2017
>>
>> Signed-off-by: Antonio Borneo <antonio.borneo@st.com>
> 
> Applied to net-next.

This patch seems to have been fuzzily applied at the wrong location.
The diff describes extension of dwmac 4.10a and so does the @@ line:

  @@ -864,6 +864,7 @@ const struct stmmac_ops dwmac410_ops = {

The patch was applied mainline as 757926247836 ("net: stmmac: add
flexible PPS to dwmac 4.10a"), but it extends dwmac4_ops instead:

  @@ -938,6 +938,7 @@ const struct stmmac_ops dwmac4_ops = {

I don't know if dwmac4 actually supports FlexPPS, so I think it's
better to be on the safe side and revert 757926247836 and add the
change for the correct variant.

Cheers,
Ahmad
Antonio Borneo Nov. 24, 2020, 2:23 p.m. UTC | #3
On Tue, 2020-11-24 at 15:15 +0100, Ahmad Fatoum wrote:
> Hello Jakub,
> 
> On 10.10.19 00:26, Jakub Kicinski wrote:
> > On Mon, 7 Oct 2019 17:43:06 +0200, Antonio Borneo wrote:
> > > All the registers and the functionalities used in the callback
> > > dwmac5_flex_pps_config() are common between dwmac 4.10a [1] and
> > > 5.00a [2].
> > > 
> > > Reuse the same callback for dwmac 4.10a too.
> > > 
> > > Tested on STM32MP15x, based on dwmac 4.10a.
> > > 
> > > [1] DWC Ethernet QoS Databook 4.10a October 2014
> > > [2] DWC Ethernet QoS Databook 5.00a September 2017
> > > 
> > > Signed-off-by: Antonio Borneo <antonio.borneo@st.com>
> > 
> > Applied to net-next.
> 
> This patch seems to have been fuzzily applied at the wrong location.
> The diff describes extension of dwmac 4.10a and so does the @@ line:
> 
>   @@ -864,6 +864,7 @@ const struct stmmac_ops dwmac410_ops = {
> 
> The patch was applied mainline as 757926247836 ("net: stmmac: add
> flexible PPS to dwmac 4.10a"), but it extends dwmac4_ops instead:
> 
>   @@ -938,6 +938,7 @@ const struct stmmac_ops dwmac4_ops = {
> 
> I don't know if dwmac4 actually supports FlexPPS, so I think it's
> better to be on the safe side and revert 757926247836 and add the
> change for the correct variant.

Agree,
the patch get applied to the wrong place!

Antonio

> 
> Cheers,
> Ahmad
> 
>
Ahmad Fatoum Nov. 24, 2020, 2:27 p.m. UTC | #4
To += Jakub's new address

On 24.11.20 15:15, Ahmad Fatoum wrote:
> Hello Jakub,
> 
> On 10.10.19 00:26, Jakub Kicinski wrote:
>> On Mon, 7 Oct 2019 17:43:06 +0200, Antonio Borneo wrote:
>>> All the registers and the functionalities used in the callback
>>> dwmac5_flex_pps_config() are common between dwmac 4.10a [1] and
>>> 5.00a [2].
>>>
>>> Reuse the same callback for dwmac 4.10a too.
>>>
>>> Tested on STM32MP15x, based on dwmac 4.10a.
>>>
>>> [1] DWC Ethernet QoS Databook 4.10a October 2014
>>> [2] DWC Ethernet QoS Databook 5.00a September 2017
>>>
>>> Signed-off-by: Antonio Borneo <antonio.borneo@st.com>
>>
>> Applied to net-next.
> 
> This patch seems to have been fuzzily applied at the wrong location.
> The diff describes extension of dwmac 4.10a and so does the @@ line:
> 
>   @@ -864,6 +864,7 @@ const struct stmmac_ops dwmac410_ops = {
> 
> The patch was applied mainline as 757926247836 ("net: stmmac: add
> flexible PPS to dwmac 4.10a"), but it extends dwmac4_ops instead:
> 
>   @@ -938,6 +938,7 @@ const struct stmmac_ops dwmac4_ops = {
> 
> I don't know if dwmac4 actually supports FlexPPS, so I think it's
> better to be on the safe side and revert 757926247836 and add the
> change for the correct variant.
> 
> Cheers,
> Ahmad
> 
>
Jakub Kicinski Nov. 24, 2020, 6:20 p.m. UTC | #5
On Tue, 24 Nov 2020 15:23:27 +0100 Antonio Borneo wrote:
> On Tue, 2020-11-24 at 15:15 +0100, Ahmad Fatoum wrote:
> > On 10.10.19 00:26, Jakub Kicinski wrote:  
> > > On Mon, 7 Oct 2019 17:43:06 +0200, Antonio Borneo wrote:  
> > > > All the registers and the functionalities used in the callback
> > > > dwmac5_flex_pps_config() are common between dwmac 4.10a [1] and
> > > > 5.00a [2].
> > > > 
> > > > Reuse the same callback for dwmac 4.10a too.
> > > > 
> > > > Tested on STM32MP15x, based on dwmac 4.10a.
> > > > 
> > > > [1] DWC Ethernet QoS Databook 4.10a October 2014
> > > > [2] DWC Ethernet QoS Databook 5.00a September 2017
> > > > 
> > > > Signed-off-by: Antonio Borneo <antonio.borneo@st.com>  
> > > 
> > > Applied to net-next.  
> > 
> > This patch seems to have been fuzzily applied at the wrong location.
> > The diff describes extension of dwmac 4.10a and so does the @@ line:
> > 
> >   @@ -864,6 +864,7 @@ const struct stmmac_ops dwmac410_ops = {
> > 
> > The patch was applied mainline as 757926247836 ("net: stmmac: add
> > flexible PPS to dwmac 4.10a"), but it extends dwmac4_ops instead:
> > 
> >   @@ -938,6 +938,7 @@ const struct stmmac_ops dwmac4_ops = {
> > 
> > I don't know if dwmac4 actually supports FlexPPS, so I think it's
> > better to be on the safe side and revert 757926247836 and add the
> > change for the correct variant.  
> 
> Agree,
> the patch get applied to the wrong place!

:-o

This happens sometimes with stable backports but I've never seen it
happen working on "current" branches.

Sorry about that!

Would you mind sending the appropriate patches? I can do the revert if
you prefer, but since you need to send the fix anyway..
Antonio Borneo Nov. 24, 2020, 6:27 p.m. UTC | #6
On Tue, 2020-11-24 at 10:20 -0800, Jakub Kicinski wrote:
> On Tue, 24 Nov 2020 15:23:27 +0100 Antonio Borneo wrote:
> > On Tue, 2020-11-24 at 15:15 +0100, Ahmad Fatoum wrote:
> > > On 10.10.19 00:26, Jakub Kicinski wrote:  
> > > > On Mon, 7 Oct 2019 17:43:06 +0200, Antonio Borneo wrote:  
> > > > > All the registers and the functionalities used in the callback
> > > > > dwmac5_flex_pps_config() are common between dwmac 4.10a [1] and
> > > > > 5.00a [2].
> > > > > 
> > > > > Reuse the same callback for dwmac 4.10a too.
> > > > > 
> > > > > Tested on STM32MP15x, based on dwmac 4.10a.
> > > > > 
> > > > > [1] DWC Ethernet QoS Databook 4.10a October 2014
> > > > > [2] DWC Ethernet QoS Databook 5.00a September 2017
> > > > > 
> > > > > Signed-off-by: Antonio Borneo <antonio.borneo@st.com>  
> > > > 
> > > > Applied to net-next.  
> > > 
> > > This patch seems to have been fuzzily applied at the wrong location.
> > > The diff describes extension of dwmac 4.10a and so does the @@ line:
> > > 
> > >   @@ -864,6 +864,7 @@ const struct stmmac_ops dwmac410_ops = {
> > > 
> > > The patch was applied mainline as 757926247836 ("net: stmmac: add
> > > flexible PPS to dwmac 4.10a"), but it extends dwmac4_ops instead:
> > > 
> > >   @@ -938,6 +938,7 @@ const struct stmmac_ops dwmac4_ops = {
> > > 
> > > I don't know if dwmac4 actually supports FlexPPS, so I think it's
> > > better to be on the safe side and revert 757926247836 and add the
> > > change for the correct variant.  
> > 
> > Agree,
> > the patch get applied to the wrong place!
> 
> :-o
> 
> This happens sometimes with stable backports but I've never seen it
> happen working on "current" branches.
> 
> Sorry about that!
> 
> Would you mind sending the appropriate patches? I can do the revert if
> you prefer, but since you need to send the fix anyway..

You mean sending two patches one for revert and one to re-apply the code?
Or a single patch for the fix?

Antonio
Jakub Kicinski Nov. 24, 2020, 6:56 p.m. UTC | #7
On Tue, 24 Nov 2020 19:27:03 +0100 Antonio Borneo wrote:
> On Tue, 2020-11-24 at 10:20 -0800, Jakub Kicinski wrote:
> > On Tue, 24 Nov 2020 15:23:27 +0100 Antonio Borneo wrote:  
> > > On Tue, 2020-11-24 at 15:15 +0100, Ahmad Fatoum wrote:  
> > > > On 10.10.19 00:26, Jakub Kicinski wrote:    
> > > > > On Mon, 7 Oct 2019 17:43:06 +0200, Antonio Borneo wrote:    
> > > > > > All the registers and the functionalities used in the callback
> > > > > > dwmac5_flex_pps_config() are common between dwmac 4.10a [1] and
> > > > > > 5.00a [2].
> > > > > > 
> > > > > > Reuse the same callback for dwmac 4.10a too.
> > > > > > 
> > > > > > Tested on STM32MP15x, based on dwmac 4.10a.
> > > > > > 
> > > > > > [1] DWC Ethernet QoS Databook 4.10a October 2014
> > > > > > [2] DWC Ethernet QoS Databook 5.00a September 2017
> > > > > > 
> > > > > > Signed-off-by: Antonio Borneo <antonio.borneo@st.com>    
> > > > > 
> > > > > Applied to net-next.    
> > > > 
> > > > This patch seems to have been fuzzily applied at the wrong location.
> > > > The diff describes extension of dwmac 4.10a and so does the @@ line:
> > > > 
> > > >   @@ -864,6 +864,7 @@ const struct stmmac_ops dwmac410_ops = {
> > > > 
> > > > The patch was applied mainline as 757926247836 ("net: stmmac: add
> > > > flexible PPS to dwmac 4.10a"), but it extends dwmac4_ops instead:
> > > > 
> > > >   @@ -938,6 +938,7 @@ const struct stmmac_ops dwmac4_ops = {
> > > > 
> > > > I don't know if dwmac4 actually supports FlexPPS, so I think it's
> > > > better to be on the safe side and revert 757926247836 and add the
> > > > change for the correct variant.    
> > > 
> > > Agree,
> > > the patch get applied to the wrong place!  
> > 
> > :-o
> > 
> > This happens sometimes with stable backports but I've never seen it
> > happen working on "current" branches.
> > 
> > Sorry about that!
> > 
> > Would you mind sending the appropriate patches? I can do the revert if
> > you prefer, but since you need to send the fix anyway..  
> 
> You mean sending two patches one for revert and one to re-apply the code?
> Or a single patch for the fix?

Either way is fine by me. If I was doing it - I'd probably send just one
patch, but if you prefer to revert first - nothing wrong with that.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
index 2cb9c53f93b8..3006047213ea 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
@@ -864,6 +864,7 @@  const struct stmmac_ops dwmac410_ops = {
 	.pcs_get_adv_lp = dwmac4_get_adv_lp,
 	.debug = dwmac4_debug,
 	.set_filter = dwmac4_set_filter,
+	.flex_pps_config = dwmac5_flex_pps_config,
 	.set_mac_loopback = dwmac4_set_mac_loopback,
 	.update_vlan_hash = dwmac4_update_vlan_hash,
 	.sarc_configure = dwmac4_sarc_configure,