net/mlx5: Use read-modify-write when changing PCMR register values
authorEli Britstein <elibr@mellanox.com>
Mon, 21 Jan 2019 07:00:42 +0000 (09:00 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 22 Feb 2019 21:38:23 +0000 (13:38 -0800)
commitbfedc645deb7f96303afbdb38a42e2a8f356a5cc
tree839b8aaae7e8b81c7d3c608790732c2586c9fe20
parent2fce40a592daa92f1565152cb68d4c4ca7e97d52
net/mlx5: Use read-modify-write when changing PCMR register values

Currently changing a PCMR field is done by setting the field in a
zeroed buffer, zeroing other unrelated fields.
Fix this behaviour by modifying only the required field after first
reading the current register values, as a pre-step towards using more
fields in PCMR register.

Signed-off-by: Eli Britstein <elibr@mellanox.com>
Reviewed-by: Oz Shlomo <ozsh@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/port.c