From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70FBDC433F5 for ; Thu, 3 Feb 2022 13:54:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236702AbiBCNyF (ORCPT ); Thu, 3 Feb 2022 08:54:05 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:40862 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350918AbiBCNyC (ORCPT ); Thu, 3 Feb 2022 08:54:02 -0500 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=M0AwtJ6X+21Ku/MswUd5r7r3/EB9NBXlsTNRVMaSpX0=; b=RU rRNysWeVCXO1QisPnOkeHqcWDdWofe6HH/X3ze+EuUT0diTTf0IkVYgAPdGgVcqHiiDWoeZwYtwtL tlp+LLICrKawpmjNGJRzWnFzJDhxcjTZR5uzeFTO3tDYkjAVHutAJK+Qr6BsAVKIgNg/cUfn1uspz W3MfXZaHhCOvo/A=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1nFcYg-0047Oz-Tp; Thu, 03 Feb 2022 14:53:58 +0100 Date: Thu, 3 Feb 2022 14:53:58 +0100 From: Andrew Lunn To: "Russell King (Oracle)" Cc: Vivien Didelot , Marek Beh__n , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org Subject: Re: [PATCH net-next 4/4] net: dsa: mv88e6xxx: improve 88e6352 serdes statistics detection Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, Feb 03, 2022 at 01:30:52PM +0000, Russell King (Oracle) wrote: > The decision whether to report serdes statistics currently depends on > the cached C_Mode value for the port, read at probe time or updated by > configuration. However, port 4 can be in "automedia" mode when it is > used as a serdes port, meaning it switches between the internal PHY and > the serdes, changing the read-only C_Mode value depending on which > first gains link. Consequently, the C_Mode value read at probe does not > accurately reflect whether the port has the serdes associated with it. > > In "net: dsa: mv88e6xxx: add mv88e6352_g2_scratch_port_has_serdes()", > we added a way to read the hardware configuration to determine which > port has the serdes associated with it. Use this to determine which > port reports the serdes statistics. > > Reviewed-by: Marek Behún > Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Andrew