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=-5.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, 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 32959C43381 for ; Wed, 20 Feb 2019 18:37:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0983B21841 for ; Wed, 20 Feb 2019 18:37:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rDgWcgE8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726860AbfBTShW (ORCPT ); Wed, 20 Feb 2019 13:37:22 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:44393 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725842AbfBTShV (ORCPT ); Wed, 20 Feb 2019 13:37:21 -0500 Received: by mail-wr1-f68.google.com with SMTP id w2so12593230wrt.11 for ; Wed, 20 Feb 2019 10:37:20 -0800 (PST) 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=laGjL2RKAolyKfOZgHHvWKd0HOWNWjCD/UZSjAEDrhg=; b=rDgWcgE8n435UOnkTajLVdf4ptvz5+m0znSfz1xtV5XPSrkaA9VQZrHVfAgxiAm8/Z z/b8U31l1/crNwylmSaXAk1UQU/RGcCneG7uqMyliQAMFfuYncwUO/hBDih1ZzMpTsi9 DP/7MgMsRjy9FccR9zTLmdu4shN19zVBdwSPRdvoK4bM7caBTNjF7ebf97O75ePGIkER DvbSD7PnwZ/+uP3kMFoJ5dCuCFKYq6uK0HuC5vnXMEIJcvwWGGykJrmx72Sa4KpkHTHx ryOqTbnwe+srC5ssE6MUJUjZsabhG8Rk0MuMb6RkQxZxxp/zKc/fAjjOMVOv6LgkEpya 7hqg== 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=laGjL2RKAolyKfOZgHHvWKd0HOWNWjCD/UZSjAEDrhg=; b=ukEXkNK25xGDVQyJ1nFMmb8THGiPo/FolvsQjmJDUOfpzM7UcfFWkdsLgKboCuy2Yj bSjUnFQ0Ik3Bb2QGhkaWAMth6tY4J2qPDhU6tK6Lxjkt/GbB8JwNs4Tb5+s5BQSQS3Jk o6pZCka4U8ljEnMhqqvRSOhcfVZ5QvkF86p/ji9G9gJZK8TydOYDE72CJ73YssUdpC3M 9us9R0wJRAwyWNZb50skiUW4FbOwEMYajwgsZ/OZKOQrOgp7unmHZU0tXNPiaZTPMHvm 3BI7qrke/KOoEj1tyzRPhP9jeWD0IBYYq/S1SoPIsSzTDKdxk7M4GiOFD8lQVfDLwYFT Salg== X-Gm-Message-State: AHQUAuZLDrgV3AMdeURgAVZO/hTm0bl3t+HEiLjU89zXjWpZQlCQC0BM nSEbaLjRaSKxgm9OP0YS2Bo07egt X-Google-Smtp-Source: AHgI3Ia9tcVbvpeBrDCmJKORPhGPxgHfUY11JjQ8YtqjKQprXR5EQJkQkAMAythE8qxPQ7KRLs8gKA== X-Received: by 2002:adf:f3d0:: with SMTP id g16mr25261650wrp.29.1550687839265; Wed, 20 Feb 2019 10:37:19 -0800 (PST) Received: from ?IPv6:2003:ea:8bf1:e200:5bf:dab0:b19b:7808? (p200300EA8BF1E20005BFDAB0B19B7808.dip0.t-ipconnect.de. [2003:ea:8bf1:e200:5bf:dab0:b19b:7808]) by smtp.googlemail.com with ESMTPSA id a74sm4388087wma.22.2019.02.20.10.37.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Feb 2019 10:37:18 -0800 (PST) Subject: Re: [RFC] net: dsa: qca8k: CPU port broken with commit 5502b218e001 ("net: phy: use phy_resolve_aneg_linkmode in genphy_read_status") To: =?UTF-8?B?TWljaGFsIFZva8OhxI0=?= , Andrew Lunn , Vinod Koul Cc: "David S. Miller" , Florian Fainelli , netdev@vger.kernel.org References: From: Heiner Kallweit Message-ID: <464871d9-777c-9edd-40a1-2653aea1e0e3@gmail.com> Date: Wed, 20 Feb 2019 19:37: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: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 20.02.2019 16:02, Michal Vokáč wrote: > Hi, > > Another issue in a row with networking on imx6dl-yapp4 platform [1] > that uses QCA8334 Ethernet switch. > > Very recently, with Vinod and Andrew, we solved an issue with > RGMII_ID mode by patch[2][3]. I tested those with next-20190215 > and it worked just fine. > > The patch[2] was merged into next-20190220 so I tested the latest version. > Now the cpu port does not work again. I tracked it down to this commit > 5502b218e001 ("net: phy: use phy_resolve_aneg_linkmode in > genphy_read_status") [4] > > If I revert the offending commit, cpu port works fine. I suspect the > problem is on the qca8k driver side but I am not really sure. > AFAICT autonegotiation is not available on the QCA833x cpu port (MAC0). > Patch[4] only affects a code path with AUTONEG_ENABLE == phydev->autoneg. IMO this shouldn't be the case for the cpu port (like you state). Seems like somewhere a phydev->autoneg = AUTONEG_DISABLE is missing. Not clear to me is where the difference with this patch comes from. It would be helpful to know (w/o patch[4]): - which values the register reads in genphy_read_status() return - which bits are set in phydev->advertising > Any ideas what may be the root cause of the problem? > > Thank you, > Michal > Heiner > [1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=87489ec3a77f3e01bcf0d46e353ae7112ec8c4f0 > [2] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=a968b5e9d5879f9535d6099505f9e14abcafb623 > [3] https://lore.kernel.org/patchwork/patch/1043817/ > [4] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=5502b218e001 >