net: dsa: mv88e6131: Determine and use number of switch ports
authorGuenter Roeck <linux@roeck-us.net>
Thu, 2 Apr 2015 02:06:31 +0000 (04:06 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 2 Apr 2015 02:55:40 +0000 (22:55 -0400)
commitd198893e73c66ceb36cc1b1c3f261e82b7cc5700
tree41827697e0595cdf0b42f8d30d89f36e7099038e
parentb2eb06627718836f7d133141693ec9685b4c4ef5
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 <linux@roeck-us.net>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6131.c
drivers/net/dsa/mv88e6xxx.h