]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethernet: ti: cpsw: re-split res only when speed is changed
authorIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Sat, 10 Dec 2016 12:23:49 +0000 (14:23 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 10 Dec 2016 22:29:47 +0000 (17:29 -0500)
commit79192b318bdeb1bf6ae9026b35ea7d35da71b879
tree8f99bba5869107f49d4cec53c6f2f48b42573e3d
parentc5d492768d92977d4788a9e71b8583ad7964a2d5
net: ethernet: ti: cpsw: re-split res only when speed is changed

Don't re-split res in the following cases:
- speed of phys is not changed
- speed of phys is changed and no rate limited channels
- speed of phys is changed and all channels are rate limited
- phy is unlinked while dev is open
- phy is linked back but speed is not changed

The maximum speed is sum of "linked" phys, thus res are split taken
in account two interfaces, both for dual emac mode and for
switch mode.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/cpsw.c