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 B679DC6FD19 for ; Sun, 12 Mar 2023 20:06:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230339AbjCLUGL (ORCPT ); Sun, 12 Mar 2023 16:06:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230021AbjCLUGJ (ORCPT ); Sun, 12 Mar 2023 16:06:09 -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 A13692A9B2; Sun, 12 Mar 2023 13:06:01 -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-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To: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=n5Btrknv2DSijXGinr7S2coEOTj1hSjKvflFzggiJJQ=; b=hjStjPPgBBKEVZz+cuK8T85rq8 SnRaNJRpF3ISCSv7GkpLK+dDd86+5z4Zvf21rdLPb/yr+4G9ETxbtztShtoxNDPr+zBnvBOpVwaov 7JfG18X2wQDmJZZ6Xvcfz+bKqs+Uhr5U3xtePPakpjIzO7SwoT3nL4pMQBC2WAnzgGeR1F58ahc98 pqCwzOEAGY+UMHKLWRFl/Xnbp+JZ+VLwgl4bNflJcL2OByDZ4XbMOlutEX0tsYzHpe4kgO3+65eIi OFzvqnQqdH3WhPKOYGaVgrlPBEj9/1wMVHKxHqsbxFGk2goQ6zsSS78fNVB+8Bqr/ExM4y9JiNpPd b9rp6GNg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:57098) 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 1pbRwz-0001r2-MI; Sun, 12 Mar 2023 20:05:49 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1pbRwr-0006zg-A6; Sun, 12 Mar 2023 20:05:41 +0000 Date: Sun, 12 Mar 2023 20:05:41 +0000 From: "Russell King (Oracle)" To: Frank Wunderlich Cc: Daniel Golle , Vladimir Oltean , netdev@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Heiner Kallweit , Lorenzo Bianconi , Mark Lee , John Crispin , Felix Fietkau , AngeloGioacchino Del Regno , Matthias Brugger , DENG Qingfang , Landen Chao , Sean Wang , Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" , Vladimir Oltean , Florian Fainelli , Andrew Lunn , Jianhui Zhao , =?iso-8859-1?Q?Bj=F8rn?= Mork , Alexander Couzens Subject: Re: Re: Re: [PATCH net-next v12 08/18] net: ethernet: mtk_eth_soc: fix 1000Base-X and 2500Base-X modes Message-ID: References: <4B891976-C29E-4D98-B604-3AC4507D3661@public-files.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: Russell King (Oracle) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Mar 12, 2023 at 01:40:36PM +0100, Frank Wunderlich wrote: > > Gesendet: Samstag, 11. M?rz 2023 um 21:30 Uhr > > Von: "Russell King (Oracle)" > > > On Sat, Mar 11, 2023 at 09:21:47PM +0100, Frank Wunderlich wrote: > > > Am 11. M?rz 2023 21:00:20 MEZ schrieb "Russell King (Oracle)" : > > > >On Sat, Mar 11, 2023 at 01:05:37PM +0100, Frank Wunderlich wrote: > > > > > > >> i got the 2.5G copper sfps, and tried them...they work well with the v12 (including this patch), but not in v13... > > > > > > >> how can we add a quirk to support this? > > > > > > > >Why does it need a quirk? > > > > > > To disable the inband-mode for this 2.5g copper > > > sfp. But have not found a way to set a flag which i > > > can grab in phylink. > > > > We could make sfp_parse_support() set Autoneg, Pause, and Asym_Pause > > in "modes" at the top of that function, and then use the SFP modes > > quirk to clear the Autoneg bit for this SFP. Would that work for you? > > i already tried this (without moving the autoneg/pause to sfp_parse_support): > > static void sfp_quirk_disable_autoneg(const struct sfp_eeprom_id *id, > unsigned long *modes, > unsigned long *interfaces) > { > linkmode_clear_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, modes); > } > > quirk was executed, but no change (no link on 2g5 sfp). It won't have any effect on its own - because sfp_parse_support() does this: if (bus->sfp_quirk && bus->sfp_quirk->modes) bus->sfp_quirk->modes(id, modes, interfaces); linkmode_or(support, support, modes); phylink_set(support, Autoneg); phylink_set(support, Pause); phylink_set(support, Asym_Pause); Which means clearing Autoneg in "modes" via the modes SFP quirk will have *absolutely* *no* *effect* what so ever. The fact that you replied having *not* followed my suggestion and then itimiating that it doesn't work is very frustrating. > i guess you mean moving code handling the dt-property for inband-mode in phylink_parse_mode (phylink.c) to the sfp-function (drivers/net/phy/sfp-bus.c) No. [rest of email cut because I can't be bothered to read it after this] Please try what I suggested. You might find that it works. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!