net: dsa: mv88e6xxx: create serdes_get_lane chip operation
authorMarek Behún <marek.behun@nic.cz>
Mon, 26 Aug 2019 21:31:52 +0000 (23:31 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 28 Aug 2019 04:42:16 +0000 (21:42 -0700)
commit17deaf5cb37a365fd65aaa0e14d1a2e1a50418c7
tree50b88f4d2341f887b7f0bb19f1a5f6d4b04f4114
parent609070133aff1f2b533561758aa97c947fa534c8
net: dsa: mv88e6xxx: create serdes_get_lane chip operation

Create a serdes_get_lane() method in the mv88e6xxx operations structure.
Use it instead of calling the different implementations.
Also change the methods so that their return value is used only for
error. The lane number is put into a place referred to by a pointer
given as argument. If the port does not have a lane, return -ENODEV.
Lanes are phy addresses, so use u8 as their type.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Vivien Didelot <vivien.didelot@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/chip.c
drivers/net/dsa/mv88e6xxx/chip.h
drivers/net/dsa/mv88e6xxx/port.c
drivers/net/dsa/mv88e6xxx/serdes.c
drivers/net/dsa/mv88e6xxx/serdes.h