diff options
author | Tomer Tayar <Tomer.Tayar@cavium.com> | 2017-05-21 11:10:59 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-05-21 18:56:53 +0200 |
commit | b19601bbf1a1a230beb35ea77acbbfb5bbf542fa (patch) | |
tree | 761e8ee057f5812f6f8cedf19e887cddc8f7df6b /drivers/net/ethernet/qlogic/qed/qed.h | |
parent | qede: qedr closure after setting state (diff) | |
download | linux-b19601bbf1a1a230beb35ea77acbbfb5bbf542fa.tar.xz linux-b19601bbf1a1a230beb35ea77acbbfb5bbf542fa.zip |
qed: Fix setting of Management bitfields
The management firmware HSI contains masks which are already
shifted to their right place, so QED_MFW_SET_FIELD() is clearing
incorrect fields by shifting the mask by the offset.
Luckily, today we set the fields in an incrementing order [so we're
not erasing any previously set fields], but this still needs fixing.
Signed-off-by: Tomer Tayar <Tomer.Tayar@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/ethernet/qlogic/qed/qed.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed.h b/drivers/net/ethernet/qlogic/qed/qed.h index 162cd7ff9a69..fd8cf31cce05 100644 --- a/drivers/net/ethernet/qlogic/qed/qed.h +++ b/drivers/net/ethernet/qlogic/qed/qed.h @@ -92,7 +92,7 @@ enum qed_mcp_protocol_type; #define QED_MFW_SET_FIELD(name, field, value) \ do { \ - (name) &= ~((field ## _MASK) << (field ## _SHIFT)); \ + (name) &= ~(field ## _MASK); \ (name) |= (((value) << (field ## _SHIFT)) & (field ## _MASK));\ } while (0) |