]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethernet: ti: davinci_cpdma: use idled submit
authorIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Sat, 15 Jun 2019 11:01:32 +0000 (14:01 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 16 Jun 2019 21:03:25 +0000 (14:03 -0700)
commit6184e8c07b3fa482b953474d860a9a0eaf05908d
tree19da3891f6595a817ddb9f1c8895a1f71aa83ec7
parent7448db200a90f81f627888951dbc6d4a128a0677
net: ethernet: ti: davinci_cpdma: use idled submit

While data pass suspend, reuse of rx descriptors can be disabled using
channel state & lock from cpdma layer. For this, submit to a channel
has to be disabled using state != "not active" under lock, what is done
with this patch. The same submit is used to fill rx channel while
ndo_open, when channel is idled, so add idled submit routine that
allows to prepare descs for the channel. All this simplifies code and
helps to avoid dormant mode usage and send packets only to active
channels, avoiding potential race in later on changes. Also add missed
sync barrier analogically like in other places after stopping tx
queues.

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