Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp756004iog; Mon, 13 Jun 2022 12:14:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKrCxgTSKxoAE/27jQX6u+yHIK3MMB9pLJ1JiFq2jZHJWEZNCIxHZp8hD8zUUS9CjH/LN9 X-Received: by 2002:a17:903:244b:b0:167:74f3:74aa with SMTP id l11-20020a170903244b00b0016774f374aamr566986pls.67.1655147640409; Mon, 13 Jun 2022 12:14:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655147640; cv=none; d=google.com; s=arc-20160816; b=MhPoYPaJ1/x3U0HtdfxGP5UfxWR7WiHzTKRXsCsK4QETrc0AsJESwZIvdEeHsrC/8I OCnM/XlbYRtPLiUaPozVroffyrhcUPrDpqZOfXodciSs3pycXXEpSt2RwiFwKN90QIAK JsGz/lHKT9JTDPdEDso/TcnoiBngOBqFLhW4Q92qIbo9bni5R2yiFPRLF6L53c28VSy9 9xXukinScWjNHR3Yzv5oz4zqxltsG6yDHakOFpHJFYUNggEX3XXAS6YISG9fyoqUKBH5 Jg8TXm2tK02/KPHzAhbeMvjmyjpiUab4mUaEVGX58/MPmR6RvxzKmUn7nhuRmpuXeb6q Fcpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=kgaOivgVuvl4d3T7CdI1Azd7OrRQH+RXo0cFw9RJT0A=; b=uCxSumwZCljqLz1eTXefxwYANqx3rE/nFzf5lXA0Q7irFJTRsGpi2wJ0v6lz1DXtQC u+mELgv4MCA9OcfCKMUZeW3dNHdZcsZM8q518jxjrOtUEaVkk7Pn8pwL04uHSS+LFNmn u8I1Kht2vy6tqOGrGyXadRb3kdwjf9jHnofZO32VFDQ05zpaujADlxaxhSglqbzxTceW aeE+LrNHZniJ2NhdnvjiZ4E/Wq8EwE6ZHkZaeayA+WVoqLlpw0TAQxyM2Z2MGsruFjno Jxg9IzHI+1b3zHoCM7og80axYqnIRnFzgJr8zOiVDcIQnA0Ol/bXGRnh5IEeZHt23LDS /fmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=vTPQmgu4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kb4-20020a17090ae7c400b001e6820f720esi15534212pjb.125.2022.06.13.12.13.48; Mon, 13 Jun 2022 12:14:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=vTPQmgu4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229910AbiFMShS (ORCPT + 99 others); Mon, 13 Jun 2022 14:37:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245712AbiFMShC (ORCPT ); Mon, 13 Jun 2022 14:37:02 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7695D2452; Mon, 13 Jun 2022 07:56:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=kgaOivgVuvl4d3T7CdI1Azd7OrRQH+RXo0cFw9RJT0A=; b=vTPQmgu4pXETpWR2FDU/YUpQJ/ yWyuh6FtLojBT7/urS3VWhyK0anC/w0ol6jnZKvZTUTF144Ff5aBbZAPEibZNQGKwIv+QfmlQkcHg mMI2vk8fqokyNWjX4Ofc8+PMPtGEPAI5RLTJHHsDa05vUNdcxr7sdY5GZHF5YI8dmNag=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1o0lUb-006kmW-Sz; Mon, 13 Jun 2022 16:56:37 +0200 Date: Mon, 13 Jun 2022 16:56:37 +0200 From: Andrew Lunn To: Oleksij Rempel Cc: Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Michal Kubecek , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH net-next v1 1/1] net: phy: add remote fault support Message-ID: References: <20220608093403.3999446-1-o.rempel@pengutronix.de> <20220613125552.GA4536@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220613125552.GA4536@pengutronix.de> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 > If I see it correctly, there is no way to notify about remote fault when > the link is up. The remote fault bit is transferred withing Link Code > Word as part of FLP burst. At least in this part of specification. Thanks for looking at the specification. So ksetting does seem like the right API. Sorry, i won't have time to look at the specification until tomorrow. The next question is, is it a separate value, or as more link mode bits? Or a mixture of both? Is there a capability bit somewhere to indicate this PHY can advertise a remote fault? That would suggest we want a ETHTOOL_LINK_MODE_REMOTE_FAULT_BIT, which we can set in supported and maybe see in lpa? Set it in advertising when indicating a fault. The actual fault value could then be in a separate value which gets written to the extended page? Does 802.3 allow a remote fault to be indicated but without the reason? > So receiving remote fault information via linkstate and send remote fault via > ksetting? We could also just broadcast the results of a ksetting get to userspace? I don't have easy access to a machine at the moment. What does ip monitor all show when a link is configured up, but autoneg fails? And when autoneg is successful but indicates a remote fault? Are there any existing messages sent to userspace? > The next logical question is, if a remote fault is RX'ed (potentially with a > reason) who will react on this. There might be different policies on how to > react on same reason. Policy goes in userspace, is the general rule. The only exception might be, if we decide to make use of one of these to silence the link to allow cabling testing. We probably want the kernel to try to do that. Andrew