Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp387734lqa; Sat, 27 Apr 2024 06:32:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX3K8LJe6sHR35eTY4KsOs0feV9cNzCLDreaV6ndqF3clKD6sAf1iP4XZ3lvmpn9f1EoE6AXKIN6CqBR6gCJrY2SPwNqelmjyKr2sfvnA== X-Google-Smtp-Source: AGHT+IHMe6asewyjeXjNBY4y5rs6dJXjLyQ85TgAnB8gHn+c5E1BKxcK0oQSqRYGjlnWVlGpl+V5 X-Received: by 2002:a50:951e:0:b0:56e:2b31:b111 with SMTP id u30-20020a50951e000000b0056e2b31b111mr3656209eda.7.1714224727065; Sat, 27 Apr 2024 06:32:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714224727; cv=pass; d=google.com; s=arc-20160816; b=meJXPcnyBDc+tTE+TYN8NPLHUrbCJr6XQ//6AtpoLpxlgAT0A6Ga/i7F4goV1sYEbI UR7bPFdgJ39duidohDmjVLe/JPdGzTaRN2YfvT0oI+5qqbLTVYJ0QYwwUfANtJkLGSBQ zfZtro5S70VczOdlVzQwqmCQCxByrvObGcxOIOuCWHY0zOXUbd+xmspAtmEbGxKVv/bQ CLPcMzFtvxYCZ0NoQkR+XtM0LMkN8Xlqgr50yZea4aKhM7EP5fjpzF3JwQzgsyf8MR9F Vsp5xxBEEAPLes6d4zZL778qfpHNgv7oMIOecVImiVuJonf/h81y5uJlnHOBuehVw4WB UNMw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=uLjmIxWBZXYFaJoEDrFA76LxUvZ8/QKRwm9su8En8/U=; fh=lLWliBydJcMmEFLyxQ+Z//wAbme96Vp93OLLKXdaeKU=; b=nYWQizX8yLHo8UQIPfi/lIZik00EIQ2iDIY/+0MixxNshslF56uJG+Xc6ARFTnVgyU 0F98E3Im8TReTNMX7bEWDotJe7CxmtHv+00dkIwVsYqFVIpcoxUyUx+2jZnCQN7fhnoS aZa3Bt1zAhGkPFcHQ9kr782KuOWsIe27QcjqLq+XakxvgVEXltiN6aTMibJyDDJww+tX DWbkLiCWS+mHI232YfOMCXl2Q49p5KCR+aq/TAfX0ch3JmOBdW1phsHbZtnynOGmIdu8 krCvakjS3Ylrsye96QhhuhEtvbABOqzRtW/OV0t8Yjxck7WMnmh6hS5BjkpYUYOTGrbn wVeA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=E8SC4q7c; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-161053-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-161053-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id y15-20020aa7cccf000000b0057016a97b00si11854810edt.465.2024.04.27.06.32.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Apr 2024 06:32:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-161053-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=E8SC4q7c; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-161053-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-161053-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C812D1F253E1 for ; Sat, 27 Apr 2024 13:32:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 585E24F20E; Sat, 27 Apr 2024 13:31:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="E8SC4q7c" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 040A151C3E; Sat, 27 Apr 2024 13:31:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714224717; cv=none; b=qNGN3IcTPHYJJ3NaV8VYnRgboeMkW9wWpE/mHhcMziM42zDdbEAb9ZDagMbd/g2zU1Wh9ln+6goLa+96OHO/2wsn7W66S2UdtpMJ5O0JhIs9WjwmfBB65t4n8qE77LlHWHS/nVxgySSRD0+zk716FxqURSwT+G8ssPEYM2OFvfw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714224717; c=relaxed/simple; bh=RKP4Wmy3tUWyN3fPHYMmPu0SgDcWMjuRKXN0JXL0BN4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TKrJekJWf4UfXuxY/cuzEtIQuzVZnMXQHZsp7ZAfPr++vLOulgI9wYJ6vNL2jmCAboxL433N8hVSZVkvYMJNzR9NI5ErrRIGdBLp4+OxVZqT3m6geLZYTl3cr1mfj3UUYGy6GdJqlBBSqWaY5on50o6aD/cJFiU1khbVnpzMGz0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=E8SC4q7c; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Transfer-Encoding:Content-Disposition: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:From: Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Content-Disposition: In-Reply-To:References; bh=uLjmIxWBZXYFaJoEDrFA76LxUvZ8/QKRwm9su8En8/U=; b=E8 SC4q7cnxZuKZPZHU2E87r6vMH+XWnFfdlKPoMLVhloayciK5L8OphMvdgMQkONjPXJFapa2sdqeMj Yod6kuuzZs4XDpfSqd4rh66ERJmW9TeHL6tH6OIZVBNjs6kTjD9U/1J2/QG26Z/vh2+zF5GzC4mJe S5Z3EE/oAp/LrnI=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1s0i9S-00E90w-N3; Sat, 27 Apr 2024 15:31:38 +0200 Date: Sat, 27 Apr 2024 15:31:38 +0200 From: Andrew Lunn To: arinc.unal@arinc9.com Cc: Daniel Golle , DENG Qingfang , Sean Wang , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH net-next] net: dsa: mt7530: do not set MT7530_P5_DIS when PHY muxing is being used Message-ID: <7c476e63-5747-4128-af97-13edc252a263@lunn.ch> References: <20240427-for-netnext-mt7530-do-not-disable-port5-when-phy-muxing-v1-1-793cdf9d7707@arinc9.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240427-for-netnext-mt7530-do-not-disable-port5-when-phy-muxing-v1-1-793cdf9d7707@arinc9.com> On Sat, Apr 27, 2024 at 02:24:42PM +0300, Arınç ÜNAL via B4 Relay wrote: > From: Arınç ÜNAL > > When the PHY muxing feature is in use, port 5 won't be defined in the > device tree. Because of this, the type member of the dsa_port structure for > this port will be assigned DSA_PORT_TYPE_UNUSED. The dsa_port_setup() > function calls ds->ops->port_disable() when the port type is > DSA_PORT_TYPE_UNUSED. > > The MT7530_P5_DIS bit is unset when PHY muxing is being used. > mt7530_port_disable() which is assigned to ds->ops->port_disable() is > called afterwards. Currently, mt7530_port_disable() sets MT7530_P5_DIS > which breaks network connectivity when PHY muxing is being used. > > Therefore, do not set MT7530_P5_DIS when PHY muxing is being used. > > Fixes: 377174c5760c ("net: dsa: mt7530: move MT753X_MTRAP operations for MT7530") > Reported-by: Daniel Golle > Signed-off-by: Arınç ÜNAL > --- > Hello. > > I've sent this to net-next as the patch it fixes is on the current > development cycle. > --- > drivers/net/dsa/mt7530.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c > index 2b9f904a98f0..07b6da3ae97c 100644 > --- a/drivers/net/dsa/mt7530.c > +++ b/drivers/net/dsa/mt7530.c > @@ -1220,7 +1220,7 @@ mt7530_port_disable(struct dsa_switch *ds, int port) > if (priv->id != ID_MT7530 && priv->id != ID_MT7621) > return; > > - if (port == 5) > + if (port == 5 && priv->p5_mode == GMAC5) > mt7530_set(priv, MT753X_MTRAP, MT7530_P5_DIS); It might be worth a comment. It is not obvious that priv->p5_mode == GMAC5 means the PHY MUX is being used. mt7530_setup_port5() thinks it is sufficiently obscure that it comments each case. Andrew