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=-6.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, 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 7FE09C43381 for ; Fri, 22 Feb 2019 22:52:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4AFDA20645 for ; Fri, 22 Feb 2019 22:52:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FYfWS0We" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726221AbfBVWws (ORCPT ); Fri, 22 Feb 2019 17:52:48 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:34600 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725821AbfBVWwr (ORCPT ); Fri, 22 Feb 2019 17:52:47 -0500 Received: by mail-wm1-f68.google.com with SMTP id y185so9848977wmd.1 for ; Fri, 22 Feb 2019 14:52:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=paTBP6ybnkBaxUWMbcWOut0HM1EtZ9UbgFR2cOUUnKQ=; b=FYfWS0We4b9XlZxR5NBzaSbXccgtG0u7Ql3RrYRUADZtgk1inYQWISd2WoKN38TZhp qK6KVb2xeXld00+HilkFrSWVxCEMZi8C95VsZI2Seq7uJ463erdehJOpvdhLvXYcr460 vOIYpYoJQYLWiArt28GKMGEXVaRHP5698Vhj4895qJASmRp6aat+MZnISk8z1wZVMYmh c4ZaAFQ+7Lyuhqui1Bswc3GXPPBXzbL5WSspYpvYlMMxBY8YTPH+tUKmJGDOwFgs/qD7 77jURd3hbfacHLf7dqj8XkBMOHtU9SHPFGEm7r8Ig+o0kuFPDJT5pjNZ2Vw1qJmffH0P 7FvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=paTBP6ybnkBaxUWMbcWOut0HM1EtZ9UbgFR2cOUUnKQ=; b=YO+XRtBq5H9xDWPxSHjkDH8/c6DBQ5yAV4MWUHVM+StQqzg5Z2WeQ/D6zJKxLqGhTU 1cBVpmyhhx0X+hNAlmoV8GbCF6ljSqw6QU6piVsByFkYTTvc4GC70l2rFaTnu5+2HY6w rkVD2TJgSVP4RMuv3xMTMos1d+ufERM1TamOq27RTNOaanEAWEMXVVFEMFbNXBKhqTUr WiSJeJO9hfyIJ6yq1thPuaN/8Fz2QBsH4CxNYnVurSabfGSZFnN3vyzy90zwYU6awdci TvdVh3noN20BFi7jeIw4Q5obvsuHDY1V8chIkQogVfOvU9taTWNO5XfNFtAWE1iLwFZb 9hLg== X-Gm-Message-State: AHQUAuaA+0m1ZWMgNhop7Mfaq2CSpnemPBa83MCJmi0i8hjqZQKuacKg t/6oUs9kLJ7SXUS9jGHKsQaw/zsp X-Google-Smtp-Source: AHgI3IbfOT93aP5mGutukFXxJZcMiJmb+KdssKSdXN0xaTInAT4MnUI54Jt/acX2Iy6UMTQf9NBmLg== X-Received: by 2002:a1c:3c02:: with SMTP id j2mr3991380wma.72.1550875965631; Fri, 22 Feb 2019 14:52:45 -0800 (PST) Received: from ?IPv6:2003:ea:8bf1:e200:881a:e62a:a902:5b57? (p200300EA8BF1E200881AE62AA9025B57.dip0.t-ipconnect.de. [2003:ea:8bf1:e200:881a:e62a:a902:5b57]) by smtp.googlemail.com with ESMTPSA id f6sm3416718wrt.87.2019.02.22.14.52.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Feb 2019 14:52:45 -0800 (PST) Subject: [PATCH net-next 1/5] net: phy: aquantia: remove false 5G and 10G speed ability for AQCS109 From: Heiner Kallweit To: Andrew Lunn , Florian Fainelli , David Miller Cc: "netdev@vger.kernel.org" References: <4ae20155-367d-4b11-63f9-28580b7cf1cb@gmail.com> Message-ID: <7aa35fce-b420-1637-8fb0-6b2cbae24d71@gmail.com> Date: Fri, 22 Feb 2019 23:48:14 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <4ae20155-367d-4b11-63f9-28580b7cf1cb@gmail.com> 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 AQCS109 belongs to a family of PHY's where certain members don't support 5G or 10G. However for all members of the family the chip reports 10G and 5G capability. Therefore remove the not supported modes for AQCS109. Signed-off-by: Heiner Kallweit --- drivers/net/phy/aquantia.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/phy/aquantia.c b/drivers/net/phy/aquantia.c index 34be44d00..9661ef4b4 100644 --- a/drivers/net/phy/aquantia.c +++ b/drivers/net/phy/aquantia.c @@ -152,6 +152,15 @@ static int aqr_read_status(struct phy_device *phydev) return 0; } +static int aqcs109_config_init(struct phy_device *phydev) +{ + /* AQCS109 belongs to a chip family partially supporting 10G and 5G. + * PMA speed ability bits are the same for all members of the family, + * AQCS109 however supports speeds up to 2.5G only. + */ + return phy_set_max_speed(phydev, SPEED_2500); +} + static struct phy_driver aqr_driver[] = { { PHY_ID_MATCH_MODEL(PHY_ID_AQ1202), @@ -208,6 +217,7 @@ static struct phy_driver aqr_driver[] = { .name = "Aquantia AQCS109", .aneg_done = genphy_c45_aneg_done, .get_features = genphy_c45_pma_read_abilities, + .config_init = aqcs109_config_init, .config_aneg = aqr_config_aneg, .config_intr = aqr_config_intr, .ack_interrupt = aqr_ack_interrupt, -- 2.20.1