OSDN Git Service

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)
commit0be01b8e0a365138e8f94315de13ab3751d199e2
tree8f99bba5869107f49d4cec53c6f2f48b42573e3d
parent32b78d8563c57fc1d68ae73a5ae15359cb243f89
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