OSDN Git Service

net: dsa: mv88e6xxx: Only reconfigure MAC when something changes
authorAndrew Lunn <andrew@lunn.ch>
Thu, 18 Apr 2019 01:11:39 +0000 (03:11 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Apr 2019 21:08:21 +0000 (14:08 -0700)
commita26deec69fa4a1843f11f11e123b49ed0699ff00
treeb44b400a49f3e9c1ba5d568ebdcb4176bc19c46c
parent0768e17073dc527ccd18ed5f96ce85f9985e9115
net: dsa: mv88e6xxx: Only reconfigure MAC when something changes

phylink will call the mac_config() callback once per second when
polling a PHY or a fixed link. The MAC driver is not supposed to
reconfigure the MAC if nothing has changed.

Make the mv88e6xxx driver look at the current configuration of the
port, and return early if nothing has changed.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/chip.c