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 C0287C433EF for ; Mon, 6 Jun 2022 12:43:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237623AbiFFMn3 (ORCPT ); Mon, 6 Jun 2022 08:43:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237569AbiFFMn2 (ORCPT ); Mon, 6 Jun 2022 08:43:28 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7135C2CBD2D; Mon, 6 Jun 2022 05:43:26 -0700 (PDT) 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=S17W/Pm9YVh/HqKMgj1KO/HjHX9HcDXOf/ffbUmqK5A=; b=JQGlU/poW50DIvWBX4d2F5pO8Q e1ogrNiB9rn2MCX3s6dmk7hshynvkKeM0faugenizIbvxnGl1cG24z9+v+p+aj0Hfgx94Oh6K7kW2 G4gcHmYRcw11ZAUPDQFGHT28a7mGox27tNRn60+UBZQkwyxn3eOPfb9FvgnAU34anaLg=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1nyC4O-005mXJ-7M; Mon, 06 Jun 2022 14:42:56 +0200 Date: Mon, 6 Jun 2022 14:42:56 +0200 From: Andrew Lunn To: Tan Tee Min Cc: Heiner Kallweit , Russell King , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Dan Murphy , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Voon Wei Feng , Sit Michael Wei Hong , Ling Pei Lee , Looi Hong Aun , Wong Vee Khee , Tan Tee Min Subject: Re: [PATCH net-next v2 1/1] net: phy: dp83867: retrigger SGMII AN when link change Message-ID: References: <20220526090347.128742-1-tee.min.tan@linux.intel.com> <20220527014709.GA26992@linux.intel.com> <20220530073356.GA1199@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220530073356.GA1199@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org > Below is the HW structure for Intel mGbE controller with external PHY. > The SERDES is located in the PHY IF in the diagram below and the EQoS > MAC uses pcs-xpcs driver for SGMII interface. > > <-----------------GBE Controller---------->|<---External PHY chip---> > +----------+ +----+ +---+ +------------+ > | EQoS | <-GMII->| DW | < ------ > |PHY| <-SGMII-> |External PHY| > | MAC | |xPCS| |IF | |(TI DP83867)| > +----------+ +----+ +---+ +------------+ > ^ ^ ^ ^ > | | | | > +---------------------MDIO-------------------------+ > > There are registers in the DW XPCS to read the SGMII AN status and > it's showing the SGMII AN has not completed and link status is down. > But TI PHY is showing SGMII AN is completed and the copper link is > established. > > FYI, the current pcs-xpcs driver is configuring C37 SGMII as MAC-side > SGMII, so it's expecting to receive AN Tx Config from PHY about the > link state change after C28 AN is completed between PHY and Link Partner. > Here is the pcs-xpcs code for your reference: > https://elixir.bootlin.com/linux/latest/source/drivers/net/pcs/pcs-xpcs.c#L725 > > We faced a similar issue on MaxLinear GPY PHY in the past. > And, MaxLinear folks admitted the issue and implemented fixes/improvements > in the GPY PHY Firmware to overcome the SGMII AN issue. > Besides, they have also implemented this similar SW Workaround in their > PHY driver code to cater for the old Firmware. > Feel free to refer GPY driver code here: > https://elixir.bootlin.com/linux/latest/source/drivers/net/phy/mxl-gpy.c#L222 > > Apart from TI and MaxLinear PHY, we've also tested the Marvell 88E2110 and > 88E1512 PHY with the MAC/SERDES combination above, Marvell PHY is working > fine without any issue. Thanks for the additional details. Reviewed-by: Andrew Lunn Andrew