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.9 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 185B2C43381 for ; Sun, 24 Feb 2019 15:39:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DAA77206B6 for ; Sun, 24 Feb 2019 15:39:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HkFFUEed" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728497AbfBXPjj (ORCPT ); Sun, 24 Feb 2019 10:39:39 -0500 Received: from mail-wr1-f51.google.com ([209.85.221.51]:39887 "EHLO mail-wr1-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727752AbfBXPjj (ORCPT ); Sun, 24 Feb 2019 10:39:39 -0500 Received: by mail-wr1-f51.google.com with SMTP id l5so7233101wrw.6 for ; Sun, 24 Feb 2019 07:39:38 -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=jvk36xqpr2BS/uE8gT3J1/aacbQi3x9Mckr96Vo29Mg=; b=HkFFUEedwjJcwCxHkGHbV49B/CdRtOxQMVZsSopTR+WACDLWyQjBdM5naSQIyZuErf G1JjOg/1coFufEgQdr8Q2ndhKDRt5CH7EjAC1qeEztMl6wnnzjmZxxtMsbV8yeA6yibi P/cSyX+AyFz6XcTCQOgYMZMhfy48z3+OmXcCuNVDuVSIFtEgbPBKaA+WWYPvKzPtbE7w v1hzERc9LSaYs+2gmgNTWCWGCiHCQhNzws6CgWOpyC53P4zs9QhmNp1bWnUSSc+aOrb1 JYhnXXDRQFJ031qgCP9VMYHnf2W12BcMtcIftpcmiNSsLd1jK6+ord0/JR+ndvPqTiq3 whtA== 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=jvk36xqpr2BS/uE8gT3J1/aacbQi3x9Mckr96Vo29Mg=; b=ulHml6QwYbzoA+6ZVSTwQ9OwWMZv3w/7EbOjZlODgrwPNrbTpghSexKfVAb3v/O0oN URMzAI+7y1ywljyKWDg6PnTUjOeliJjF40HaLCvwiE9932SsTddI4obZd8cXrUm4uFEN Jzi8MAg9PHUdDgwiAwxBnXL21cKGGGDIhmnbLFLcHbTcK/gu3/RPmZPuGL2X7Gvh8o7k m2UOw5TnrEogNwcXozTwcLlEulrd9PoXwhfeDl04wDf78y0h6R3R91Ou7fSXzVp6wmgZ HwUU/WQvHHqUJ0rtaxaK0py75IppZ3VNupkPqWuvdpdZv6j8/lJtabY3y3Owb5S7pJHh vYng== X-Gm-Message-State: AHQUAubst/fQt8EEifgXYVYQp0VNq/7kvkJt+d9TpzEfeS5Ye60zj0yJ fcICdUXRxsxrTEHO6S2uSSrhwt/f X-Google-Smtp-Source: AHgI3IbWL7/i5og4XwzDxC41FjMcWJDfNR9s+t+FHKYIUxPLSunjZGRC9RHK5t06uDFGDU53E6LhTA== X-Received: by 2002:a5d:550f:: with SMTP id b15mr10174417wrv.251.1551022777161; Sun, 24 Feb 2019 07:39:37 -0800 (PST) Received: from ?IPv6:2003:ea:8bf1:e200:1133:81d:72d3:c59f? (p200300EA8BF1E2001133081D72D3C59F.dip0.t-ipconnect.de. [2003:ea:8bf1:e200:1133:81d:72d3:c59f]) by smtp.googlemail.com with ESMTPSA id o8sm6640185wma.1.2019.02.24.07.39.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Feb 2019 07:39:36 -0800 (PST) Subject: Re: No traffic with Marvell switch and latest linux-next To: Russell King - ARM Linux admin Cc: Andrew Lunn , Florian Fainelli , "netdev@vger.kernel.org" References: <20190217171027.GH5968@lunn.ch> <33f9ef8d-df62-e154-f880-f886abf54e0a@gmail.com> <20190218182136.GE14879@lunn.ch> <188fcef7-81fe-cffc-af71-1f37725b8611@gmail.com> <20190223234235.GA26626@lunn.ch> <6dd3f82a-eea0-c9b4-8dd6-f2f313578b1f@gmail.com> <20190224150403.GF26626@lunn.ch> <20190224151555.xsopwkuicsop65rw@shell.armlinux.org.uk> <403607a0-16d8-15b6-f0aa-b8b13793d401@gmail.com> <20190224153449.gg3c3fyryztdj3vm@shell.armlinux.org.uk> From: Heiner Kallweit Message-ID: Date: Sun, 24 Feb 2019 16:39:30 +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: <20190224153449.gg3c3fyryztdj3vm@shell.armlinux.org.uk> 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 24.02.2019 16:34, Russell King - ARM Linux admin wrote: > On Sun, Feb 24, 2019 at 04:28:32PM +0100, Heiner Kallweit wrote: >> On 24.02.2019 16:15, Russell King - ARM Linux admin wrote: >>> On Sun, Feb 24, 2019 at 04:04:03PM +0100, Andrew Lunn wrote: >>>>> I think what's not correct is that phydev->autoneg is set >>>>> (by phy_device_create) for a fixed link. >>>> >>>> Fixed-link tries to emulate auto-neg: >>>> >>>> bmsr |= BMSR_LSTATUS | BMSR_ANEGCOMPLETE; >>>> >>>> Maybe it needs better emulation of auto-neg? >>> >>> Or maybe it needs to represent a fixed-speed PHY by clearing bit 1.3 >>> (BMSR_ANEGCAPABLE). In any case, 0.12 (BMCR_ANENABLE) is not set, >>> so according to 802.3-2015, we should not be setting 1.5 >>> (BMSR_ANEGCOMPLETE). >>> >>> However, swphy does try to emulate autonegotiation - we do have cases >>> where swphy is used in situations where the speed and duplex are not >>> fixed. It returns an emulated link partner advertisement for the >>> current speed, which would suggest that we should set BMCR_ANENABLE. >>> >> If we emulate auto-neg, then it's not needed to set the speed bits >> in BMCR. Also what just comes to my mind, certain speeds like 1000BaseT >> don't support forced mode. So we may have to go with auto-neg. > > Sure. > >> To avoid the original issue it should be sufficient to copy >> supported -> advertising at a suited place. > Sorry, seems this wasn't clear enough. I don't mean to change swphy but the user side. > Why bother - the software PHY emulation is an emulation to allow > existing userspace that pre-dates the ethtool API to get some link > parameters. If we augment the PHY emulation in non-standard ways, > userspace will need to be updated to handle those non-standard > ways. If userspace needs to be updated, why not just bite the > bullet and update to ethtool APIs rather than adding more > complication through an emulation layer? > It's not only userspace. Based on my limited knowledge of DSA this code also uses e.g. genphy_read_status() with a fixed link.