net: ethernet: ti: davinci_cpdma: allow desc split while down
authorIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Mon, 8 Jul 2019 21:34:30 +0000 (00:34 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Jul 2019 21:58:04 +0000 (14:58 -0700)
commit962fb618909ef64e0c89af5b79ba0fed910b78e3
tree8343b772e6807c20c01638f01a1cf1ad8ac50663
parent6670acacd59eb72acfe5d69c966b5d2724cc521b
net: ethernet: ti: davinci_cpdma: allow desc split while down

That's possible to set ring params while interfaces are down. When
interface gets up it uses number of descs to fill rx queue and on
later on changes to create rx pools. Usually, this resplit can happen
after phy is up, but it can be needed before this, so allow it to
happen while setting number of rx descs, when interfaces are down.
Also, if no dependency on intf state, move it to cpdma layer, where
it should be.

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