From patchwork Thu Jun 20 21:13:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 2758671 Return-Path: X-Original-To: patchwork-linux-sh@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 77C8BC0AB1 for ; Thu, 20 Jun 2013 21:13:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A7C50202F7 for ; Thu, 20 Jun 2013 21:13:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DEF18202F6 for ; Thu, 20 Jun 2013 21:13:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756268Ab3FTVNn (ORCPT ); Thu, 20 Jun 2013 17:13:43 -0400 Received: from mail-la0-f51.google.com ([209.85.215.51]:40118 "EHLO mail-la0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755213Ab3FTVNm (ORCPT ); Thu, 20 Jun 2013 17:13:42 -0400 Received: by mail-la0-f51.google.com with SMTP id fq12so6114108lab.38 for ; Thu, 20 Jun 2013 14:13:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=to:subject:cc:from:organization:date:mime-version:content-type :content-transfer-encoding:message-id:x-gm-message-state; bh=vjWQwChf1+4C28FYjE82qYHh6ogiQKAsIIrtG/OocIk=; b=kulUobRLOfO/5wJYl03/13NbUqjihXtofaWx8BjM/ptTDhYHSCMjdudMlLRImk9eMV 2gbcvZ8B1C/9xzr05HWglhJv/4hhcI8EtkvjecZTnrp8bzaoCJnmpBLSu0kMAiBGpUbz zyA3kF9QPQZbbat4gOxeck3yYGqjPcvINJiX2unAKLF2Zo/n1NBpaZAYUesBWV1xpFR4 WoVYLnOSrxaMUL0nqjT5Znzg+sXJdnVdo027oQ+noo11rA4cl1fZdzhJYZpU7xW+h9Sf zT5BSXKf2libfFP1toUrHFA9MZq8L7nWulu6IU0XHz6ZsnJAxapNyT40KJAZ2Ym57mQs hcBg== X-Received: by 10.152.8.198 with SMTP id t6mr4581304laa.36.1371762821001; Thu, 20 Jun 2013 14:13:41 -0700 (PDT) Received: from wasted.dev.rtsoft.ru (ppp91-76-80-204.pppoe.mtu-net.ru. [91.76.80.204]) by mx.google.com with ESMTPSA id v18sm805433lbd.5.2013.06.20.14.13.39 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 20 Jun 2013 14:13:40 -0700 (PDT) To: netdev@vger.kernel.org Subject: [PATCH 2/2] sh_eth: fix misreporting of transmit abort Cc: nobuhiro.iwamatsu.yj@renesas.com, linux-sh@vger.kernel.org From: Sergei Shtylyov Organization: Cogent Embedded Date: Fri, 21 Jun 2013 01:13:42 +0400 MIME-Version: 1.0 Message-Id: <201306210113.43087.sergei.shtylyov@cogentembedded.com> X-Gm-Message-State: ALoCoQkpgfXR4kR/pgMpGuytN4SAmnCgcQOBecf9URexEuC7zwrus6cuj1OD5D47KsjS4+ZicIT1 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 Due to obviously missing braces, EESR.TABT (transmit abort) interrupt may be reported even if it hasn't happened, just when EESR.TWB (transmit descriptor write-back) interrupt happens. Luckily (?), EESR.TWB is disabled by the driver via the TRIMD register and all the interrupt masks, so that transmit abort is never actually logged... Put the braces where they should be and fix the incoherent comment, while at it. Signed-off-by: Sergei Shtylyov --- The patch is against Dave Miller's 'net.git' repo. Maybe it should be merged to the 'net-next.git' repo instead, it's up to Dave to decide. The same can be said about whether this should be merged to -stable... drivers/net/ethernet/renesas/sh_eth.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: net/drivers/net/ethernet/renesas/sh_eth.c =================================================================== --- net.orig/drivers/net/ethernet/renesas/sh_eth.c +++ net/drivers/net/ethernet/renesas/sh_eth.c @@ -1550,11 +1550,12 @@ static void sh_eth_error(struct net_devi ignore_link: if (intr_status & EESR_TWB) { - /* Write buck end. unused write back interrupt */ - if (intr_status & EESR_TABT) /* Transmit Abort int */ + /* Unused write back interrupt */ + if (intr_status & EESR_TABT) { /* Transmit Abort int */ ndev->stats.tx_aborted_errors++; if (netif_msg_tx_err(mdp)) dev_err(&ndev->dev, "Transmit Abort\n"); + } } if (intr_status & EESR_RABT) {