Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b19601bb authored by Tomer Tayar's avatar Tomer Tayar Committed by David S. Miller
Browse files

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: default avatarTomer Tayar <Tomer.Tayar@cavium.com>
Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2e7022d6
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -92,7 +92,7 @@ enum qed_mcp_protocol_type;


#define QED_MFW_SET_FIELD(name, field, value)				       \
#define QED_MFW_SET_FIELD(name, field, value)				       \
	do {								       \
	do {								       \
		(name)	&= ~((field ## _MASK) << (field ## _SHIFT));	       \
		(name)	&= ~(field ## _MASK);	       \
		(name)	|= (((value) << (field ## _SHIFT)) & (field ## _MASK));\
		(name)	|= (((value) << (field ## _SHIFT)) & (field ## _MASK));\
	} while (0)
	} while (0)