From: Ivan Vecera Date: Fri, 6 Jan 2017 20:59:30 +0000 (+0100) Subject: be2net: fix unicast list filling X-Git-Tag: v4.1.12-106.0.20170710_2300~8 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ee679923a39290c9a0de8b7ccc58a7a1e1fb5967;p=users%2Fjedix%2Flinux-maple.git be2net: fix unicast list filling The adapter->pmac_id[0] item is used for primary MAC address but this is not true for adapter->uc_list[0] as is assumed in be_set_uc_list(). There are N UC addresses copied first from net_device to adapter->uc_list[1..N] and then N UC addresses from adapter->uc_list[0..N-1] are sent to HW. So the last UC address is never stored into HW and address 00:00:00:00;00:00 (from uc_list[0]) is used instead. Orabug: 26403655 Cc: Sathya Perla Cc: Ajit Khaparde Cc: Sriharsha Basavapatna Cc: Somnath Kotur Fixes: b717241 be2net: replace polling with sleeping in the FW completion path Signed-off-by: Ivan Vecera Signed-off-by: David S. Miller Signed-off-by: Suresh Reddy Signed-off-by: Kirtikar Kashyap Reviewed-by: Reviewed-by: Jack Vogel --- diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index 6189a6ace9000..8070709c043b5 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c @@ -1713,9 +1713,8 @@ static void be_set_uc_list(struct be_adapter *adapter) } if (adapter->update_uc_list) { - i = 1; /* First slot is claimed by the Primary MAC */ - /* cache the uc-list in adapter array */ + i = 0; netdev_for_each_uc_addr(ha, netdev) { ether_addr_copy(adapter->uc_list[i].mac, ha->addr); i++;