From patchwork Mon Jan 20 11:13:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Jensen X-Patchwork-Id: 3511561 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B95F7C02DC for ; Mon, 20 Jan 2014 11:14:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ADE3020161 for ; Mon, 20 Jan 2014 11:14:34 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 758162013D for ; Mon, 20 Jan 2014 11:14:33 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W5CoE-0004mi-0a; Mon, 20 Jan 2014 11:14:26 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W5CoB-0001tz-Ah; Mon, 20 Jan 2014 11:14:23 +0000 Received: from mail-lb0-x22f.google.com ([2a00:1450:4010:c04::22f]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W5Co7-0001s6-DV for linux-arm-kernel@lists.infradead.org; Mon, 20 Jan 2014 11:14:20 +0000 Received: by mail-lb0-f175.google.com with SMTP id p9so2470979lbv.20 for ; Mon, 20 Jan 2014 03:13:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=qn/uJT9qWrZkzwJTg6ZVPAUXbtOK8Dyl2wLcvLyY460=; b=r1hlmyx3LRN0Bt1H/7U7j0FdC12FHdcv6+Csfw2366+szoSwhNTcf/Depsrs8aoHR5 jbnjj5xxyCcb43mzU2bOa91yvyQ5GSLa/UA0mdukpZEDXo4PmT3rF9cydHkUIwEMfRTR xmJZu++vuAUUzSeF61rdjDOyrexhVPaAbr+V2oWJb1obONzWc/YawTTQyBxBfbz+W9Kd laYbXm2HzdrbcvO5x3Q22uAyU6na+XfzVG594fZxfh5vP+YsHIyhUSLP5u1muXi2US1I 255JZzLniAjQKCsQQZLw/dOSIqr0KYYe+sBevR/O33ZbpAMbecWc58pZkJvF0JCRaWzX B/Eg== X-Received: by 10.112.199.225 with SMTP id jn1mr783798lbc.49.1390216431569; Mon, 20 Jan 2014 03:13:51 -0800 (PST) Received: from Ildjarn.ath.cx (static-213-115-41-10.sme.bredbandsbolaget.se. [213.115.41.10]) by mx.google.com with ESMTPSA id sv5sm551815lbb.9.2014.01.20.03.13.49 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 20 Jan 2014 03:13:50 -0800 (PST) From: Jonas Jensen To: netdev@vger.kernel.org Subject: [PATCH v3 1/7] net: moxa: clear TX descriptor length bits between sends Date: Mon, 20 Jan 2014 12:13:13 +0100 Message-Id: <1390216399-27028-1-git-send-email-jonas.jensen@gmail.com> X-Mailer: git-send-email 1.8.2.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140120_061419_626746_85B9869A X-CRM114-Status: UNSURE ( 8.78 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) Cc: f.fainelli@gmail.com, linux-kernel@vger.kernel.org, Jonas Jensen , bhutchings@solarflare.com, davem@davemloft.net, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add TX_DESC1_BUF_SIZE_MASK to bits that are cleared, before the TX buffer length is set. Failing to do so can cause the controller to drop dead i.e. all TX interrupts stop, resulting in complete communication failure. Addresses https://bugzilla.kernel.org/show_bug.cgi?id=69031 Signed-off-by: Jonas Jensen --- Notes: Applies to next-20140120 drivers/net/ethernet/moxa/moxart_ether.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/moxa/moxart_ether.c b/drivers/net/ethernet/moxa/moxart_ether.c index 5020fd4..aa45607 100644 --- a/drivers/net/ethernet/moxa/moxart_ether.c +++ b/drivers/net/ethernet/moxa/moxart_ether.c @@ -348,7 +348,8 @@ static int moxart_mac_start_xmit(struct sk_buff *skb, struct net_device *ndev) txdes1 = readl(desc + TX_REG_OFFSET_DESC1); txdes1 |= TX_DESC1_LTS | TX_DESC1_FTS; - txdes1 &= ~(TX_DESC1_FIFO_COMPLETE | TX_DESC1_INTR_COMPLETE); + txdes1 &= ~(TX_DESC1_FIFO_COMPLETE | TX_DESC1_INTR_COMPLETE | + TX_DESC1_BUF_SIZE_MASK); txdes1 |= (len & TX_DESC1_BUF_SIZE_MASK); writel(txdes1, desc + TX_REG_OFFSET_DESC1); writel(TX_DESC0_DMA_OWN, desc + TX_REG_OFFSET_DESC0);