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 50C80EB64D9 for ; Thu, 29 Jun 2023 13:24:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231557AbjF2NYB (ORCPT ); Thu, 29 Jun 2023 09:24:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230256AbjF2NX5 (ORCPT ); Thu, 29 Jun 2023 09:23:57 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16C362D4A; Thu, 29 Jun 2023 06:23:57 -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=AZtS5X9BKaHL97b40HBwXNlyolqkhlUBrklOIKnvU6U=; b=sX4yjEO/PAps8WzH/CszrUMrzZ 2V1d/zUJumY/hQLYkAUAt1LhgmxcjB5FeZ5A5MgLQj7MPs/pqHte9+blIn29PhZxmPYS699TsvVV3 8Egv77NN/BG89UZuujij3If9z0XhEe0mJJol3u1etKhh3hxc2sBW3+jDjnU/EwQPda6M=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1qErci-000EDO-PF; Thu, 29 Jun 2023 15:23:48 +0200 Date: Thu, 29 Jun 2023 15:23:48 +0200 From: Andrew Lunn To: Luo Jie Cc: hkallweit1@gmail.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux@armlinux.org.uk, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, quic_sricharan@quicinc.com Subject: Re: [PATCH 3/3] net: phy: at803x: add qca8081 fifo reset on the link down Message-ID: References: <20230629034846.30600-1-quic_luoj@quicinc.com> <20230629034846.30600-4-quic_luoj@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230629034846.30600-4-quic_luoj@quicinc.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +static int qca808x_fifo_reset(struct phy_device *phydev) > +{ > + /* Reset serdes fifo on link down, Release serdes fifo on link up, > + * the serdes address is phy address added by 1. > + */ > + return mdiobus_c45_modify_changed(phydev->mdio.bus, phydev->mdio.addr + 1, > + MDIO_MMD_PMAPMD, QCA8081_PHY_SERDES_MMD1_FIFO_CTRL, > + QCA8081_PHY_FIFO_RSTN, phydev->link ? QCA8081_PHY_FIFO_RSTN : 0); In polling mode, this is going to be called once per second. Do you really want to be setting that register all the time? Consider using the link_change_notify callback. Also, can you tell us more about this SERDES device on the bus. I just want to make sure this is not a PCS and should have its own driver. Andrew