Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1064698rda; Mon, 23 Oct 2023 00:52:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH9AOUx1Od5nJdpmgn7bCLJSiwxqSPdt75LPFzm/9BfVc1k1/uyuvmqrZyt34+AsSec0YWg X-Received: by 2002:a05:6a21:9981:b0:17a:f4b6:bf89 with SMTP id ve1-20020a056a21998100b0017af4b6bf89mr9478584pzb.31.1698047548831; Mon, 23 Oct 2023 00:52:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698047548; cv=none; d=google.com; s=arc-20160816; b=UW9Cfj32o1cz3Ia38FI22UjdTahboZvQ9gCQmvIKP3W7E9ME8jKnHEwcvWjGhsLc0m TbzcT82hJZxP8a6GIVoqcGEhiV0cwCxIoMg83OL3wuIz6sp6AzItlcxJf7sLJJ3O7Qx/ rmanq4aeYBuE5fAN3BNp0WnPH3q1YWsa3roCOgQ5OLpwXoj4LRBgHON8aryHa9MaPpCC sS644r5P84NlmRzzLtB+NClppkEOKUJ+oQUjMATFK5u/ZX9wKChygrDKw54vMqVKveCo f/Oeh78wsXS1geYDlKu55UFAF+rg+64XUPhr3sZ0Hr+M1YGEmRFDeTwWSeppRbOJ9zuu z8hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :from:content-language:references:cc:to:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=g6Cypa6bu6TTcvPFXIDJ6BPmvosK1akmEJBTHk/FsCg=; fh=6TZa9N+sKIuMyPVbo/goqB6ny2+2xaNFkS3Q1wsyzxY=; b=oyhfFMdmlBET2z6fjQMjep9UABE0xTGXHYMVm8U9w/U2oE9McRxSP6+vn3ORN7yI3v qCusSQR8c62NRZJxOCq820mBWi0bgUWMAFSKIA6/JuzUytqP17pr/OylgyyhPzFD36VB ra43BM95KB9b3d7D4aGRseeCxXrLeXM/e3K7DEe+FG2CJ/euqJXeAbwXxyxDI1a8F2mS +eHZq8TQL11mV9Omv/BfR1/Q+7QHWzwdxkXKIvIUkKcnxJMmBZ77ADHH1kQF4xAGYe8W hmn2vNanhsfSC+o0SZoBVQ6oVxbcyPFxoOqjEMUu7SpobxP0EhljHcWnZo1W+LBp62wD rK1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=m+Vm+KF8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id j63-20020a638042000000b00564d6ad2746si6016891pgd.452.2023.10.23.00.52.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 00:52:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=m+Vm+KF8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id E7F6480ADF20; Mon, 23 Oct 2023 00:52:27 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233412AbjJWHwZ (ORCPT + 99 others); Mon, 23 Oct 2023 03:52:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229515AbjJWHwY (ORCPT ); Mon, 23 Oct 2023 03:52:24 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31E55DB; Mon, 23 Oct 2023 00:52:21 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-9b6559cbd74so448543066b.1; Mon, 23 Oct 2023 00:52:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698047539; x=1698652339; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=g6Cypa6bu6TTcvPFXIDJ6BPmvosK1akmEJBTHk/FsCg=; b=m+Vm+KF8x49WhnH5d+oa2CzX/w0ZxW5LwX4uqCcSLVKFaP84kSjxYoQs62TeKTCins mrv3Ujd4cDmeCuqSqLhb410vrei6SU9sOzXvi7g+0wzv6WCV65rL2MNlj6dQFsp/h9Yt Yd6Inw7cgCaopkgwe3S/w9f8RPdO+2/WcETztpio6n+dUkauuRywo0FAon3w3JEoY0XM P7eEveSANsgijMCSojvMmNpXblF0+jAZGdrt8oBosxKCMKkWIg828DjhHpZW2XG4Zcyd Z9vqiqcDwjyxl2p2pWWVrOVp3TaTwKqjpInlz23AUgGLF76gDe0gVwakuQLwUL9mvLVs TzzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698047539; x=1698652339; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=g6Cypa6bu6TTcvPFXIDJ6BPmvosK1akmEJBTHk/FsCg=; b=UEXxpCyQFKojputI+SAtKK3hItkuOB/rysLddM1JHjyY8Saz7a7mvU1hbNyriHLphp pqom6UC5DXGqrwPJ1oPwbYM8El8pjxM7qIfLCoImPILiCt/lg5Sl5dy+hfhYSHRAiWIF by22cQTDldipKIjq2YIMbwgAFnz8hmK72OMuHZxWW3RPo606sl69XK1lDxqtG9iE3XMo aWv7FqYYRcnLnLHIKNLPajHyks5PLuIdQmZMep05u2S5ToZaVwVawIpP/ZeTxIWGRTvW GC+lHUhi8xtLzVjucdoBvif6pvlb/8YgACgHkkCugkW6fHdeD5GD2xolNU+CzArmIel/ Hskw== X-Gm-Message-State: AOJu0Yw7X2FsN7amvA1AEJL9zSzQDQGzZAQ4kALXob1kfRYf5jgpUkPM 8sAHSiOkwRBqhHKhanhxcyqMZRUqook= X-Received: by 2002:a17:907:a089:b0:9ad:7d5c:3d4b with SMTP id hu9-20020a170907a08900b009ad7d5c3d4bmr7508046ejc.35.1698047539089; Mon, 23 Oct 2023 00:52:19 -0700 (PDT) Received: from ?IPV6:2a01:c23:c1ff:8700:54bd:2e8b:2e0a:b78d? (dynamic-2a01-0c23-c1ff-8700-54bd-2e8b-2e0a-b78d.c23.pool.telefonica.de. [2a01:c23:c1ff:8700:54bd:2e8b:2e0a:b78d]) by smtp.googlemail.com with ESMTPSA id hb13-20020a170906b88d00b009c46445fcc7sm6258738ejb.33.2023.10.23.00.52.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 23 Oct 2023 00:52:18 -0700 (PDT) Message-ID: Date: Mon, 23 Oct 2023 09:52:19 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: phy: fixed link 1000 or 100 set with autoneg off To: "Jia, Fang" , Andrew Lunn , Florian Fainelli , "David S. Miller" Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: Content-Language: en-US From: Heiner Kallweit Autocrypt: addr=hkallweit1@gmail.com; keydata= xsFNBF/0ZFUBEAC0eZyktSE7ZNO1SF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szXGxlc9kTrVUz04PqPjnYbv5UWuDd2eyzGjrrFOsJEi8OK2d2j4FfF++ AzOMdW09JVqejQARAQABwsF2BBgBCAAgFiEEbF+pj/I7JePKMl6Fct6KD1TwOgwFAl/0ZFUC GwwACgkQct6KD1TwOgxUfg//eAoYc0Vm4NrxymfcY30UjHVD0LgSvU8kUmXxil3qhFPS7KA+ y7tgcKLHOkZkXMX5MLFcS9+SmrAjSBBV8omKoHNo+kfFx/dUAtz0lot8wNGmWb+NcHeKM1eb nwUMOEa1uDdfZeKef/U/2uHBceY7Gc6zPZPWgXghEyQMTH2UhLgeam8yglyO+A6RXCh+s6ak Wje7Vo1wGK4eYxp6pwMPJXLMsI0ii/2k3YPEJPv+yJf90MbYyQSbkTwZhrsokjQEaIfjrIk3 rQRjTve/J62WIO28IbY/mENuGgWehRlTAbhC4BLTZ5uYS0YMQCR7v9UGMWdNWXFyrOB6PjSu Trn9MsPoUc8qI72mVpxEXQDLlrd2ijEWm7Nrf52YMD7hL6rXXuis7R6zY8WnnBhW0uCfhajx q+KuARXC0sDLztcjaS3ayXonpoCPZep2Bd5xqE4Ln8/COCslP7E92W1uf1EcdXXIrx1acg21 H/0Z53okMykVs3a8tECPHIxnre2UxKdTbCEkjkR4V6JyplTS47oWMw3zyI7zkaadfzVFBxk2 lo/Tny+FX1Azea3Ce7oOnRUEZtWSsUidtIjmL8YUQFZYm+JUIgfRmSpMFq8JP4VH43GXpB/S OCrl+/xujzvoUBFV/cHKjEQYBxo+MaiQa1U54ykM2W4DnHb1UiEf5xDkFd4= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 23 Oct 2023 00:52:28 -0700 (PDT) On 23.10.2023 09:01, Jia, Fang wrote: > Hi Experts, > > We use NXP LS1046 board and face an issue about the eth interface speed. > > 1) Scenario > > we set fixed link 1000Mb/s in device tree. > > However, after we set the auto-neg off, then the eth1's speed changed to 10M and Duplex changed to Half. > The value of /sys/class/net/eth1/speed is 10 and /sys/class/net/eth1/duplex is half > Why do you set aneg to off? Leave aneg on, that's the only supported mode in swphy. 1000Mbps requires aneg anyway per standard. > 2) Log is as following. > > # ifconfig eth1 up > # ethtool eth1 > Settings for eth1: >         Supported ports: [ MII ] >         Supported link modes:   1000baseT/Full >         Supported pause frame use: Symmetric Receive-only >         Supports auto-negotiation: Yes > >         Supported FEC modes: Not reported > >         Advertised link modes:  1000baseT/Full >         Advertised pause frame use: Symmetric Receive-only > >         Advertised auto-negotiation: Yes >         Advertised FEC modes: Not reported >         Speed: 1000Mb/s >         Duplex: Full >         Port: MII >         PHYAD: 1 >         Transceiver: internal >         Auto-negotiation: on >         Supports Wake-on: d >         Wake-on: d >         Current message level: 0xffffffff (-1) >                                drv probe link timer ifdown ifup rx_err tx_err tx_queued intr tx_done rx_status pktdata hw wol 0xffff8000 >         Link detected: yes > > # ethtool -s eth1 autoneg off > # ethtool eth1 > Settings for eth1: >         Supported ports: [ MII ] >         Supported link modes:   1000baseT/Full >         Supported pause frame use: Symmetric Receive-only >         Supports auto-negotiation: Yes >         Supported FEC modes: Not reported >         Advertised link modes:  1000baseT/Full >         Advertised pause frame use: Symmetric Receive-only >         Advertised auto-negotiation: No >         Advertised FEC modes: Not reported >         Speed: 10Mb/s >         Duplex: Half >         Port: MII >         PHYAD: 1 >         Transceiver: internal >         Auto-negotiation: off >         Supports Wake-on: d >         Wake-on: d >         Current message level: 0xffffffff (-1) >                                drv probe link timer ifdown ifup rx_err tx_err tx_queued intr tx_done rx_status pktdata hw wol 0xffff8000 >         Link detected: yes > > 3) After code tracing, we found that: > > phy_state_machine() >     state PHY_RUNNING: phy_check_link_status() >         phy_read_status() >             genphy_read_status() >                 genphy_read_status_fixed() > > In genphy_read_status_fixed(), the speed and duplex changed. > It seems like the bmcr value is always 0x1000 from swphy_read_reg(). > > After revert the commit 726097d6d6d(net: phy: improve auto-neg emulation in swphy), then the Speed and Duplex shown comes back to 1000M and Full. > > Could you please take a look it ? Can we revert this commit, is there any side impact ? > > Best Regards, > Fang