From patchwork Fri Nov 11 14:10:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 9423075 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A9D2460720 for ; Fri, 11 Nov 2016 14:11:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A0D1E29B2D for ; Fri, 11 Nov 2016 14:11:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9595A29B2E; Fri, 11 Nov 2016 14:11:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2B9C29B2F for ; Fri, 11 Nov 2016 14:11:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756452AbcKKOK4 (ORCPT ); Fri, 11 Nov 2016 09:10:56 -0500 Received: from mail-lf0-f44.google.com ([209.85.215.44]:33163 "EHLO mail-lf0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752140AbcKKOKy (ORCPT ); Fri, 11 Nov 2016 09:10:54 -0500 Received: by mail-lf0-f44.google.com with SMTP id c13so13265910lfg.0 for ; Fri, 11 Nov 2016 06:10:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=BpGusO43BpPZ6gicLF/gJL8oLqFZYaKNkDOM0vhaYGU=; b=YHUH+prMytxm7fvitsGOGZTmtl0AfwzWTnjEgkSCljbcvb5ii4inSk7GaP3jN2SwaS oUKx/B57TjJhiH//D+dHifwnd8aingjQflanyHUrx1231RoAvnTW75lmv48vtVVlVP3B bmxsHKOpobx+gNdN5OAHf/XLYjir7tgGZKDaQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=BpGusO43BpPZ6gicLF/gJL8oLqFZYaKNkDOM0vhaYGU=; b=A0g+XYDtE3O3Wi2F6br3OiGDzDB7yuchtc7XkatefWKgcHvkX9lXOA2MnWBaEZsmkp 8ogstlxzmM/2tkDhD/5zQiv+o31sNJbe48qyW4vYFCgii3Y+mmzKLi1rJ2/wySZWoatv htEJN1FMJ99A5ZI8WmDc7IoeN4tYXv0HAT8PiIsXGdEWjrA0Fi51DuHqhGn8GYJ2uuGP YRfVH1546318/Jc0TyG8/zAal6/mK0uXqc2L8/MYgyEFlzEce8WZJKfsu7vyYxyBWBH+ 4Qo1uSYsEJebvjgg7F78hQYJUYmGAEDhR6UbWue4LVSGkI/WM03o4hrZTmez3KAcT8qX xUaw== X-Gm-Message-State: ABUngvek5pcss73aPq6TuzxH6ewKzql9W1do3207NclSnbmm6ox7uEgu0we8glzTv4ND8rqO X-Received: by 10.25.14.81 with SMTP id 78mr1866620lfo.183.1478873452971; Fri, 11 Nov 2016 06:10:52 -0800 (PST) Received: from localhost.localdomain (183-224-132-95.pool.ukrtel.net. [95.132.224.183]) by smtp.gmail.com with ESMTPSA id 5sm2258056ljf.18.2016.11.11.06.10.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 11 Nov 2016 06:10:52 -0800 (PST) From: Ivan Khoronzhuk To: mugunthanvnm@ti.com, grygorii.strashko@ti.com, netdev@vger.kernel.org Cc: linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, Ivan Khoronzhuk Subject: [PATCH] net: ethernet: ti: davinci_cpdma: don't stop ctlr if it was stopped Date: Fri, 11 Nov 2016 16:10:47 +0200 Message-Id: <1478873447-1309-1-git-send-email-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- Based on net-next/master drivers/net/ethernet/ti/davinci_cpdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c b/drivers/net/ethernet/ti/davinci_cpdma.c index 56395ce..56708a7 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; }