]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit4e3bd5e755d8068721443f0161c3799c311dd79a
tree50b88f4d2341f887b7f0bb19f1a5f6d4b04f4114
parentccdf6b67fe7795c01112d3f945489d39bebc0c1a
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