net: fec: stop the "rcv is not +last, " error messages
Subsystems (3)
Hi Troy,
Commit 55cd48c8 ('net: fec: stop the "rcv is not +last, " error messages') adds a write to a register that is not present in all implementations of the FEC hardware module. None of the ColdFire SoC parts with the FEC module have the FTRL (0x1b0) register.
Does this need a quirk flag to key access to this register of? Or can you piggyback on the FEC_QUIRK_HAS_RACC flag?
Regards
Greg
Quoted 7 lines · Greg Ungerer
Hi Troy,
Commit
55cd48c8('net: fec: stop the "rcv is not +last, " error messages') adds a write to a register that is not present in all implementations of the FEC hardware module. None of the ColdFire SoC parts with the FEC module have the FTRL (0x1b0) register.
Quoted 5 lines
Does this need a quirk flag to key access to this register of? Or can you piggyback on the
FEC_QUIRK_HAS_RACCflag?Regards
Greg
I'm no expert on what hardware has which registers, but piggybacking works for all the processors that I use. Let's see what Freescale says, but would you like to submit a patch to move it inside the quirk's "if", or do you want me to do it?
Hi Greg,
Quoted 9 lines · Greg Ungerer
Hi Troy,
Commit
55cd48c8('net: fec: stop the "rcv is not +last, " error messages') adds a write to a register that is not present in all implementations of the FEC hardware module. None of the ColdFire SoC parts with the FEC module have the FTRL (0x1b0) register.Does this need a quirk flag to key access to this register of? Or can you piggyback on the
FEC_QUIRK_HAS_RACCflag?
Would the change below work on Coldfire?
drivers/net/ethernet/freescale/fec_main.c +1 -1
@@ -943,8 +943,8 @@ fec_restart(struct net_device *ndev) else val &= ~FEC_RACC_OPTIONS;writel (val, fep->hwp +FEC_RACC ); - } writel(PKT_MAXBUF_SIZE, fep->hwp + FEC_FTRL); + }#endif /*
Hi Fabio,
Quoted 18 lines · Fabio Estevam
Hi Greg,
Quoted 9 lines · Greg Ungerer
Hi Troy,
Commit
55cd48c8('net: fec: stop the "rcv is not +last, " error messages') adds a write to a register that is not present in all implementations of the FEC hardware module. None of the ColdFire SoC parts with the FEC module have the FTRL (0x1b0) register.Does this need a quirk flag to key access to this register of? Or can you piggyback on the
FEC_QUIRK_HAS_RACCflag?Would the change below work on Coldfire?
drivers/net/ethernet/freescale/fec_main.c fec_restart(struct net_device *ndev) · line 950
Quoted 9 lines
drivers/net/ethernet/freescale/fec_main.c +1
-1@@ -943,8 +943,8 @@ fec_restart(struct net_device *ndev) else val &= ~FEC_RACC_OPTIONS;writel (val, fep->hwp +FEC_RACC ); - } writel(PKT_MAXBUF_SIZE, fep->hwp + FEC_FTRL); + }#endif /*
Yes, that fixes it. Will you carry this change?
Regards
Greg
Hi Greg,
Quoted 1 line · Greg Ungerer
Yes, that fixes it. Will you carry this change?
Thanks for confirming.
Yes, I will submit it later today;
From: Fabio Estevam <[email protected]> Sent: Thursday, March 31, 2016 2:37 AM
Quoted 22 lines
To: Greg Ungerer <[email protected]>
Cc: Troy Kisky <[email protected]>; [email protected]
Subject: Re: [PATCH] net: fec: stop the "rcv is not +last, " error messagesHi Greg,
Quoted 9 lines · Greg Ungerer
Hi Troy,
Commit
55cd48c8('net: fec: stop the "rcv is not +last, " error messages') adds a write to a register that is not present in all implementations of the FEC hardware module. None of the ColdFire SoC parts with the FEC module have the FTRL (0x1b0) register.Does this need a quirk flag to key access to this register of? Or can you piggyback on the
FEC_QUIRK_HAS_RACCflag?Would the change below work on Coldfire?
drivers/net/ethernet/freescale/fec_main.c fec_restart(struct net_device *ndev) · line 950
Quoted 9 lines
drivers/net/ethernet/freescale/fec_main.c +1
-1@@ -943,8 +943,8 @@ fec_restart(struct net_device *ndev) else val &= ~FEC_RACC_OPTIONS;writel (val, fep->hwp +FEC_RACC ); - } writel(PKT_MAXBUF_SIZE, fep->hwp + FEC_FTRL); + }#endif /*
Fabio, we cannot do it like this that may cause confused for the quirk flag "FEC_QUIRK_HAS_RACC".
Hi, Greg,
The header file fec.h define the FEC_FTRL as below, if ColdFire SoC has no this register, we may remove the define in here and define the register according to SOC type. For example, it is ColdFire Soc, define it as 0xFFF. Is it feasible ?
#if defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x) || \
defined(CONFIG_M520x) || defined(CONFIG_M532x) || defined(CONFIG_ARM)...
#define FEC_FTRL 0x1b0
...
#else
...
#endif
Regards,
Andy
Hi Andy,
Quoted 40 lines · Fugang Duan
From: Fabio Estevam <[email protected]> Sent: Thursday, March 31, 2016 2:37 AM
Quoted 22 lines
To: Greg Ungerer <[email protected]>
Cc: Troy Kisky <[email protected]>; [email protected]
Subject: Re: [PATCH] net: fec: stop the "rcv is not +last, " error messagesHi Greg,
Quoted 9 lines · Greg Ungerer
Hi Troy,
Commit
55cd48c8('net: fec: stop the "rcv is not +last, " error messages') adds a write to a register that is not present in all implementations of the FEC hardware module. None of the ColdFire SoC parts with the FEC module have the FTRL (0x1b0) register.Does this need a quirk flag to key access to this register of? Or can you piggyback on the
FEC_QUIRK_HAS_RACCflag?Would the change below work on Coldfire?
drivers/net/ethernet/freescale/fec_main.c fec_restart(struct net_device *ndev) · line 950
Quoted 9 lines
drivers/net/ethernet/freescale/fec_main.c +1
-1@@ -943,8 +943,8 @@ fec_restart(struct net_device *ndev) else val &= ~FEC_RACC_OPTIONS;writel (val, fep->hwp +FEC_RACC ); - } writel(PKT_MAXBUF_SIZE, fep->hwp + FEC_FTRL); + }#endif /* Fabio, we cannot do it like this that may cause confused for the quirk flag "
FEC_QUIRK_HAS_RACC".Hi, Greg,
The header file
fec.hdefine theFEC_FTRLas below, if ColdFire SoC has no this register, we may remove the define in here and define the register according to SOC type. For example, it is ColdFire Soc, define it as0xFFF. Is it feasible ?
Quoted 8 lines
#if defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ defined(CONFIG_M520x) || defined(CONFIG_M532x) || defined(CONFIG_ARM)...
#defineFEC_FTRL0x1b0
...
#else
...
#endif
Sure you could do that. But... you still have to be careful with references to it in fec_main.c. They will need be conditional on existence of FEC_FTRL, otherwise you break compilation.
Even if you define it to some bogus value we still don't want the code actually writing to it.
Regards
Greg
Hi Andy,
Quoted 2 lines · Fugang Duan
Fabio, we cannot do it like this that may cause confused for the quirk flag "
FEC_QUIRK_HAS_RACC".
We can treat FEC_QUIRK_HAS_RACC flag as "this is a non-Coldfire SoC".
Quoted 6 lines
Hi, Greg,
The header file
fec.hdefine theFEC_FTRLas below, if ColdFire SoC has no this register, we may remove the define in here and define the register according to SOC type. For example, it is ColdFire Soc, define it as0xFFF. Is it feasible ?
This is even worse IMHO. We should not write to a 'fake' register offset of 0xFFF.
From: Fabio Estevam <[email protected]> Sent: Thursday, March 31, 2016 6:57 PM
Quoted 7 lines
To: Fugang Duan <[email protected]>
Cc: Greg Ungerer <[email protected]>; Troy Kisky <[email protected]>; [email protected]
Subject: Re: [PATCH] net: fec: stop the "rcv is not +last, " error messagesHi Andy,
Quoted 8 lines
Quoted 2 lines · Fugang Duan
Fabio, we cannot do it like this that may cause confused for the quirk flag
"
FEC_QUIRK_HAS_RACC".We can treat
FEC_QUIRK_HAS_RACCflag as "this is a non-Coldfire SoC".
FEC_QUIRK_HAS_RACC means the HW support "Receive Accelerator Function Configuration". It is really make somebody confused.
To save trouble, you treat FEC_QUIRK_HAS_RACC flag as "this is a non-Coldfire SoC", you must add comment on the flag define.
Quoted 10 lines
Quoted 5 lines
Hi, Greg,
The header file
fec.hdefine theFEC_FTRLas below, if ColdFire SoC has no thisregister, we may remove the define in here and define the register according to SOC type. For example, it is ColdFire Soc, define it as
0xFFF. Is it feasible ?Quoted 1 line
This is even worse IMHO. We should not write to a 'fake' register offset of
0xFFF.
We can do it like this:
#if defined(CONFIG_ARM)
writel(PKT_MAXBUF_SIZE, fep->hwp + FEC_FTRL);#endif