Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2622979pxb; Sun, 17 Oct 2021 20:47:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw11k8ZvIOMpaqwoee5Jgwby3FfNn15WqGicZ8E1IjaI4dX8/kPg7JN2lklXTkW7vBAwbIQ X-Received: by 2002:a63:2a0e:: with SMTP id q14mr21703722pgq.217.1634528874277; Sun, 17 Oct 2021 20:47:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634528874; cv=none; d=google.com; s=arc-20160816; b=zWqevE8nwPvlGN98GY1RsUO02EDvqgasPejTOIacLfXw71+Ut6lZbBuqD5GhC38FdT TqauWq55G3ZR2MO4alVJh3Wr+9bXb31z5BUzV4z4CUJrTbfMjC21MK2OJ0Zn2d0qeYtV D6YdClBMO7KAo/eBuwTZR9tTBIJTqYMpQNCIDJrnGKqsb/KVCkC1m3Ha5YyAMYqhdVeT 0TvUNxKFvvvjW//4f9eEDo+eiVOue4U5e/9CHMCqd6gfw3w0MKS8Mcj13kfK3kcmiMS9 UCa6pEFc6fV3khQZzxFBRVDnVdLrguEHr3dfh7+fVfRt4YYXDrlMq+k9W3YqZ5Mpa6TC g7Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=eR4g3uuGyNp1bFRoz5Hyr18qs5VEjGPKJqGzRB2AGqY=; b=RWzpSKucOR43qNZ7VG3CCJ/G0crr3n8u/1YC013IDC15RmTppw+r9OeC3gy0FNH9gf KPFPaunwgQYfBUV9teymL1UFCm3UyegUGOXo4V/xPBy/qM/nQPNpQXFd+pkQqgdLSYXG GgK0WKVHhOO8j5806nfbpLcmtMUcp+nBOUon8p4fMv/XmQ29kc4yIlJ64x5U9+UpapDq AKPN8ocXkX0F0pGiHGs8eIj9c0N2s/3IzHePHqEgIyJhtlWgER6PIpkuiZNN6rxqvUS7 JfIrkLPKImD5dU58ti/UMdRuJV5d+SBFXHM/Pu+dI5Pa21YdzPXTwu1d/QLFLzddKJ8Z Z4ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=momF6Vus; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d16si20416951plh.456.2021.10.17.20.47.42; Sun, 17 Oct 2021 20:47:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=momF6Vus; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344631AbhJQVJq (ORCPT + 98 others); Sun, 17 Oct 2021 17:09:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232986AbhJQVJp (ORCPT ); Sun, 17 Oct 2021 17:09:45 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 368D4C06161C; Sun, 17 Oct 2021 14:07:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=eR4g3uuGyNp1bFRoz5Hyr18qs5VEjGPKJqGzRB2AGqY=; b=momF6VusPtUxNlMO2Yz5/AJv/1 AYe3LKPBFECRM/NV1KrrmGTiE/aKcGeB6sDtyVqo8ksG5Kb/Gc+PVbAlSajsuoQlQuYgptg4A5yDm PYa6jcRArtRMdVbHGi2B8coyMJO9JgqVow7XHD3qwpLNmh5Z+4ib1gKQcoIPFN6vVOxA73MJEhABt jefHxL5DB4uTZg6W7CZ6wKSBytFp9PwLhX4QyUYtaEwf13tzZD0JwfmojwxiOAC5GH2UGq1uPrd52 zgRIe7eW5tAdj1B6eZzcWyD4p1746qZCvqJRBevGOKkI4ZR0vBNC0NAYVl+kBWPhP8b6w4EKygAky aLBLkipA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:55164) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mcDNN-0004IW-9X; Sun, 17 Oct 2021 22:07:26 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1mcDNJ-0005GW-Gy; Sun, 17 Oct 2021 22:07:21 +0100 Date: Sun, 17 Oct 2021 22:07:21 +0100 From: "Russell King (Oracle)" To: Maarten Zanders Cc: Maarten Zanders , Maxime Chevallier , Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: dsa: mv88e6xxx: don't use PHY_DETECT on internal PHY's Message-ID: References: <20211011142720.42642-1-maarten.zanders@mind.be> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211011142720.42642-1-maarten.zanders@mind.be> Sender: Russell King (Oracle) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 11, 2021 at 04:27:20PM +0200, Maarten Zanders wrote: > mv88e6xxx_port_ppu_updates() interpretes data in the PORT_STS > register incorrectly for internal ports (ie no PPU). In these > cases, the PHY_DETECT bit indicates link status. This results > in forcing the MAC state whenever the PHY link goes down which > is not intended. As a side effect, LED's configured to show > link status stay lit even though the physical link is down. I know this patch has been merged, but I'm going to say this anyway for the record. The description is not entirely correct. It is not true that internal ports do not have the PHY_DETECT bit. 88E6176 and friends are documented that bit 12 is always the PHY_DETECT bit even for internal ports. Bit 11 there is Link status. Looking at the definitions in port.h, some switches are different (88E6250 family) and do indeed use bit 12 as link status. The point I'm making is that the commit description is not universally true and only applies to a subset of mv88e6xxx supported switches. It is a shame it wasn't better reviewed before merging. At least the patch is harmless; we leave the PHY_DETECT bit set on the internal ports, which means the PPU fetches the configuration and configures the port appropriately. The change merely helps to ensure that we don't force link status on the internal ports. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!