Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp3347949lqp; Tue, 26 Mar 2024 07:00:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVx7Hu+Q/EHXq0rB0/fxBlhZ91dAYFAWLocLXilF4eAVARJxJRBXf07w+Iag95/KHWRy6lFRdF9fBhYGonJtg8nCbGKGase7bITf/xFbQ== X-Google-Smtp-Source: AGHT+IFMtBosaJJ3iN2nQzT0laez9iX9aCfskAmzNmRCEN0u9kJVa/jXMRLNFxXNIUeXJI1tMF0Q X-Received: by 2002:a50:bac8:0:b0:567:e0e:dda5 with SMTP id x66-20020a50bac8000000b005670e0edda5mr1361089ede.17.1711461636183; Tue, 26 Mar 2024 07:00:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711461636; cv=pass; d=google.com; s=arc-20160816; b=qr7i9gplZHS08N/JOjv7omvYvXKfVJUp1wHQza0ZKW4ryzrWFRIkS1x6CNQid81NPS Hnwklkj83rj6nA4JQRJTe7FnQwfPvYl1iPtvPkEKIMHIbvvC3Qb8olgP+R4HETQiGjGU rmuxVjDO5TeR1oauR9nXz9gizbd3r/QfFlbzEpTUDJ/UDZP5Azwy7/6S+vC/5FHKoDQj 6UUSULTeA9T3bP1Qllm5wHPwQW6fSlw3tdq8yPuS6BQ3CRndGVSKUqxBPLSlfJ1OdPuk VDebNahB7d4N69bvH5oMEMeyTKGjMPrvALUMTWg0ttnDuratDkSrEnkNKEbf/LsZUvkH RK7Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature:dkim-signature; bh=0EKpZTo5hv6iT79UBNQej/4K4vOd3xcIXh9ByDCTvaQ=; fh=eyWUSmJy0XXODmHseNqT46/YLmJjysG1lrlCqq0MBQI=; b=B0Tj7LVeHUAmxKVwgNqKEZGJdkj5E9Jv8wZ/U7FaQz1CRpM2aONjQsWYlUjRYot40h rk9yKfoyJFf73byYn/hWIXIgWYCiSD/kB6s1blcIkKWsn5EaQy7Gb9wkBuIpKf/TqP1B sXookE7MYhCMSVR7Lk+bHF7cXDCjKlY9IolvK5huox+ZAIji9/0TCbg9JRHAD9bxNiDh CIB5DIgB7yPkg2/TJErhxSzZgWoddF/CI0v3UcpTeikXiCk6hmn9P2fnscfLQiDC8x9X gyxKFdAML2dNQUEQdLTBcSJrT/I0zN6qATZoTlYee6bbqVVmFWxPLoOJqMeTiw+KHoWh sgzg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tq-group.com header.s=key1 header.b="DAuhoM/m"; dkim=temperror (no key for signature) header.i=@ew.tq-group.com header.s=dkim header.b=sj61wnSZ; arc=pass (i=1 spf=pass spfdomain=ew.tq-group.com dkim=pass dkdomain=tq-group.com dmarc=pass fromdomain=ew.tq-group.com); spf=pass (google.com: domain of linux-kernel+bounces-119105-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-119105-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tq-group.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id b10-20020a0564021f0a00b0056c07b4c013si2571551edb.100.2024.03.26.07.00.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 07:00:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-119105-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=@tq-group.com header.s=key1 header.b="DAuhoM/m"; dkim=temperror (no key for signature) header.i=@ew.tq-group.com header.s=dkim header.b=sj61wnSZ; arc=pass (i=1 spf=pass spfdomain=ew.tq-group.com dkim=pass dkdomain=tq-group.com dmarc=pass fromdomain=ew.tq-group.com); spf=pass (google.com: domain of linux-kernel+bounces-119105-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-119105-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tq-group.com 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 BB3791F6452A for ; Tue, 26 Mar 2024 14:00:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2019376033; Tue, 26 Mar 2024 14:00:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tq-group.com header.i=@tq-group.com header.b="DAuhoM/m"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=ew.tq-group.com header.i=@ew.tq-group.com header.b="sj61wnSZ" Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) (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 A81DF535AB; Tue, 26 Mar 2024 14:00:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=93.104.207.81 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711461625; cv=none; b=sREUV9JIr7E9fGvx+lRPLH55gmPVO0LedC4Sq8uqQu4VigOZcrub2ter5YqBHk2UVMqeDQM0omFWjUOzI0hr4HX67XC+L8NdYdE+NH5GKouggQqSJ7jx1PB6P3JDTMLCTWfo8DVh79MZVdvfau9u5OtgbY3aND/xYyprzWwfvYE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711461625; c=relaxed/simple; bh=Gm1WAIrYB3cH17+JMV26qz73QxvJFbmWHlQKnpd2C/I=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=de5tPLef++HD9YR8G0j4KNwSQFFe6i6NgpiJ96hKnXUrntUqm7ltugSaraO+vS0oKGq348+lpvSYlxySSdGVdBrUPI4tfEbM//GVYdv17dIalt8ozBvT8eWft/BQIQTFrTFKjf/2cCNqoYfYDQX916gZN2mMWCTudHJJ8N68noE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ew.tq-group.com; spf=pass smtp.mailfrom=ew.tq-group.com; dkim=pass (2048-bit key) header.d=tq-group.com header.i=@tq-group.com header.b=DAuhoM/m; dkim=fail (0-bit key) header.d=ew.tq-group.com header.i=@ew.tq-group.com header.b=sj61wnSZ reason="key not found in DNS"; arc=none smtp.client-ip=93.104.207.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ew.tq-group.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ew.tq-group.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1711461622; x=1742997622; h=message-id:subject:from:to:cc:date:in-reply-to: references:content-transfer-encoding:mime-version; bh=0EKpZTo5hv6iT79UBNQej/4K4vOd3xcIXh9ByDCTvaQ=; b=DAuhoM/m5W+q4Vuq43GmWF+XpDmr8/djsRbECp3At2APu+FIjVnXNI55 KpZ7yC6Arbgz5NlZZvuhvEARtD5C54NBeQAxnYNWKa27LArSnE05/l9Uk mIV9DUVQQ2PB7ruUnfyjPFsn/xnxoZ7KwNMwqzC7ADiGRukPTvjMpCtVk O3CY1G6hyPfm5f8ulnnVWJr8GGqwt/8vg5hUcDdtB9uWEXvvn44A54EUd JilF9pBV1k+tsc6ZSj/PUhTwfUxEV4F3UnsVufpR9oG5eqokqx1zABRr7 TVziW7ucSTV/88yyWkJgfbZiL6VPKIhf6/QLjF/LD6AGR9FOpU3wmb/cW g==; X-IronPort-AV: E=Sophos;i="6.07,156,1708383600"; d="scan'208";a="36107278" Received: from vmailcow01.tq-net.de ([10.150.86.48]) by mx1.tq-group.com with ESMTP; 26 Mar 2024 15:00:19 +0100 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 080E716E108; Tue, 26 Mar 2024 15:00:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ew.tq-group.com; s=dkim; t=1711461614; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=0EKpZTo5hv6iT79UBNQej/4K4vOd3xcIXh9ByDCTvaQ=; b=sj61wnSZ5Rd6TXOyCPp7MuFTO3vrxAMy34iifMO13YKrF8Jnu2HdtLoSOPIz01z3mEBTg+ r/EtJoGdeebPAn0LswvOxjbabAriHPjTr3Tlye1G2zSrScT//GzTUa7fiPkwx1YCrPU3MV CN4QlrbDeCqCC9byFN7i4SubtjKEB0mst9WizrwOQk4B+lOzDg9fbkrWbLbYWxtpI4ic8p 1RhubmELwyCy8ECAJjgG676RVW1cL1wHFaWzTkOaMJ0HxMFxl34X3VU4UQlUPdjmWEl57H aniAi43PK9b7JgtFKNfiPllyWhOh/tGt6VLehCNyBYKEA/ILEPO6YObeVIpgIg== Message-ID: <35cc888230a0146a7687d8b859e5a6ceffec581a.camel@ew.tq-group.com> Subject: Re: [PATCH] net: dsa: mv88e6xxx: fix usable ports on 88e6020 From: Matthias Schiffer To: Lukasz Majewski Cc: Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux@ew.tq-group.com, Michael Krummsdorf Date: Tue, 26 Mar 2024 15:00:12 +0100 In-Reply-To: <20240326143424.3368d9b1@wsk> References: <20240326123655.40666-1-matthias.schiffer@ew.tq-group.com> <20240326143424.3368d9b1@wsk> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 On Tue, 2024-03-26 at 14:34 +0100, Lukasz Majewski wrote: > Hi Matthias, >=20 > > From: Michael Krummsdorf > >=20 > > The switch has 4 ports with 2 internal PHYs, but ports are numbered up > > to 6, with ports 0, 1, 5 and 6 being usable. > >=20 > > Fixes: 71d94a432a15 ("net: dsa: mv88e6xxx: add support for MV88E6020 > > switch") Signed-off-by: Michael Krummsdorf > > Signed-off-by: Matthias Schiffer > > --- > >=20 > > I was unfortunately too busy to notice the issue when the patch this > > Fixes was resubmitted in my name. It would have been better to change > > my From into a Based-on-patch-by or similar when modifying it >=20 > The "discussion" about this work was lasting at least a few months with > several iterations and changing the design decisions ... >=20 > > - and > > the final version obviously wasn't even tested on an 88E6020... >=20 >=20 > Can you share on which kernel version have you tested the patch that > you claim that testing was omitted? Hi Lukasz, we are currently testing with commit 71d94a432a15 backported onto a recent = Linux 6.1.y. At least on this kernel version, the driver will reject a Device Tree configuration tha= t uses the=C2=A0ports 5 and 6 (rightfully so, as num_ports is set to 4), leaving only the internal-PHY po= rts 0 and 1, and none of the *MII ports that are likely to be used as CPU ports. So if the accepted version worked fine for you, your configuration possibly= only used the first two ports, or newer kernels somehow ignore num_ports when determining if a port= number is valid. We should be able to repeat our test on a newer kernel next week if needed. Best regards, Matthias >=20 > >=20 > >=20 > > drivers/net/dsa/mv88e6xxx/chip.c | 6 +++++- > > 1 file changed, 5 insertions(+), 1 deletion(-) > >=20 > > diff --git a/drivers/net/dsa/mv88e6xxx/chip.c > > b/drivers/net/dsa/mv88e6xxx/chip.c index 9ed1821184ece..c95787cb90867 > > 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c > > +++ b/drivers/net/dsa/mv88e6xxx/chip.c > > @@ -5503,8 +5503,12 @@ static const struct mv88e6xxx_info > > mv88e6xxx_table[] =3D { .family =3D MV88E6XXX_FAMILY_6250, > > .name =3D "Marvell 88E6020", > > .num_databases =3D 64, > > - .num_ports =3D 4, > > + /* Ports 2-4 are not routed to pins > > + * =3D> usable ports 0, 1, 5, 6 > > + */ > > + .num_ports =3D 7, > > .num_internal_phys =3D 2, > > + .invalid_port_mask =3D BIT(2) | BIT(3) | BIT(4), > > .max_vid =3D 4095, > > .port_base_addr =3D 0x8, > > .phy_base_addr =3D 0x0, >=20 >=20 >=20 >=20 > Best regards, >=20 > Lukasz Majewski >=20 > -- >=20 > DENX Software Engineering GmbH, Managing Director: Erika Unter > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany > Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de > Achtung externe E-Mail:=C2=A0=C3=96ffnen Sie Anh=C3=A4nge und Links nur, = wenn Sie wissen, dass diese aus einer sicheren Quelle stammen und sicher si= nd. Leiten Sie die E-Mail im Zweifelsfall zur Pr=C3=BCfung an den IT-Helpde= sk weiter. > Attention external email:=C2=A0Open attachments and links only if you kn= ow that they are from a secure source and are safe. In doubt forward the em= ail to the IT-Helpdesk to check it. >=20 > =C2=A0