diff options
author | Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> | 2016-11-11 16:10:47 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-11-13 13:40:24 -0500 |
commit | b993eec0e1ec4ad1c9d04362afd4fd83261052c9 (patch) | |
tree | 6fd4d8338d903aaa48050098a683f341e57e3493 | |
parent | 991ddb1f6a94dcf2d0cdc9efd0a1f8fcd21cfedc (diff) | |
download | linux-b993eec0e1ec4ad1c9d04362afd4fd83261052c9.tar.bz2 |
net: ethernet: ti: davinci_cpdma: don't stop ctlr if it was stopped
No need to stop ctlr if it was already stopped. It can cause timeout
warns. Steps:
- ifconfig eth0 down
- ethtool -l eth0 rx 8 tx 8
- ethtool -l eth0 rx 1 tx 1
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/ti/davinci_cpdma.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c b/drivers/net/ethernet/ti/davinci_cpdma.c index 56395cefb926..56708a79a18a 100644 --- a/drivers/net/ethernet/ti/davinci_cpdma.c +++ b/drivers/net/ethernet/ti/davinci_cpdma.c @@ -387,7 +387,7 @@ int cpdma_ctlr_stop(struct cpdma_ctlr *ctlr) int i; spin_lock_irqsave(&ctlr->lock, flags); - if (ctlr->state == CPDMA_STATE_TEARDOWN) { + if (ctlr->state != CPDMA_STATE_ACTIVE) { spin_unlock_irqrestore(&ctlr->lock, flags); return -EINVAL; } |