From patchwork Sat Jan 23 20:44:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell King - ARM Linux X-Patchwork-Id: 572175 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.180.67]) by ozlabs.org (Postfix) with ESMTP id 1CC9C140556 for ; Sun, 24 Jan 2016 07:44:32 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=arm.linux.org.uk header.i=@arm.linux.org.uk header.b=aUanMLun; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754903AbcAWUo1 (ORCPT ); Sat, 23 Jan 2016 15:44:27 -0500 Received: from pandora.arm.linux.org.uk ([78.32.30.218]:59084 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754267AbcAWUoY (ORCPT ); Sat, 23 Jan 2016 15:44:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=arm.linux.org.uk; s=pandora-2014; h=Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=pLGKgb7H7R5kJIt5wX9Xop40dowXcTIUUhgw5X6OAyE=; b=aUanMLunc78GFbTGA75QcY4oTeuRjg6HuQkUuYU7cZ7WZKWmm2UIHECBL7MFd7NSQwlwu9wwb3rkO9BoNn4jZVkkObJA2mxjX3yAY+QQox2rDhrg+mrMtKXRIQu8ULWKTODx7D3SA4n6zGWh9a4eJm7yxC9vlY+DBr4yL4HdZCY=; Received: from n2100.arm.linux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:4f86]:33339) by pandora.arm.linux.org.uk with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1aN52i-00034Z-Jg; Sat, 23 Jan 2016 20:44:20 +0000 Received: from linux by n2100.arm.linux.org.uk with local (Exim 4.76) (envelope-from ) id 1aN52f-0006rO-CH; Sat, 23 Jan 2016 20:44:17 +0000 Date: Sat, 23 Jan 2016 20:44:16 +0000 From: Russell King - ARM Linux To: Andrew Lunn Cc: Vivien Didelot , netdev@vger.kernel.org Subject: Re: [PATCH] net: dsa: fix mv88e6xxx switches Message-ID: <20160123204416.GC10826@n2100.arm.linux.org.uk> References: <20160123181526.GD3880@lunn.ch> <20160123190622.GA10826@n2100.arm.linux.org.uk> <20160123193705.GE3880@lunn.ch> <20160123194856.GB10826@n2100.arm.linux.org.uk> <20160123201647.GH3880@lunn.ch> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20160123201647.GH3880@lunn.ch> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Sat, Jan 23, 2016 at 09:16:47PM +0100, Andrew Lunn wrote: > On Sat, Jan 23, 2016 at 07:48:57PM +0000, Russell King - ARM Linux wrote: > > On Sat, Jan 23, 2016 at 08:37:05PM +0100, Andrew Lunn wrote: > > > I'm testing on a 6172. But 6172 and 6176 are both in the same family > > > 6352, and share the same driver. > > > > Hmm, can't be that then. > > > > > So you initially have lan1 in an bridge. I don't. > > Running tcpdump on the device i'm trying to ping, there are ARP > requests and replies. But the replies are never received by the > target, arp -a shows . > > Looking at the stats counters in debugfs, the packets are counted in > in_unicast, but also sw_in_filtered. > > Port 0 is lan0 and port 5 is the cpu port. > > root@370-rd:/sys/kernel/debug/dsa0# cat regs > GLOBAL GLOBAL2 SERDES 0 1 2 3 4 5 6 > 0: c874 0 1940 1d0f 1d0f 1d0f 1d0f 100f e07 6 > 1: fa0 0 149 3 3 3 3 3 c03e 3 > 2: fa0 ffff 141 0 0 0 0 0 0 0 > 3: 0 ffff ea1 1721 1721 1721 1721 1721 1721 1721 > 4: 6000 258 1e0 433 433 433 433 433 373f 433 > 5: 3000 ff 0 0 0 0 0 0 0 0 > 6: fa0 1f0f 4 7f 7e 7d 7c 7b 7a 79 > 7: 3331 707f 2001 0 fa1 fa2 fa3 fa4 0 fa6 This shows port 0 is on vlan 0, but it should default to vlan 1 when no vlans are configured. The patch below should at least allow some diagnosis of what's being requested, and when. diff --git a/drivers/net/dsa/mv88e6xxx.c b/drivers/net/dsa/mv88e6xxx.c index a43354ed0607..8a9cf67eb16d 100644 --- a/drivers/net/dsa/mv88e6xxx.c +++ b/drivers/net/dsa/mv88e6xxx.c @@ -1511,6 +1511,9 @@ int mv88e6xxx_port_vlan_add(struct dsa_switch *ds, int port, u16 vid; int err = 0; + printk("%s: port %d vid %u-%u flags %x\n", + __func__, port, vlan->vid_begin, vlan->vid_end, vlan->flags); + mutex_lock(&ps->smi_mutex); for (vid = vlan->vid_begin; vid <= vlan->vid_end; ++vid) {