Skip to contentSkip to conversation

Patch "net: mvpp2: fix the mac address used when using PPv2.2" has been added to the 4.12-stable tree

PATCH [email protected] 1 participant 1 message Sep 15, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

net: mvpp2: fix the mac address used when using PPv2.2

to the 4.12-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
net-mvpp2-fix-the-mac-address-used-when-using-ppv2.2.patch
and it can be found in the queue-4.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Thu Sep 14 23:20:23 PDT 2017

From: Antoine Tenart <[email protected]>
Date: Fri, 25 Aug 2017 16:14:17 +0200
Subject: net: mvpp2: fix the mac address used when using PPv2.2

From: Antoine Tenart <[email protected]>

[ Upstream commit 4c22868264516fe0c42817a87f37efb44254e7a9 ]

The mac address is only retrieved from h/w when using PPv2.1. Otherwise the variable holding it is still checked and used if it contains a valid value. As the variable isn't initialized to an invalid mac address value, we end up with random mac addresses which can be the same for all the ports handled by this PPv2 driver.

Fixes this by initializing the h/w mac address variable to {0}, which is an invalid mac address value. This way the random assignation fallback is called and all ports end up with their own addresses.

Fixes 2697582144dd ("net: mvpp2: handle misc PPv2.1/PPv2.2 differences")
---
 drivers/net/ethernet/marvell/mvpp2.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/marvell/mvpp2.c +1 -1
@@ -6465,7 +6465,7 @@ static int mvpp2_port_probe(struct platf
 	struct resource *res;
 	const char *dt_mac_addr;
 	const char *mac_from;
-	char hw_mac_addr[ETH_ALEN];
+	char hw_mac_addr[ETH_ALEN] = {0};
 	u32 id;
 	int features;
 	int phy_mode;

Patches currently in stable-queue which might be from [email protected] are

queue-4.12/net-mvpp2-fix-the-mac-address-used-when-using-ppv2.2.patch