From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932290AbdJXQ1M (ORCPT ); Tue, 24 Oct 2017 12:27:12 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:56891 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751589AbdJXQ1I (ORCPT ); Tue, 24 Oct 2017 12:27:08 -0400 Date: Tue, 24 Oct 2017 18:27:02 +0200 From: Andrew Lunn To: Egil Hjelmeland Cc: vivien.didelot@savoirfairelinux.com, f.fainelli@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next] net: dsa: lan9303: Do not disable switch fabric port 0 at .probe Message-ID: <20171024162702.GA12347@lunn.ch> References: <20171024151410.28494-1-privat@egil-hjelmeland.no> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171024151410.28494-1-privat@egil-hjelmeland.no> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 24, 2017 at 05:14:10PM +0200, Egil Hjelmeland wrote: > Make the LAN9303 work when lan9303_probe() is called twice. > > For some unknown reason the LAN9303 switch fail to forward data when switch > fabric port 0 TX is disabled during probe. (Write of LAN9303_MAC_TX_CFG_0 > in lan9303_disable_processing_port().) > > In that situation the switch fabric seem to receive frames, because the ALR > is learning addresses. But no frames are transmitted on any of the ports. > > In our system lan9303_probe() is called twice, first time > dsa_register_switch() return -EPROBE_DEFER. As an experiment, modified the > code to skip writing LAN9303_MAC_TX_CFG_0, port 0 during the first probe. > Then the switch works as expected. > > Resolve the problem by not calling lan9303_disable_processing_port() on > port 0 during probe. Ports 1 and 2 are still disabled. > > Although unsatisfying that the exact failure mechanism is not known, > the patch should not cause any harm. I agree about this being unsatisfying, but as you said, it fixed your issue, and it probably does not cause other issues. Reviewed-by: Andrew Lunn Andrew