From d198893e73c66ceb36cc1b1c3f261e82b7cc5700 Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Thu, 2 Apr 2015 04:06:31 +0200 Subject: net: dsa: mv88e6131: Determine and use number of switch ports Determine and use number of switch ports from chip ID instead of always using the maximum, and return error when an attempt is made to access a non-existing port. Signed-off-by: Guenter Roeck Reviewed-by: Andrew Lunn Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller --- drivers/net/dsa/mv88e6xxx.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/net/dsa/mv88e6xxx.h') diff --git a/drivers/net/dsa/mv88e6xxx.h b/drivers/net/dsa/mv88e6xxx.h index aca48792db4b..ef058444bdb7 100644 --- a/drivers/net/dsa/mv88e6xxx.h +++ b/drivers/net/dsa/mv88e6xxx.h @@ -109,6 +109,7 @@ struct mv88e6xxx_priv_state { struct mutex eeprom_mutex; int id; /* switch product id */ + int num_ports; /* number of switch ports */ /* hw bridging */ -- cgit v1.2.3-59-g8ed1b