e1000: fix multicast setting in VF

In function e1000_update_mc_addr_list_vf(), "msgbuf[0]" is used prior
to initialization at "msgbuf[0] |= E1000_VF_SET_MULTICAST_OVERFLOW".
And "msgbuf[0]" is overwritten at "msgbuf[0] = E1000_VF_SET_MULTICAST".

Fix it by moving the second line prior to the first one that mentioned
above.

Fixes: dffbaf7880a8 ("e1000: revert fix for multicast in VF")
Cc: stable@dpdk.org

Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>

Approved by:	imp
Obtained from:	DPDK (f58ca2f9ef6)
MFC after:	1 week
This commit is contained in:
Yong Wang 2017-02-21 04:33:23 -05:00 committed by Kevin Bowling
parent f6517a7e69
commit ecf2a89a99

View File

@ -419,12 +419,13 @@ void e1000_update_mc_addr_list_vf(struct e1000_hw *hw,
DEBUGOUT1("MC Addr Count = %d\n", mc_addr_count);
msgbuf[0] = E1000_VF_SET_MULTICAST;
if (mc_addr_count > 30) {
msgbuf[0] |= E1000_VF_SET_MULTICAST_OVERFLOW;
mc_addr_count = 30;
}
msgbuf[0] = E1000_VF_SET_MULTICAST;
msgbuf[0] |= mc_addr_count << E1000_VT_MSGINFO_SHIFT;
for (i = 0; i < mc_addr_count; i++) {