From patchwork Tue Nov 14 10:55:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Gonzalez X-Patchwork-Id: 10057455 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 E4DF26023A for ; Tue, 14 Nov 2017 12:17:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B225E2974E for ; Tue, 14 Nov 2017 12:17:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A637229753; Tue, 14 Nov 2017 12:17:36 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5EF952974E for ; Tue, 14 Nov 2017 12:17:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:References:To:From:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=VoLZ99O2fCbXRZGD90lCuJa0lTcKmstsHqRkDfTtAQw=; b=GNKOk7jHklGvv5 F9MfyXNwynuiGg7GCF9o44Crt1Oc2R8Q0jK6GmYls9vYic5rgDm0i8rCva75RkJXkGvFMFlCV5LGu +5lp4OLbiVqs68EKXnExva+ClbV2tjdeV2TbJZmtv763/0WgozlLWbtDiHfMpaqISb3hI15X/apLb ORUS0U3RbYaWkCKSy7yebq4APRh6GsBrUDDGCp6SIOdaYDGiN0nWoLypc4QbId4bMmS4xKN0eKBp0 28bsBaOyXKoXGoQqjLo5QgnmS82UVT3nXKZGE7laTq1+3lSlM/0KgtvpVldT9wUrM6FzmPwjXSq6v rw8HeoSQkS1pNm8Bm5QA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eEa9R-0004WF-G2; Tue, 14 Nov 2017 12:17:13 +0000 Received: from us-smtp-delivery-107.mimecast.com ([216.205.24.107]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eEZzl-00085I-C0 for linux-arm-kernel@lists.infradead.org; Tue, 14 Nov 2017 12:07:19 +0000 Received: from CPH-EX1.SDESIGNS.COM (195-215-56-170-static.dk.customer.tdc.net [195.215.56.170]) (Using TLS) by us-smtp-1.mimecast.com with ESMTP id us-mta-187-Z5uypGEzO0yC5e5APTyJ_A-1; Tue, 14 Nov 2017 07:06:54 -0500 X-MC-Unique: Z5uypGEzO0yC5e5APTyJ_A-1 Received: from [172.27.0.114] (172.27.0.114) by CPH-EX1.sdesigns.com (192.168.10.36) with Microsoft SMTP Server (TLS) id 14.3.294.0; Tue, 14 Nov 2017 13:06:52 +0100 Subject: [PATCH v3 2/4] net: nb8800: Simplify nb8800_pause_config() From: Marc Gonzalez To: David Miller , Mans Rullgard References: <230165aa-eaf1-6e2b-7ff3-45b3ee4ffc62@sigmadesigns.com> Message-ID: Date: Tue, 14 Nov 2017 11:55:40 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.1 MIME-Version: 1.0 In-Reply-To: <230165aa-eaf1-6e2b-7ff3-45b3ee4ffc62@sigmadesigns.com> X-Originating-IP: [172.27.0.114] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171114_040713_573026_FF6C78A0 X-CRM114-Status: UNSURE ( 7.20 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev , Thibaud Cornic , Florian Fainelli , Linux ARM , Mason Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The "flow control enable" bit can be tweaked, even if DMA is enabled. Signed-off-by: Marc Gonzalez --- drivers/net/ethernet/aurora/nb8800.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/drivers/net/ethernet/aurora/nb8800.c b/drivers/net/ethernet/aurora/nb8800.c index 26f719e2d6ca..09b8001e1ecc 100644 --- a/drivers/net/ethernet/aurora/nb8800.c +++ b/drivers/net/ethernet/aurora/nb8800.c @@ -633,7 +633,6 @@ static void nb8800_pause_config(struct net_device *dev) { struct nb8800_priv *priv = netdev_priv(dev); struct phy_device *phydev = dev->phydev; - u32 rxcr; if (priv->pause_aneg) { if (!phydev || !phydev->link) @@ -644,22 +643,7 @@ static void nb8800_pause_config(struct net_device *dev) } nb8800_modb(priv, NB8800_RX_CTL, RX_PAUSE_EN, priv->pause_rx); - - rxcr = nb8800_readl(priv, NB8800_RXC_CR); - if (!!(rxcr & RCR_FL) == priv->pause_tx) - return; - - if (netif_running(dev)) { - napi_disable(&priv->napi); - netif_tx_lock_bh(dev); - nb8800_dma_stop(dev); - nb8800_modl(priv, NB8800_RXC_CR, RCR_FL, priv->pause_tx); - nb8800_start_rx(dev); - netif_tx_unlock_bh(dev); - napi_enable(&priv->napi); - } else { - nb8800_modl(priv, NB8800_RXC_CR, RCR_FL, priv->pause_tx); - } + nb8800_modl(priv, NB8800_RXC_CR, RCR_FL, priv->pause_tx); } static void nb8800_link_reconfigure(struct net_device *dev)