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

Commit 2c7a9dc1 authored by Ajit Khaparde's avatar Ajit Khaparde Committed by David S. Miller
Browse files

be2net: Avoid programming permenant MAC by BE3-R VFs



On BE3-R, the PF programs the initial MAC address for its VFs. Doing it again
in VF probe, causes a FW error which although harmless generates
an unnecessary error log message.

Signed-off-by: default avatarVasundhara Volam <vasundhara.volam@emulex.com>
Signed-off-by: default avatarSathya Perla <sathya.perla@emulex.com>
Signed-off-by: default avatarAjit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 09e83a9d
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -503,6 +503,7 @@ struct be_adapter {
};
};


#define be_physfn(adapter)		(!adapter->virtfn)
#define be_physfn(adapter)		(!adapter->virtfn)
#define be_virtfn(adapter)		(adapter->virtfn)
#define	sriov_enabled(adapter)		(adapter->num_vfs > 0)
#define	sriov_enabled(adapter)		(adapter->num_vfs > 0)
#define sriov_want(adapter)             (be_physfn(adapter) &&	\
#define sriov_want(adapter)             (be_physfn(adapter) &&	\
					 (num_vfs || pci_num_vf(adapter->pdev)))
					 (num_vfs || pci_num_vf(adapter->pdev)))
+4 −6
Original line number Original line Diff line number Diff line
@@ -3253,10 +3253,8 @@ static int be_mac_setup(struct be_adapter *adapter)
		memcpy(mac, adapter->netdev->dev_addr, ETH_ALEN);
		memcpy(mac, adapter->netdev->dev_addr, ETH_ALEN);
	}
	}


	/* On BE3 VFs this cmd may fail due to lack of privilege.
	/* For BE3-R VFs, the PF programs the initial MAC address */
	 * Ignore the failure as in this case pmac_id is fetched
	if (!(BEx_chip(adapter) && be_virtfn(adapter)))
	 * in the IFACE_CREATE cmd.
	 */
		be_cmd_pmac_add(adapter, mac, adapter->if_handle,
		be_cmd_pmac_add(adapter, mac, adapter->if_handle,
				&adapter->pmac_id[0], 0);
				&adapter->pmac_id[0], 0);
	return 0;
	return 0;