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 X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50E8DC43381 for ; Wed, 20 Mar 2019 17:50:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 241192184D for ; Wed, 20 Mar 2019 17:50:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727271AbfCTRuM (ORCPT ); Wed, 20 Mar 2019 13:50:12 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:38138 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726049AbfCTRuL (ORCPT ); Wed, 20 Mar 2019 13:50:11 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id E0581148EA25A; Wed, 20 Mar 2019 10:50:10 -0700 (PDT) Date: Wed, 20 Mar 2019 10:50:10 -0700 (PDT) Message-Id: <20190320.105010.192905616973367477.davem@davemloft.net> To: hkallweit1@gmail.com Cc: andrew@lunn.ch, f.fainelli@gmail.com, heiko@sntech.de, david.wu@rock-chips.com, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: Re: [PATCH net-next] net: phy: improve handling link_change_notify callback From: David Miller In-Reply-To: <85f94f2f-8d1b-214f-a4af-afaf26d68ca0@gmail.com> References: <85f94f2f-8d1b-214f-a4af-afaf26d68ca0@gmail.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Wed, 20 Mar 2019 10:50:11 -0700 (PDT) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Heiner Kallweit Date: Tue, 19 Mar 2019 19:56:51 +0100 > Currently the Phy driver's link_change_notify callback is called > whenever the state machine is run (every second if polling), no matter > whether the state changed or not. This isn't needed and may confuse > users considering the name of the callback. Actually it contradicts > its kernel-doc description. Therefore let's change the behavior and > call this callback only in case of an actual state change. > > This requires changes to the at803x and rockchip drivers. > at803x can be simplified so that it reacts on a state change to > PHY_NOLINK only. > The rockchip driver can also be much simplified. We simply re-init > the AFE/DSP registers whenever we change to PHY_RUNNING and speed > is 100Mbps. This causes very small overhead because we do this even > if the speed was 100Mbps already. But this is negligible and > I think justified by the much simpler code. > > Changes are compile-tested only. > > A little bit problematic seems to be to find somebody with the > hardware to test the changes to the two PHY drivers. See also [0]. > David may be able to test the Rockchip driver. > > [0] https://marc.info/?t=153782508800006&r=1&w=2 > > Signed-off-by: Heiner Kallweit I'm just going to apply this, let's see what happens as I don't really see any value after all of this time of waiting for testing that may or may not happen. We can always revert. Thanks. 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 X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A602C43381 for ; Wed, 20 Mar 2019 17:50:23 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6EAAD2184D for ; Wed, 20 Mar 2019 17:50:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="B1cBimZ+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6EAAD2184D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=davemloft.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Mime-Version:References:In-Reply-To: From:Subject:To:Message-Id:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dLzjHC9e0gwmTFSp9/k+Hx7/Y98Gc65YOpEIrcdAySs=; b=B1cBimZ+Qphrij eh+pcs0f8lObACfXe6GoIF2VhKiaFONYzQoRwmaP1z/5q5cCJoUX1XEReMBAdXZgE7wg5T3JsMoal dYIjEpM4p9vD5uSC+yAkv1FV1ISNKLMl5G01XmAsoadykB2UdX4F+AAQK3WSXwf/vrEdOVqWzD700 YVJHqc63LpShHobBWp3Sfqm1fD9IbZeP+/+kSUaJY+iuwVkJXN04Y6vFLIHEaYLsxK277kqtlXlXR G3cCz83/9dNkTO3DWaoVh/XGWm9ojh+C1zAUwQfHujQ+5Bc7dno5ClVX42vPaHNxz0/AhQMIe+8WF lxPOm3MSMQEEYyCIETwg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h6fM3-0000To-Vm; Wed, 20 Mar 2019 17:50:19 +0000 Received: from shards.monkeyblade.net ([2620:137:e000::1:9]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h6fM0-0000TR-SQ; Wed, 20 Mar 2019 17:50:18 +0000 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id E0581148EA25A; Wed, 20 Mar 2019 10:50:10 -0700 (PDT) Date: Wed, 20 Mar 2019 10:50:10 -0700 (PDT) Message-Id: <20190320.105010.192905616973367477.davem@davemloft.net> To: hkallweit1@gmail.com Subject: Re: [PATCH net-next] net: phy: improve handling link_change_notify callback From: David Miller In-Reply-To: <85f94f2f-8d1b-214f-a4af-afaf26d68ca0@gmail.com> References: <85f94f2f-8d1b-214f-a4af-afaf26d68ca0@gmail.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Wed, 20 Mar 2019 10:50:11 -0700 (PDT) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190320_105016_924321_D367814C X-CRM114-Status: GOOD ( 13.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: andrew@lunn.ch, f.fainelli@gmail.com, heiko@sntech.de, netdev@vger.kernel.org, linux-rockchip@lists.infradead.org, david.wu@rock-chips.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Heiner Kallweit Date: Tue, 19 Mar 2019 19:56:51 +0100 > Currently the Phy driver's link_change_notify callback is called > whenever the state machine is run (every second if polling), no matter > whether the state changed or not. This isn't needed and may confuse > users considering the name of the callback. Actually it contradicts > its kernel-doc description. Therefore let's change the behavior and > call this callback only in case of an actual state change. > > This requires changes to the at803x and rockchip drivers. > at803x can be simplified so that it reacts on a state change to > PHY_NOLINK only. > The rockchip driver can also be much simplified. We simply re-init > the AFE/DSP registers whenever we change to PHY_RUNNING and speed > is 100Mbps. This causes very small overhead because we do this even > if the speed was 100Mbps already. But this is negligible and > I think justified by the much simpler code. > > Changes are compile-tested only. > > A little bit problematic seems to be to find somebody with the > hardware to test the changes to the two PHY drivers. See also [0]. > David may be able to test the Rockchip driver. > > [0] https://marc.info/?t=153782508800006&r=1&w=2 > > Signed-off-by: Heiner Kallweit I'm just going to apply this, let's see what happens as I don't really see any value after all of this time of waiting for testing that may or may not happen. We can always revert. Thanks. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel