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 B71E2C43381 for ; Sat, 23 Feb 2019 21:48:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8345120855 for ; Sat, 23 Feb 2019 21:48:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="j1GJ4COQ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727973AbfBWVs2 (ORCPT ); Sat, 23 Feb 2019 16:48:28 -0500 Received: from mail-wm1-f51.google.com ([209.85.128.51]:40844 "EHLO mail-wm1-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726089AbfBWVs2 (ORCPT ); Sat, 23 Feb 2019 16:48:28 -0500 Received: by mail-wm1-f51.google.com with SMTP id t15so4842493wmi.5 for ; Sat, 23 Feb 2019 13:48:27 -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=5fFJeAModCLEqEV2Mtod71pqLeAWsDoJdo+b7V5jkCo=; b=j1GJ4COQop1SQxv9FLdiheau+7RgdLAVrp2l86J21oys52HX/mOpKm8MAUb2rNNtEE zaGXZSoyBMN8mQpkVgMFvB7zqIMaGBg0YDdoQ31JKjIPjskqX5ilcnnCkKZxXTwl4PaU /4jm5WYCiGI2WIluWXSjnip3Lbp3MmREg1hod90sRtZ8PWnrNntVUM69rFerHBjByZzX VqWSTly5gvrMXEtuS9y7ODf8DpALwTy47evEPUs/vmA7BneH4xiaC9+peB3yngqZP4zp dr3kWDdSudmbk/7iKrpVsZScLTe2EhBP/eaG+7Y0CHRm70c446GBBUFrrCyG2JnCN46f lujA== 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=5fFJeAModCLEqEV2Mtod71pqLeAWsDoJdo+b7V5jkCo=; b=lanN9aji1ENreFWpjxwQQkYGxQdEHroZoosG+F3YGNKG5zHv5Ih6nBuLtePs7CNbeu P+Dzx82/38iSph+SDVfPPdy2BnQl30RhArolNh2mWvGC9uiKXQCIlIEsfbPB+rDUXoqc HOeSHngw7O9HS7S1w8ZGFJwFFHT0+1/yqqSBQVBgzotWb0rGORXgNgYOH1sK2yaoynI2 yUsuKzCCDzCxgK2JCFmuD8KYr7iuWIHSAd8sbglCr4XPrwNA7ap67+5cNNlJwCwbp9Wk n2jIHJWRPGJfjKmuTcZKfcwYrJ+AwrOWly+Gvw39IkFTqEqRnnMXRCYHvdwIDIce/Ci/ rbYg== X-Gm-Message-State: AHQUAuZkQwA6sifu8sP7PCS0TvFFLv8bepoBX5qs0GuwC32WHN0yzbow QiizcxK8VXgVIhs8paVTuPotAfgV X-Google-Smtp-Source: AHgI3IboTtUfrnPUNk3o+bDzAiLOwqDVQk24UyfEO6o07f9eHt2FDiKe6DR3ydSb6kOHwtqDg9NQaw== X-Received: by 2002:a05:600c:2210:: with SMTP id z16mr6165766wml.57.1550958506047; Sat, 23 Feb 2019 13:48:26 -0800 (PST) Received: from ?IPv6:2003:ea:8bf1:e200:d142:223a:ac4f:6f77? (p200300EA8BF1E200D142223AAC4F6F77.dip0.t-ipconnect.de. [2003:ea:8bf1:e200:d142:223a:ac4f:6f77]) by smtp.googlemail.com with ESMTPSA id y13sm3902282wrw.31.2019.02.23.13.48.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 23 Feb 2019 13:48:25 -0800 (PST) Subject: Re: No traffic with Marvell switch and latest linux-next To: Andrew Lunn Cc: Russell King - ARM Linux admin , Florian Fainelli , "netdev@vger.kernel.org" References: <0907f213-df83-4bb8-8fad-21b1dedaeca5@gmail.com> <20190217154026.tykxexcndx7l5urk@shell.armlinux.org.uk> <291e7622-4402-e58f-503c-ffc7c6b2f055@gmail.com> <20190217165730.GF5968@lunn.ch> <20190217171027.GH5968@lunn.ch> <33f9ef8d-df62-e154-f880-f886abf54e0a@gmail.com> <20190218182136.GE14879@lunn.ch> From: Heiner Kallweit Message-ID: <188fcef7-81fe-cffc-af71-1f37725b8611@gmail.com> Date: Sat, 23 Feb 2019 22:48:19 +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: <20190218182136.GE14879@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 18.02.2019 19:21, Andrew Lunn wrote: >>> Hi Heiner >>> >>> Watch out for boot vs reboot, and when rebooting if port 8 had link or >>> not before you reboot. >>> >> Will do. Is there some known issue or bug? > > Hi Heiner > > No, but it is a variable which can make a difference. The fix i made > for the Freescale GPIO controller was not an issue for cold boot, but > reboot with link up did cause interrupt problems, etc. > Hi Andrew, it took me quite some time to debug this issue .. At first a bisect pointed to one of my commits: 5502b218e001 ("net: phy: use phy_resolve_aneg_linkmode in genphy_read_status") Further digging lead me to some suspicious dsa code: In dsa_port_fixed_link_register_of() there's a call to genphy_read_status(). At the time of the call phydev->advertising is empty, therefore the fixed phy settings are overwritten with defaults (10/half) what breaks the system. Worth to be mentioned is that for the PHY these two flags are set: - is_pseudo_fixed_link (that's ok) - autoneg -> I'm not sure this is correct. It seems that you once added the code in question: 39b0c705195e ("net: dsa: Allow configuration of CPU & DSA port speeds/duplex") I did what I like to do most and removed some code. W/o the calls to genphy_config_init() and genphy_read_status() it works again. Do these calls have some purpose here with a fixed link? My commit exposed the issue because before it genphy_read_status() read the advertisement from chip registers instead of using phydev->advertising. Very close to this function is dsa_port_setup_phy_of() which uses genphy_resume() and genphy_read_status() and also looks somewhat suspicious. This code makes quite some assumptions: - PHY is a C22 PHY - PHY is compatible with the generic PHY driver > Andrew > Heiner