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

Commit edd664bb authored by Chris Healy's avatar Chris Healy Committed by David S. Miller
Browse files

dsa: Add reporting of silicon revision for Marvell 88E6123/88E6161/88E6165 switches.



Add reporting of silicon revision during the probe function for Marvell 88E6123/88E6161/88E6165 switches.

Signed-off-by: default avatarChris Healy <cphealy@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a5a11955
Loading
Loading
Loading
Loading
+17 −4
Original line number Diff line number Diff line
@@ -20,12 +20,25 @@ static char *mv88e6123_61_65_probe(struct mii_bus *bus, int sw_addr)

	ret = __mv88e6xxx_reg_read(bus, sw_addr, REG_PORT(0), 0x03);
	if (ret >= 0) {
		ret &= 0xfff0;
		if (ret == 0x1210)
		if (ret == 0x1212)
			return "Marvell 88E6123 (A1)";
		if (ret == 0x1213)
			return "Marvell 88E6123 (A2)";
		if ((ret & 0xfff0) == 0x1210)
			return "Marvell 88E6123";
		if (ret == 0x1610)

		if (ret == 0x1612)
			return "Marvell 88E6161 (A1)";
		if (ret == 0x1613)
			return "Marvell 88E6161 (A2)";
		if ((ret & 0xfff0) == 0x1610)
			return "Marvell 88E6161";
		if (ret == 0x1650)

		if (ret == 0x1652)
			return "Marvell 88E6165 (A1)";
		if (ret == 0x1653)
			return "Marvell 88e6165 (A2)";
		if ((ret & 0xfff0) == 0x1650)
			return "Marvell 88E6165";
	}