Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp20740927rwd; Thu, 29 Jun 2023 06:31:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6pw7mbIm15WQb7GX2HpP4KDaagAdJG9Z26JoW7OrjOsneD7RofIAaWZ6rVzgQKHgMzHhxk X-Received: by 2002:a05:6a20:7f84:b0:112:1e0d:14ae with SMTP id d4-20020a056a207f8400b001121e0d14aemr48490183pzj.7.1688045513946; Thu, 29 Jun 2023 06:31:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688045513; cv=none; d=google.com; s=arc-20160816; b=IhNYT9C3aQ5FFHM/9u5aHHL09Dkoj/o+Hgm+cD0m+AHpIs/SXErYScJXJ8h85W1bfn 7/fITmrJPudIRHrqWzZ5RBT4SXqBGWlqlv0wK3ekIPZ5KpoNU7EpO5BEAXclKU2+SEoR GyiVCIaofMwjFnelsYrAc/BpKhhmOYdgUOPIOSDBTg4VceGJ9y+U+/7mLA2lxFaii8SV BNqx6iY6gD3jwKhnBtxlh0YHIYUr71/7Y4qQ7szaufz//h7P9Gi49fn9G3jdeLSi1Gix piXx1KcbxBlpRyoR0naDAHWWWjFKtoz4BUIEA/AwJTyVpnMvSnxzQWIZjlBk8u8+iz3S PlUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=AZtS5X9BKaHL97b40HBwXNlyolqkhlUBrklOIKnvU6U=; fh=6fBGyvuzcr/TiV3PlWILIfGi11K9mjL/JudznCaCnCc=; b=vQ6jEpi/yBwipMNWGT0zv8cLSn2rBI+dMs5scW4T3yL4k2MBWHNg9Qca59QBQ0qX+b KyvucHuhWU8I39yy0N/qq58BXRphewgjnosNrdV6w+ewB7Tb8Ow8iB/1wjhXPjZwO9xX jHhAS7QiCYZHgy//lOFmn+QvaUyH9x4HI8PLq1YDdpX8Zc090wk+dAHisJGfmOjW/nOg LRu7D+Oum+hnvLj+CQwi7evwaaIWVck5KKw7TA2CRz2eum/IxBriX/vZ2zlVl5wwbxHJ PrJ01XgOmE2I/0b2+IIUogefoaWubg7CHe+RLIx3eKYZsxcUf3tmz36YViS50/xgiAZN 1MBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="sX4yjEO/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w67-20020a636246000000b005537e4ff026si11017798pgb.722.2023.06.29.06.31.38; Thu, 29 Jun 2023 06:31:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="sX4yjEO/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229615AbjF2NYA (ORCPT + 99 others); Thu, 29 Jun 2023 09:24:00 -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> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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