Skip to content

Commit

Permalink
net: ethernet: ti: davinci_cpdma: don't stop ctlr if it was stopped
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ivan Khoronzhuk authored and David S. Miller committed Nov 13, 2016
1 parent 991ddb1 commit b993eec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/ti/davinci_cpdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit b993eec

Please sign in to comment.