From patchwork Tue Oct 20 09:49:05 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Dooks X-Patchwork-Id: 36458 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 4458CB7B94 for ; Tue, 20 Oct 2009 20:50:04 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751783AbZJTJty (ORCPT ); Tue, 20 Oct 2009 05:49:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751776AbZJTJtx (ORCPT ); Tue, 20 Oct 2009 05:49:53 -0400 Received: from aeryn.fluff.org.uk ([87.194.8.8]:50625 "EHLO kira.home.fluff.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751740AbZJTJtw (ORCPT ); Tue, 20 Oct 2009 05:49:52 -0400 Received: from ben by kira.home.fluff.org with local (Exim 4.69) (envelope-from ) id 1N0BLm-0008Te-Lu; Tue, 20 Oct 2009 10:49:54 +0100 Message-Id: <20091020094954.578325358@fluff.org.uk> User-Agent: quilt/0.48-1 Date: Tue, 20 Oct 2009 10:49:05 +0100 From: Ben Dooks To: netdev@vger.kernel.org Cc: Ping.Doong@Micrel.Com Subject: [patch 3/3] KS8851: Fix ks8851_set_rx_mode() for IFF_MULTICAST References: <20091020094902.274646871@fluff.org.uk> Content-Disposition: inline; filename=ks8851-fix-mc-rxmode.patch Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org In ks8851_set_rx_mode() the case handling IFF_MULTICAST was also setting the RXCR1_AE bit by accident. This meant that all unicast frames where being accepted by the device. Remove RXCR1_AE from this case. Note, RXCR1_AE was also masking a problem with setting the MAC address properly, so needs to be applied after fixing the MAC write order. Fixes a bug reported by Doong, Ping of Micrel. This version of the patch avoids setting RXCR1_ME for all cases. Signed-off-by: Ben Dooks --- drivers/net/ks8851.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: b/drivers/net/ks8851.c =================================================================== --- a/drivers/net/ks8851.c 2009-10-13 13:28:50.000000000 +0100 +++ b/drivers/net/ks8851.c 2009-10-13 13:28:51.000000000 +0100 @@ -980,7 +980,7 @@ static void ks8851_set_rx_mode(struct ne mcptr = mcptr->next; } - rxctrl.rxcr1 = RXCR1_RXME | RXCR1_RXAE | RXCR1_RXPAFMA; + rxctrl.rxcr1 = RXCR1_RXME | RXCR1_RXPAFMA; } else { /* just accept broadcast / unicast */ rxctrl.rxcr1 = RXCR1_RXPAFMA;