i40e: Fix ST code value for Clause 45
Subsystems (3)
PATCH 1/1 i40e: Fix ST code value for Clause 45
ST code value for clause 45 that has been changed by commit 8196b5fd6c73 ("i40e: Refactor I40E_MDIO_CLAUSE* macros") is currently wrong.
The mentioned commit refactored ..MDIO_CLAUSE??_STCODE_MASK so their value is the same for both clauses. The value is correct for clause 22 but not for clause 45.
Fix the issue by adding a parameter to I40E_GLGEN_MSCA_STCODE_MASK macro that specifies required value.
--- drivers/net/ethernet/intel/i40e/i40e_register.h | 2 +- drivers/net/ethernet/intel/i40e/i40e_type.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_register.h +1 -1
@@ -207,7 +207,7 @@#define I40E_GLGEN_MSCA_OPCODE_SHIFT 26#define I40E_GLGEN_MSCA_OPCODE_MASK (_i) I40E_MASK(_i, I40E_GLGEN_MSCA_OPCODE_SHIFT)#define I40E_GLGEN_MSCA_STCODE_SHIFT 28 -#define I40E_GLGEN_MSCA_STCODE_MASK I40E_MASK(0x1, I40E_GLGEN_MSCA_STCODE_SHIFT) +#define I40E_GLGEN_MSCA_STCODE_MASK (_i) I40E_MASK(_i, I40E_GLGEN_MSCA_STCODE_SHIFT)#define I40E_GLGEN_MSCA_MDICMD_SHIFT 30#define I40E_GLGEN_MSCA_MDICMD_MASK I40E_MASK(0x1, I40E_GLGEN_MSCA_MDICMD_SHIFT)#define I40E_GLGEN_MSCA_MDIINPROGEN_SHIFT 31
drivers/net/ethernet/intel/i40e/i40e_type.h +2 -2
@@ -37,11 +37,11 @@ typedef void (*I40E_ADMINQ_CALLBACK)(struct i40e_hw *, struct i40e_aq_desc *);#define I40E_QTX_CTL_VM_QUEUE 0x1#define I40E_QTX_CTL_PF_QUEUE 0x2 -#define I40E_MDIO_CLAUSE22_STCODE_MASK I40E_GLGEN_MSCA_STCODE_MASK +#define I40E_MDIO_CLAUSE22_STCODE_MASK I40E_GLGEN_MSCA_STCODE_MASK(1)#define I40E_MDIO_CLAUSE22_OPCODE_WRITE_MASK I40E_GLGEN_MSCA_OPCODE_MASK(1)#define I40E_MDIO_CLAUSE22_OPCODE_READ_MASK I40E_GLGEN_MSCA_OPCODE_MASK(2) -#define I40E_MDIO_CLAUSE45_STCODE_MASK I40E_GLGEN_MSCA_STCODE_MASK +#define I40E_MDIO_CLAUSE45_STCODE_MASK I40E_GLGEN_MSCA_STCODE_MASK(0)#define I40E_MDIO_CLAUSE45_OPCODE_ADDRESS_MASK I40E_GLGEN_MSCA_OPCODE_MASK(0)#define I40E_MDIO_CLAUSE45_OPCODE_WRITE_MASK I40E_GLGEN_MSCA_OPCODE_MASK(1)#define I40E_MDIO_CLAUSE45_OPCODE_READ_MASK I40E_GLGEN_MSCA_OPCODE_MASK(3)
Signature · 1 line
2.41.0
Quoted 8 lines · Ivan Vecera
ST code value for clause 45 that has been changed by commit
8196b5fd6c73("i40e: Refactor I40E_MDIO_CLAUSE* macros") is currently wrong.The mentioned commit refactored ..MDIO_CLAUSE??_STCODE_MASK so their value is the same for both clauses. The value is correct for clause 22 but not for clause 45.
Quoted 6 lines
Fix the issue by adding a parameter to
I40E_GLGEN_MSCA_STCODE_MASKmacro that specifies required value.Fixes 8196b5fd6c73 ("i40e: Refactor I40E_MDIO_CLAUSE* macros")Signed-off-by Ivan Vecera <[email protected]>---
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Quoted 8 lines · Ivan Vecera
ST code value for clause 45 that has been changed by commit
8196b5fd6c73("i40e: Refactor I40E_MDIO_CLAUSE* macros") is currently wrong.The mentioned commit refactored ..MDIO_CLAUSE??_STCODE_MASK so their value is the same for both clauses. The value is correct for clause 22 but not for clause 45.
Quoted 5 lines
Fix the issue by adding a parameter to
I40E_GLGEN_MSCA_STCODE_MASKmacro that specifies required value.Fixes 8196b5fd6c73 ("i40e: Refactor I40E_MDIO_CLAUSE* macros")Signed-off-by Ivan Vecera <[email protected]>
Thanks Ivan,
I agree with your analysis and this fix looks good to me.
Quoted 18 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Ivan Vecera
Sent: Wednesday, November 29, 2023 9:47 PM
To: [email protected]
Cc: Kitszel, Przemyslaw <[email protected]>; Brandeburg, Jesse <[email protected]>; open list <[email protected]>; Loktionov, Aleksandr <[email protected]>; Eric Dumazet <[email protected]>; Nguyen, Anthony L <[email protected]>; moderated list:INTEL ETHERNET DRIVERS <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>; David S. Miller <[email protected]>
Subject: [Intel-wired-lan] [PATCH iwl-net] i40e: Fix ST code value for Clause 45ST code value for clause 45 that has been changed by commit
8196b5fd6c73("i40e: Refactor I40E_MDIO_CLAUSE* macros") is currently wrong.The mentioned commit refactored ..MDIO_CLAUSE??_STCODE_MASK so their value is the same for both clauses. The value is correct for clause 22 but not for clause 45.
Fix the issue by adding a parameter to
I40E_GLGEN_MSCA_STCODE_MASKmacro that specifies required value.
Quoted 7 lines
Fixes 8196b5fd6c73 ("i40e: Refactor I40E_MDIO_CLAUSE* macros")Signed-off-by Ivan Vecera <[email protected]>--- drivers/net/ethernet/intel/i40e/i40e_register.h | 2 +- drivers/net/ethernet/intel/i40e/i40e_type.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)