From patchwork Mon Aug 27 21:53:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaccon Bastiaansen X-Patchwork-Id: 1378471 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 671A4DF280 for ; Mon, 27 Aug 2012 21:56:50 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T67GO-0002nN-6F; Mon, 27 Aug 2012 21:54:28 +0000 Received: from mail-wg0-f49.google.com ([74.125.82.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1T67GL-0002mZ-3S for linux-arm-kernel@lists.infradead.org; Mon, 27 Aug 2012 21:54:25 +0000 Received: by wgbdt14 with SMTP id dt14so1977582wgb.18 for ; Mon, 27 Aug 2012 14:54:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=BvB7zxPvLWK3H7PuT6QJIpFzJl+trAm1ZJHfOaGYKoA=; b=enGJOHeIlQbH2A7Wz8n4O1O/lryX/YjDhuFKmFg+phZcau8g5xevEQharGgfJz1hiz n4NXCW6j+qeihlTBiLKyCgvpAWjZhNBRRXkbNawNVqDNfxdVcMiChEwDU+bkVMTTtbg7 tgCQndlBYm7+PAe/nSunZ9vM2vQ5RSdlIDJPOU67sV//p97xC46eNonhMeF2zx6DgPIK 3nZ2K5LzhizyLjwMPri1wKWOlUER+WfdeGuH2OV6apKZJS9rZiVHl/ebZtQmbrj/IS1c Ij0yAm9cWwXvMCI55YWlMw5FxDitcZZcZeBaaAAkrI2ddU25+hXJM0j1CWU9Y9gtGQbv EaZA== Received: by 10.180.102.136 with SMTP id fo8mr28246711wib.19.1346104462851; Mon, 27 Aug 2012 14:54:22 -0700 (PDT) Received: from localhost.localdomain (s529d540e.adsl.wanadoo.nl. [82.157.84.14]) by mx.google.com with ESMTPS id hv8sm17283830wib.0.2012.08.27.14.54.20 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 27 Aug 2012 14:54:21 -0700 (PDT) From: Jaccon Bastiaansen To: joe@perches.com, davem@davemloft.net Subject: [PATCH v2] cs89x0 : packet reception not working Date: Mon, 27 Aug 2012 23:53:51 +0200 Message-Id: <1346104431-3784-1-git-send-email-jaccon.bastiaansen@gmail.com> X-Mailer: git-send-email 1.7.1 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (jaccon.bastiaansen[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.49 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: netdev@vger.kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, Jaccon Bastiaansen , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The RxCFG register of the CS89x0 could be configured incorrectly (because of misplaced parentheses), resulting in the disabling of packet reception. Signed-off-by: Jaccon Bastiaansen --- drivers/net/ethernet/cirrus/cs89x0.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/cirrus/cs89x0.c b/drivers/net/ethernet/cirrus/cs89x0.c index 845b202..1384469 100644 --- a/drivers/net/ethernet/cirrus/cs89x0.c +++ b/drivers/net/ethernet/cirrus/cs89x0.c @@ -1243,6 +1243,7 @@ static void set_multicast_list(struct net_device *dev) { struct net_local *lp = netdev_priv(dev); unsigned long flags; + u16 cfg; spin_lock_irqsave(&lp->lock, flags); if (dev->flags & IFF_PROMISC) @@ -1260,11 +1261,10 @@ static void set_multicast_list(struct net_device *dev) /* in promiscuous mode, we accept errored packets, * so we have to enable interrupts on them also */ - writereg(dev, PP_RxCFG, - (lp->curr_rx_cfg | - (lp->rx_mode == RX_ALL_ACCEPT) - ? (RX_CRC_ERROR_ENBL | RX_RUNT_ENBL | RX_EXTRA_DATA_ENBL) - : 0)); + cfg = lp->curr_rx_cfg; + if (lp->rx_mode == RX_ALL_ACCEPT) + cfg |= RX_CRC_ERROR_ENBL | RX_RUNT_ENBL | RX_EXTRA_DATA_ENBL; + writereg(dev, PP_RxCFG, cfg); spin_unlock_irqrestore(&lp->lock, flags); }