From patchwork Wed Apr 20 08:55:19 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrea Galbusera X-Patchwork-Id: 92119 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id 5F320100A56 for ; Wed, 20 Apr 2011 19:31:10 +1000 (EST) Received: from mail-wy0-f179.google.com (mail-wy0-f179.google.com [74.125.82.179]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id C2271B7018 for ; Wed, 20 Apr 2011 18:55:56 +1000 (EST) Received: by wyg36 with SMTP id 36so464298wyg.38 for ; Wed, 20 Apr 2011 01:55:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer; bh=E0dUMqwdhMmDLU7YPm1F2B/kfKn7Km0hnWJtnwLoC/0=; b=AXYyN5CBLBV/SiD6laL4ti6N6eMkGZjqP5Q07Gfyk6NnqUzmuqfn/0AqnleA+mogQG yYw8yptaaffY5hJa+8GIeWN7MV4znHP3lldS1os/2p9UjDBAqRyPZCkjGnrNdQ545N4E yYRFsAq0hbWLEulJKbHaoWzXdblR3q1410wZI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=czf16BeNA6AWIv0HCC6AfXoiCkSpezz16bFWwqOKpJRb7yJUM4H0+cSy3hxQOt9Lem IcImzg2HlmqdJZTjnTtpNLCU3H3FjQ1zrUPjzfvOQBvp94mGiM3aD1DjgJl6fWHmPEfP B8OnO/logPk0EJORXEbepCjgwtzQPaAB+dUCw= Received: by 10.227.183.133 with SMTP id cg5mr2338879wbb.49.1303289751385; Wed, 20 Apr 2011 01:55:51 -0700 (PDT) Received: from localhost.localdomain (host168-65-static.12-87-b.business.telecomitalia.it [87.12.65.168]) by mx.google.com with ESMTPS id w12sm418662wby.58.2011.04.20.01.55.50 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 20 Apr 2011 01:55:50 -0700 (PDT) From: Andrea Galbusera To: Pantelis Antoniou , Vitaly Bordug Subject: [PATCH 1/1] powerpc: Fix multicast problem in fs_enet driver Date: Wed, 20 Apr 2011 10:55:19 +0200 Message-Id: <1303289719-16913-1-git-send-email-gizero@gmail.com> X-Mailer: git-send-email 1.7.0.4 X-Mailman-Approved-At: Wed, 20 Apr 2011 19:31:01 +1000 Cc: netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Andrea Galbusera X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org mac-fec.c was setting individual UDP address registers instead of multicast group address registers when joining a multicast group. This prevented from correctly receiving UDP multicast packets. According to datasheet, replaced hash_table_high and hash_table_low with grp_hash_table_high and grp_hash_table_low respectively. Tested on a MPC5121 based board. Signed-off-by: Andrea Galbusera --- drivers/net/fs_enet/mac-fec.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/fs_enet/mac-fec.c b/drivers/net/fs_enet/mac-fec.c index 61035fc..b9fbc83 100644 --- a/drivers/net/fs_enet/mac-fec.c +++ b/drivers/net/fs_enet/mac-fec.c @@ -226,8 +226,8 @@ static void set_multicast_finish(struct net_device *dev) } FC(fecp, r_cntrl, FEC_RCNTRL_PROM); - FW(fecp, hash_table_high, fep->fec.hthi); - FW(fecp, hash_table_low, fep->fec.htlo); + FW(fecp, grp_hash_table_high, fep->fec.hthi); + FW(fecp, grp_hash_table_low, fep->fec.htlo); } static void set_multicast_list(struct net_device *dev) @@ -273,8 +273,8 @@ static void restart(struct net_device *dev) /* * Reset all multicast. */ - FW(fecp, hash_table_high, fep->fec.hthi); - FW(fecp, hash_table_low, fep->fec.htlo); + FW(fecp, grp_hash_table_high, fep->fec.hthi); + FW(fecp, grp_hash_table_low, fep->fec.htlo); /* * Set maximum receive buffer size.