aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/ti/davinci_cpdma.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-03-24 15:32:34 -0400
committerDavid S. Miller <davem@davemloft.net>2014-03-24 15:32:34 -0400
commit866b7cdf5f8e440c4921765b7f4e1fe102a7e089 (patch)
tree06ca0a0ed579d0e8aaab3a7b0f2921f3c9c20855 /drivers/net/ethernet/ti/davinci_cpdma.c
parentc27f0872a3448c46e561e226b5b97f77187b06d2 (diff)
parentcd11cf505318ff24e42f35145f9cdf8596fa1958 (diff)
downloadlinux-linaro-stable-866b7cdf5f8e440c4921765b7f4e1fe102a7e089.tar.gz
Merge branch 'davinci_emac'
Christian Riesch says: ==================== net: davinci_emac: Fix interrupt requests and error handling since commit 6892b41d9701283085b655c6086fb57a5d63fa47 (Linux 3.11) the davinci_emac driver is broken. After doing ifconfig down, ifconfig up, requesting the interrupts for the driver fails. The interface remains dead until the board is rebooted. The first patch in this patchset reverts commit 6892b41d9701283085b655c6086fb57a5d63fa47 partially and makes the driver useable again. During the work on the first patch, a number of bugs in the error handling of the driver's ndo_open code were found. The second patch fixes these bugs. I believe the first patch meets the rules for stable kernels, I therefore added the stable tag to this patch. The second patch is just cleanup, the code that is fixed by this patch is only executed in case of an error. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ti/davinci_cpdma.c')
-rw-r--r--drivers/net/ethernet/ti/davinci_cpdma.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c b/drivers/net/ethernet/ti/davinci_cpdma.c
index 364d0c7952c0..88ef27067bf2 100644
--- a/drivers/net/ethernet/ti/davinci_cpdma.c
+++ b/drivers/net/ethernet/ti/davinci_cpdma.c
@@ -355,7 +355,7 @@ int cpdma_ctlr_stop(struct cpdma_ctlr *ctlr)
int i;
spin_lock_irqsave(&ctlr->lock, flags);
- if (ctlr->state != CPDMA_STATE_ACTIVE) {
+ if (ctlr->state == CPDMA_STATE_TEARDOWN) {
spin_unlock_irqrestore(&ctlr->lock, flags);
return -EINVAL;
}
@@ -891,7 +891,7 @@ int cpdma_chan_stop(struct cpdma_chan *chan)
unsigned timeout;
spin_lock_irqsave(&chan->lock, flags);
- if (chan->state != CPDMA_STATE_ACTIVE) {
+ if (chan->state == CPDMA_STATE_TEARDOWN) {
spin_unlock_irqrestore(&chan->lock, flags);
return -EINVAL;
}