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=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS 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 C1D56C10F13 for ; Mon, 8 Apr 2019 17:45:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8FD832084F for ; Mon, 8 Apr 2019 17:45:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fhdP6jdQ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727115AbfDHRpX (ORCPT ); Mon, 8 Apr 2019 13:45:23 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:34938 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726373AbfDHRpX (ORCPT ); Mon, 8 Apr 2019 13:45:23 -0400 Received: by mail-wm1-f65.google.com with SMTP id y197so292581wmd.0 for ; Mon, 08 Apr 2019 10:45:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=GRUNV5oGcXckRtLhTDyTVRFJWAPelDcxnZ9k23CSt7w=; b=fhdP6jdQ4C2X6LZ91q5BzQf1AYXJxZeAQbR/GnwF3ObwiVVzKvc8X5D6oMmjYHL0lK uxQK4ezeSw8hKZYWnrlN8W+fPAcyU9qDlz1+iNrRbvO/Vd30+LHnWFMVPXZDkUqTfbkj v4d0Skf3pbKbMbQOJ3Pwz760z42OwoaZPQFGlqJcae9DmvKLnvLwpNr8njsy0ask632q ZXNCvM/c3JdZ2FFRWDxvOxW/UiVcAiPgBoXDfqHXcbDUUTupwPomZk1DqHXHYF1btlhh E3CaQYpStHMOB2iGCnDJRh+/Z/n7zk+J60OGwijPbNpx8/FQ8u1TU9J0OEpgzYcw+66S yhuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=GRUNV5oGcXckRtLhTDyTVRFJWAPelDcxnZ9k23CSt7w=; b=jDG9TOirRbrf04e8oGyyMXfKtcQZty7D0uLqSFq9czc1W2CO6vQ4MpWamwilgyVliJ o6yD5Sew3yGnNRhN3uLxvXtRpA7eG6ZDcZYv04EiF2EAGKGgHjj60b16gMzpdLnWX2is SCapp7KDhwPPkWT5fGxVko6OwlxFSrsiJgS6fgGv5wIdi1CuPJM1C+UXlW0upeBwJdCU aFOklLUJSk5lhlXnOixULqUHpoVrwtWeMzOYNfiyCEV9EpV3rKDjktAE28KtXM1rM7HA leNdB3F5rhe5yXmTXyffb9jUygidLwMsbS9wtBdDTnmFd0JCHOX1P0d9WuyJYWg/szkJ Vx/w== X-Gm-Message-State: APjAAAW1Fv4dK3ybTEbohK7AFTcvFmnrs/N35uwY6aisgXKAxrxCoGg6 x8ifwWDsq7vN+NZjwMmCZPT5HOFr X-Google-Smtp-Source: APXvYqwJaV55JFkra/rNQOH6nc2BpIM7/I0dndyXv4LagrDxJF3S8zhS8O0FGDpr7VQBZHEJX7xRhg== X-Received: by 2002:a1c:6309:: with SMTP id x9mr18361258wmb.101.1554745521505; Mon, 08 Apr 2019 10:45:21 -0700 (PDT) Received: from ?IPv6:2003:ea:8bde:d800:1488:bc0a:4c8c:6b35? (p200300EA8BDED8001488BC0A4C8C6B35.dip0.t-ipconnect.de. [2003:ea:8bde:d800:1488:bc0a:4c8c:6b35]) by smtp.googlemail.com with ESMTPSA id f1sm27840379wrt.87.2019.04.08.10.45.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Apr 2019 10:45:20 -0700 (PDT) Subject: Re: [PATCH net-next] net: phy: switch drivers to use dynamic feature detection To: Andrew Lunn Cc: Florian Fainelli , David Miller , Ray Jui , Scott Branden , Richard Cochran , Kevin Hilman , Heiko Stuebner , bcm-kernel-feedback-list@broadcom.com, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-rockchip@lists.infradead.org References: <0cc96fab-e102-c0d1-ade0-90e3e06dc9f1@gmail.com> <20190407221312.GA14347@lunn.ch> From: Heiner Kallweit Message-ID: Date: Mon, 8 Apr 2019 19:45:13 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190407221312.GA14347@lunn.ch> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 08.04.2019 00:13, Andrew Lunn wrote: > On Sun, Apr 07, 2019 at 11:57:13AM +0200, Heiner Kallweit wrote: >> Recently genphy_read_abilities() has been added that dynamically detects >> clause 22 PHY abilities. I *think* this detection should work with all >> supported PHY's, at least for the ones with basic features sets, i.e. >> PHY_BASIC_FEATURES and PHY_GBIT_FEATURES. So let's remove setting these >> features explicitly and rely on phylib feature detection. > > Hi Heiner > Hi Andrew, > We could make this a two step process, to avoid regressions. For one > cycle compare genphy_read_abilities() against .features and raise a > WARN_ON() if they differ. And keep using the .features value. > in general this is a good idea. I say in general because this would fail with several, if not most GBit PHY's. Reason is that the hardcoded features currently pretend we're supporting 1000BT/Half, whilst several PHY's don't support this mode. 1000BT/Half has been specified but never really been used. If we see it from this angle, the series is actually a fix. The feature detection uses very basic C22 registers/bits, therefore I consider the risk of breaking something to be relatively low. And just in case we have the rc phase to fix support for a broken PHY. Splitting the series and waiting for a Tested-by, as proposed by Richard, may be problematic because most PHY drivers don't have a dedicated maintainer, and we lack the hardware to test. > Then a release late, complete the swap removing .features and the > WARN_ON. > > Andrew > . > Heiner