* [patch net 0/2] mlxsw: Couple of fixes
@ 2017-03-14 12:59 Jiri Pirko
2017-03-14 13:00 ` [patch net 1/2] mlxsw: reg: Fix SPVM max record count Jiri Pirko
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jiri Pirko @ 2017-03-14 12:59 UTC (permalink / raw)
To: netdev; +Cc: davem, idosch, mlxsw
From: Jiri Pirko <jiri@mellanox.com>
Couple or small fixes.
Jiri Pirko (2):
mlxsw: reg: Fix SPVM max record count
mlxsw: reg: Fix SPVMLR max record count
drivers/net/ethernet/mellanox/mlxsw/reg.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* [patch net 1/2] mlxsw: reg: Fix SPVM max record count
2017-03-14 12:59 [patch net 0/2] mlxsw: Couple of fixes Jiri Pirko
@ 2017-03-14 13:00 ` Jiri Pirko
2017-03-14 13:00 ` [patch net 2/2] mlxsw: reg: Fix SPVMLR " Jiri Pirko
2017-03-14 18:35 ` [patch net 0/2] mlxsw: Couple of fixes David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Jiri Pirko @ 2017-03-14 13:00 UTC (permalink / raw)
To: netdev; +Cc: davem, idosch, mlxsw
From: Jiri Pirko <jiri@mellanox.com>
The num_rec field is 8 bit, so the maximal count number is 255. This
fixes vlans not being enabled for wider ranges than 255.
Fixes: b2e345f9a454 ("mlxsw: reg: Add Switch Port VID and Switch Port VLAN Membership registers definitions")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
---
drivers/net/ethernet/mellanox/mlxsw/reg.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/reg.h b/drivers/net/ethernet/mellanox/mlxsw/reg.h
index 0899e2d..65e1942 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/reg.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/reg.h
@@ -769,7 +769,7 @@ static inline void mlxsw_reg_spvid_pack(char *payload, u8 local_port, u16 pvid)
#define MLXSW_REG_SPVM_ID 0x200F
#define MLXSW_REG_SPVM_BASE_LEN 0x04 /* base length, without records */
#define MLXSW_REG_SPVM_REC_LEN 0x04 /* record length */
-#define MLXSW_REG_SPVM_REC_MAX_COUNT 256
+#define MLXSW_REG_SPVM_REC_MAX_COUNT 255
#define MLXSW_REG_SPVM_LEN (MLXSW_REG_SPVM_BASE_LEN + \
MLXSW_REG_SPVM_REC_LEN * MLXSW_REG_SPVM_REC_MAX_COUNT)
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [patch net 2/2] mlxsw: reg: Fix SPVMLR max record count
2017-03-14 12:59 [patch net 0/2] mlxsw: Couple of fixes Jiri Pirko
2017-03-14 13:00 ` [patch net 1/2] mlxsw: reg: Fix SPVM max record count Jiri Pirko
@ 2017-03-14 13:00 ` Jiri Pirko
2017-03-14 18:35 ` [patch net 0/2] mlxsw: Couple of fixes David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Jiri Pirko @ 2017-03-14 13:00 UTC (permalink / raw)
To: netdev; +Cc: davem, idosch, mlxsw
From: Jiri Pirko <jiri@mellanox.com>
The num_rec field is 8 bit, so the maximal count number is 255.
This fixes vlans learning not being enabled for wider ranges than 255.
Fixes: a4feea74cd7a ("mlxsw: reg: Add Switch Port VLAN MAC Learning register definition")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
---
drivers/net/ethernet/mellanox/mlxsw/reg.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/reg.h b/drivers/net/ethernet/mellanox/mlxsw/reg.h
index 65e1942..d9616da 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/reg.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/reg.h
@@ -1702,7 +1702,7 @@ static inline void mlxsw_reg_sfmr_pack(char *payload,
#define MLXSW_REG_SPVMLR_ID 0x2020
#define MLXSW_REG_SPVMLR_BASE_LEN 0x04 /* base length, without records */
#define MLXSW_REG_SPVMLR_REC_LEN 0x04 /* record length */
-#define MLXSW_REG_SPVMLR_REC_MAX_COUNT 256
+#define MLXSW_REG_SPVMLR_REC_MAX_COUNT 255
#define MLXSW_REG_SPVMLR_LEN (MLXSW_REG_SPVMLR_BASE_LEN + \
MLXSW_REG_SPVMLR_REC_LEN * \
MLXSW_REG_SPVMLR_REC_MAX_COUNT)
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [patch net 0/2] mlxsw: Couple of fixes
2017-03-14 12:59 [patch net 0/2] mlxsw: Couple of fixes Jiri Pirko
2017-03-14 13:00 ` [patch net 1/2] mlxsw: reg: Fix SPVM max record count Jiri Pirko
2017-03-14 13:00 ` [patch net 2/2] mlxsw: reg: Fix SPVMLR " Jiri Pirko
@ 2017-03-14 18:35 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2017-03-14 18:35 UTC (permalink / raw)
To: jiri; +Cc: netdev, idosch, mlxsw
From: Jiri Pirko <jiri@resnulli.us>
Date: Tue, 14 Mar 2017 13:59:59 +0100
> Couple or small fixes.
Series applied, thanks Jiri.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-03-14 18:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-14 12:59 [patch net 0/2] mlxsw: Couple of fixes Jiri Pirko
2017-03-14 13:00 ` [patch net 1/2] mlxsw: reg: Fix SPVM max record count Jiri Pirko
2017-03-14 13:00 ` [patch net 2/2] mlxsw: reg: Fix SPVMLR " Jiri Pirko
2017-03-14 18:35 ` [patch net 0/2] mlxsw: Couple of fixes David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).