[PATCH 03/14] net: dsa: Report known silicon revisions for Marvell 88E6131
Report known silicon revisions when probing Marvell 88E6131 switches. Signed-off-by: Guenter Roeck --- drivers/net/dsa/mv88e6131.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/dsa/mv88e6131.c b/drivers/net/dsa/mv88e6131.c index 244c735..1230f52 100644 --- a/drivers/net/dsa/mv88e6131.c +++ b/drivers/net/dsa/mv88e6131.c @@ -21,6 +21,7 @@ #define ID_60850x04a0 #define ID_60950x0950 #define ID_61310x1060 +#define ID_6131_B2 0x1066 static char *mv88e6131_probe(struct device *host_dev, int sw_addr) { @@ -32,12 +33,15 @@ static char *mv88e6131_probe(struct device *host_dev, int sw_addr) ret = __mv88e6xxx_reg_read(bus, sw_addr, REG_PORT(0), 0x03); if (ret >= 0) { - ret &= 0xfff0; - if (ret == ID_6085) + int ret_masked = ret & 0xfff0; + + if (ret_masked == ID_6085) return "Marvell 88E6085"; - if (ret == ID_6095) + if (ret_masked == ID_6095) return "Marvell 88E6095/88E6095F"; - if (ret == ID_6131) + if (ret == ID_6131_B2) + return "Marvell 88E6131 (B2)"; + if (ret_masked == ID_6131) return "Marvell 88E6131"; } -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 03/14] net: dsa: Report known silicon revisions for Marvell 88E6131
Report known silicon revisions when probing Marvell 88E6131 switches. Signed-off-by: Guenter Roeck li...@roeck-us.net --- drivers/net/dsa/mv88e6131.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/dsa/mv88e6131.c b/drivers/net/dsa/mv88e6131.c index 244c735..1230f52 100644 --- a/drivers/net/dsa/mv88e6131.c +++ b/drivers/net/dsa/mv88e6131.c @@ -21,6 +21,7 @@ #define ID_60850x04a0 #define ID_60950x0950 #define ID_61310x1060 +#define ID_6131_B2 0x1066 static char *mv88e6131_probe(struct device *host_dev, int sw_addr) { @@ -32,12 +33,15 @@ static char *mv88e6131_probe(struct device *host_dev, int sw_addr) ret = __mv88e6xxx_reg_read(bus, sw_addr, REG_PORT(0), 0x03); if (ret = 0) { - ret = 0xfff0; - if (ret == ID_6085) + int ret_masked = ret 0xfff0; + + if (ret_masked == ID_6085) return Marvell 88E6085; - if (ret == ID_6095) + if (ret_masked == ID_6095) return Marvell 88E6095/88E6095F; - if (ret == ID_6131) + if (ret == ID_6131_B2) + return Marvell 88E6131 (B2); + if (ret_masked == ID_6131) return Marvell 88E6131; } -- 1.9.1 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/