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=-3.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,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 AA757C43381 for ; Mon, 25 Mar 2019 19:13:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7001920854 for ; Mon, 25 Mar 2019 19:13:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IrElqVvS" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729994AbfCYTNl (ORCPT ); Mon, 25 Mar 2019 15:13:41 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:54784 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729473AbfCYTNl (ORCPT ); Mon, 25 Mar 2019 15:13:41 -0400 Received: by mail-wm1-f65.google.com with SMTP id f3so10200030wmj.4 for ; Mon, 25 Mar 2019 12:13:39 -0700 (PDT) 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=kTWTZUHTVOveeJg88amGwf3sBBwpGqPWz5Dq2toKISs=; b=IrElqVvSMo63zMHelFfb+s4ZbrKR2bV/Tig/VUquIJR8/dUhixLRFKHouX/SY+3c6j XOwJuWeTaHbHqHjKpf03NOlLBNecijFTWGnBsdkVNCvQVnlnMWT06H7SU7GsUlQ3g3iU xAohRsR2FiTup3OsyU1bdTVWi5QoJC86VFFajDRcOhKxnRiNmWqqzwIJPzu5D/5ZaDhr /NA3Yg7W8TgUrvftWGIVwvz3o3Ya+PUlMii0zUzXB4c0l9PHDGYwGK7SQ4DbuVetU8as oBxkWmr43856TPs1xhsNb9vHSFnBbQrGtSaxVcBqErXZYAPMcpeSqG3L5wF7f/0dqJBj I/dQ== 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=kTWTZUHTVOveeJg88amGwf3sBBwpGqPWz5Dq2toKISs=; b=oJE5dttZZn8Yi/yDEar+AUoyyK3xaiy+34h7uqcOIzj0STmbBjPEP+TRxWW8T4xD2Y +btG87mwSxJIMnolgb47FP1G0j/28Cio/Zo53zHS+aoiRU3mB9fUfgsgfsmwFhWGNhA+ AS6XEnrYvoaYq2v1IP1rZLU/ewWYryF1oNIh0jYxxCr2pf9NW99SpmUpdUsrgPLiro+h 8id9FJ3+aAKjPCALOGQxSR5RkGwqlCsaglzho43andoLU75gJx5aqP9PWQpZ4JQUnxjB FnFlHKu+s3DJM6E7RBcaF8UhUQ7CAKl0grslOxkUPTHcnbrAH6koNab2TSMv+MyNlEeJ CEyQ== X-Gm-Message-State: APjAAAV67BSxDmCBr+uOhaa073c/gyGc9jOwTAouIpwDnH/iu28K7uPO nMR1GW4p2HdVbz/AhLwQXaMzum4c X-Google-Smtp-Source: APXvYqwmbh6gLuqpHOFUsSnKzB15vj71365rc8nMNcKgj3qkuwlUeMJ9YMYJTyTWtivAKtLh/l5qww== X-Received: by 2002:a1c:4d:: with SMTP id 74mr6238754wma.129.1553541218635; Mon, 25 Mar 2019 12:13:38 -0700 (PDT) Received: from ?IPv6:2003:ea:8bc4:dc00:79ce:2608:a3c3:1d6b? (p200300EA8BC4DC0079CE2608A3C31D6B.dip0.t-ipconnect.de. [2003:ea:8bc4:dc00:79ce:2608:a3c3:1d6b]) by smtp.googlemail.com with ESMTPSA id t2sm37230577wra.9.2019.03.25.12.13.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Mar 2019 12:13:37 -0700 (PDT) Subject: Re: [PATCH net-next v2 2/2] net: phy: marvell: add PHY tunable fast link down support for 88E1540 To: Florian Fainelli , Andrew Lunn , David Miller , "John W. Linville" Cc: "netdev@vger.kernel.org" References: <92de6860-c59e-d998-7f6e-5807bf291d84@gmail.com> From: Heiner Kallweit Message-ID: <69f940d6-062c-c463-b7b7-03bee8d81b7c@gmail.com> Date: Mon, 25 Mar 2019 20:13:30 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.0 MIME-Version: 1.0 In-Reply-To: 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 25.03.2019 19:44, Florian Fainelli wrote: > On 3/25/19 11:35 AM, Heiner Kallweit wrote: >> 1000BaseT standard requires that a link is reported as down earliest >> after 750ms. Several use case however require a much faster detecion >> of a broken link. Fast Link Down supports this by intentionally >> violating a the standard. This patch exposes the Fast Link Down >> feature of 88E1540 and 88E6390. These PHY's can be found as internal >> PHY's in several switches: 88E6352, 88E6240, 88E6176, 88E6172, >> and 88E6390(X). Fast Link Down and EEE are mutually exclusive. >> >> Signed-off-by: Heiner Kallweit > > This looks fine, just one question though: do not you need to verify > that the phy_interface_t maps to a copper medium somehow? > Good question. The register we configure is used in copper mode only (see name: COPPER_CTRL3). So we don't cause any harm at least if we configure Fast Link Down when being, let's say, in a fiber mode. Fast Link Down is applicable for 1000BaseT only, so in theory what you say would apply also to an attempt to configure Fast Link Down when being in 100BaseT or 10GBaseT copper modes. Being allowed to configure a feature for 1000BaseT whilst being in a different mode can been seen as a feature (what I do) or as a bug. Most likely there is no 100% answer to this question.