Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp808078rwb; Thu, 18 Aug 2022 12:36:12 -0700 (PDT) X-Google-Smtp-Source: AA6agR5xJ5wH+XJKSRVJjDrw0ytUU1+O9Wo/sXhKWn4t+mwOCVNALwU3jQzRPCgRvNoQhL9dmGB4 X-Received: by 2002:a05:6402:28c3:b0:43a:6d78:1b64 with SMTP id ef3-20020a05640228c300b0043a6d781b64mr3484208edb.93.1660851372262; Thu, 18 Aug 2022 12:36:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660851372; cv=none; d=google.com; s=arc-20160816; b=h0WATBUIOMPdXSeuEYejc5IYmmR5gVwyXPhFcRKVsbRsE7+XIdyXz8Z+uGEvL0LeS5 x9BVjehskQKBWQtqTqkC4hjw0N32y+59K8sMtQfUjl0FQaYJe2GLk4AJAvbQqhxYwauW xWC4whYgkvMeD4WzQ87+n4pVG7tc3OVemthoCDaMoS39d3DAgzAU9hu4L028mLdrqAiI 3rwUqQqS82AOF/6rDNooOvzRu1Vhi2zb+NUIirEpTwUmQikszRu0VKb6t3PvcdkNg8Xi ancaZgc7g+ZC1g0QpWDo9MOQz3K9qlDDvsE0xbicW5TwK/755lys+Tj3+K5g0A6EglOu aTPQ== 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=m2TqgJNIWwyazWLkcfL5XAqqJsNhYd/phFt1LrX7IWI=; b=eelYE0kw0eKcq85aqja+3s2wjO8wgedAaMy3RfymdV/VLWJF2LaqRVskwNtq4HtNhZ mwPwukW2V84HBWtAmFaA/JXzE9zP/whC1nM2FkfIzudBnnFDJ2laHIWB5upluKGdxqCM AE68HGhWvL+xc5zN7HESfTatFNaC/PDtZfSw5yUG+PAxEdA2QF9GKIGyn7DVVlGBcUbz 3bKlL9YsIlyOIqPfkaQUtAUxHrugY/8akWTHAY006eRnlG/th18t7f7hRGGiFb+saE4B fPCFGXVNDRcEAZXBwyamyr1pASmHcE/Hxf6ADh3IeAAbicL/fQOycFsc3XuDzeqfK7LL yvsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=pqC0tvA1; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hb7-20020a170907160700b00731010c202dsi1644583ejc.764.2022.08.18.12.35.45; Thu, 18 Aug 2022 12:36:12 -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=pqC0tvA1; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344769AbiHRT3U (ORCPT + 99 others); Thu, 18 Aug 2022 15:29:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236142AbiHRT3T (ORCPT ); Thu, 18 Aug 2022 15:29:19 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 970D0CAC94; Thu, 18 Aug 2022 12:29:18 -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=m2TqgJNIWwyazWLkcfL5XAqqJsNhYd/phFt1LrX7IWI=; b=pqC0tvA1f7M1sE//R6GUZWzhPY ijf52Tp9m+74M4K2fWmgGTAHW4gProQ0js2fwOR/EsFjAzOkggrVwPLaqWt0TYQVIZfAjOsok7ftx 01qLB2sevp7Axe1iwzczxKRex4W0ofZzC9I8nmmgghUJvesFrWC+8fZ9GqodM3zjbtBc=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1oOlCV-00Dplv-O9; Thu, 18 Aug 2022 21:29:07 +0200 Date: Thu, 18 Aug 2022 21:29:07 +0200 From: Andrew Lunn To: wei.fang@nxp.com Cc: hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, f.fainelli@gmail.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V3 net 2/2] net: phy: at803x: add disable hibernation mode support Message-ID: References: <20220818030054.1010660-1-wei.fang@nxp.com> <20220818030054.1010660-3-wei.fang@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220818030054.1010660-3-wei.fang@nxp.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,URIBL_BLOCKED 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 On Thu, Aug 18, 2022 at 11:00:54AM +0800, wei.fang@nxp.com wrote: > From: Wei Fang > > When the cable is unplugged, the Atheros AR803x PHYs will enter > hibernation mode after about 10 seconds if the hibernation mode > is enabled and will not provide any clock to the MAC. But for > some MACs, this feature might cause unexpected issues due to the > logic of MACs. > Taking SYNP MAC (stmmac) as an example, if the cable is unplugged > and the "eth0" interface is down, the AR803x PHY will enter > hibernation mode. Then perform the "ifconfig eth0 up" operation, > the stmmac can't be able to complete the software reset operation > and fail to init it's own DMA. Therefore, the "eth0" interface is > failed to ifconfig up. Why does it cause this issue? The truth is > that the software reset operation of the stmmac is designed to > depend on the RX_CLK of PHY. > So, this patch offers an option for the user to determine whether > to disable the hibernation mode of AR803x PHYs. > > Signed-off-by: Wei Fang Reviewed-by: Andrew Lunn Andrew