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 1EE18C5479D for ; Wed, 11 Jan 2023 21:40:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235697AbjAKVkJ (ORCPT ); Wed, 11 Jan 2023 16:40:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235290AbjAKVkG (ORCPT ); Wed, 11 Jan 2023 16:40:06 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 988553F450 for ; Wed, 11 Jan 2023 13:40:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To: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=wSOyb1psDnGnj9VTi++Znvjn3jjbzkXLjgBFZrunstg=; b=T77AAAEh/UvCymadkNzsF7CviQ tyE6us4zh4sfFJ9PrEbPlFWiYmMTjYDpAmbNuo1OEGCOvXtwWFcbLvbTDsqTZGsTINNgu74qlux34 /lkJcy6HT2QUC/dAj9wvK/eL40XO9wm23k09HyntTZ3koHFt+GvF7QLQ1jdDp5sqFElc=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1pFipG-001oU0-Ru; Wed, 11 Jan 2023 22:40:02 +0100 Date: Wed, 11 Jan 2023 22:40:02 +0100 From: Andrew Lunn To: Heiner Kallweit Cc: Hau , "netdev@vger.kernel.org" , nic_swsd Subject: Re: [PATCH net] r8169: fix rtl8168h wol fail Message-ID: References: <20230105180408.2998-1-hau@realtek.com> <714782c5-b955-4511-23c0-9688224bba84@gmail.com> <9ee2f626bab3481697b71c58091e7def@realtek.com> <4014d243-8f8a-f273-fba8-2ae5a3844ea5@gmail.com> <6ff876a66e154bb4b357b31465c86741@realtek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org > >>> In this application(rtl8168h + rtl8211fs) it also supports 100Mbps fiber > >> module. > >> > >> Does RTL8211FS advertise 100Mbps and 1Gbps on the UTP/MDI side in case > >> of a 100Mbps fiber module? > > Yes. > > > I think in this case internal PHY and RTL8211FS would negotiate 1Gbps, > not matching the speed of the 100Mbps fiber module. > How does this work? Fibre line side has no autoneg. Both ends need to be using the same speed, or the SERDES does not synchronise and does not establish link. You can ask the SFP module what baud rate it supports, and then use anything up to that baud rate. I've got systems where the SFP is fast enough to support a 2.5Gbps link, so the MAC indicates both 2.5G and 1G, defaults to 2.5G, and fails to connect to a 1G link peer. You need to use ethtool to force it to the lower speed before the link works. But from what i understand, you cannot use a 1000Base-X SFP, set the MAC to 100Mbps, and expect it to connect to a 100Base-FX SFP. So for me, the RTL8211FS should not be advertise 100Mbps and 1Gbps, it needs to talk to the SFP figure out exactly what it is, and only advertise the one mode which is supported. Andrew