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=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 845C5C43381 for ; Mon, 18 Mar 2019 12:12:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3E52D20857 for ; Mon, 18 Mar 2019 12:12:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="c+FuwPbs" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727545AbfCRMLW (ORCPT ); Mon, 18 Mar 2019 08:11:22 -0400 Received: from mail-eopbgr40073.outbound.protection.outlook.com ([40.107.4.73]:60487 "EHLO EUR03-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726730AbfCRMLV (ORCPT ); Mon, 18 Mar 2019 08:11:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1sXRxjpBl45w6PCE+nFIsmFEih2uHadhtD3YBW1Isw4=; b=c+FuwPbscB2kLmalPemqtWJ7nSiviCzTtEZAw+4ZpjFVSJjgb8XKOHz170BcTgkOvkpPShK5W68VtT/rEmo8922LAxJ6otLuGff+ReNpH84qHWwVqF/0yEXNPlhl5pgAQ0JgtQ7FWxEOh3jxg6uU1rdJBbIVlLIXLtutHzVKyPM= Received: from AM6PR05MB6133.eurprd05.prod.outlook.com (20.179.3.144) by AM6PR05MB6599.eurprd05.prod.outlook.com (20.179.2.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.13; Mon, 18 Mar 2019 12:11:18 +0000 Received: from AM6PR05MB6133.eurprd05.prod.outlook.com ([fe80::8c6:b0f3:d983:2fea]) by AM6PR05MB6133.eurprd05.prod.outlook.com ([fe80::8c6:b0f3:d983:2fea%2]) with mapi id 15.20.1709.015; Mon, 18 Mar 2019 12:11:17 +0000 From: Petr Machata To: Andrew Lunn CC: "netdev@vger.kernel.org" , Jiri Pirko , Ido Schimmel , "davem@davemloft.net" , Tariq Toukan , "jakub.kicinski@netronome.com" , "stephen@networkplumber.org" Subject: Re: [RFC PATCH net-next 0/3] RTNL: Add link-down reason reporting Thread-Topic: [RFC PATCH net-next 0/3] RTNL: Add link-down reason reporting Thread-Index: AQHU21hcWgMiHXK9AUSlhr7FhLV8baYNgwmAgAPNngA= Date: Mon, 18 Mar 2019 12:11:17 +0000 Message-ID: <874l80idr5.fsf@mellanox.com> References: <20190316020627.GB29548@lunn.ch> In-Reply-To: <20190316020627.GB29548@lunn.ch> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM6P193CA0099.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:88::40) To AM6PR05MB6133.eurprd05.prod.outlook.com (2603:10a6:20b:af::16) authentication-results: spf=none (sender IP is ) smtp.mailfrom=petrm@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [78.45.160.211] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 64ad98cd-344f-469b-38e3-08d6ab9ad325 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020);SRVR:AM6PR05MB6599; x-ms-traffictypediagnostic: AM6PR05MB6599: x-microsoft-antispam-prvs: x-forefront-prvs: 098076C36C x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(396003)(39860400002)(136003)(376002)(346002)(199004)(189003)(66066001)(486006)(4326008)(6116002)(3846002)(105586002)(106356001)(36756003)(71190400001)(71200400001)(4744005)(5660300002)(6512007)(6916009)(25786009)(53936002)(97736004)(6506007)(386003)(478600001)(6486002)(26005)(6246003)(6436002)(52116002)(102836004)(68736007)(14454004)(86362001)(76176011)(81166006)(99286004)(81156014)(305945005)(8676002)(7736002)(256004)(446003)(11346002)(2616005)(476003)(316002)(54906003)(229853002)(186003)(8936002)(2906002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM6PR05MB6599;H:AM6PR05MB6133.eurprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: haZpqAPwTzG0xswyF3tpF5fyTt3L/jsv1PIyGU4OpQ701LRdrkKOLxpesELNpGCUGlsz8bjGcFoTaIOYCpT+VlZHzcgeU/d+mozdW7uKXcCRoHCUCvrxHolbAaQkBS8XFyv+1iKPSjdkch2l23Q+CN9ZkDWk7GoIQ/XCvfKpSKd2s42Ga0SYmuGLbNbjDOj14doHANI5I+cUt3CNL77irPfNRhLrtpmi9Zy1yQH76hm5jS26TN3SPa1+HMnIxoyacZi2O3pjCUA52Fr89FWMSLeHufFto2MFg6R3gVEBaERVkgqFxmy8n3wjjnI2H4jTspXvBY4j7Zl4E12JeCxg1jHT5+lCekm9nytNudBXqeNkvUsjl1lJ5CxqDg9MGIwxkCbp9SMQWgJ/GQ2XlofSHxliosH5iRrKDQOxPDYYAAw= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 64ad98cd-344f-469b-38e3-08d6ab9ad325 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Mar 2019 12:11:17.8861 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB6599 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Andrew Lunn writes: >> The party with visibility into details of this process is the driver. > > In the general case, i would disagree with this. It is the PHY layer > which knows about these things. phylib and phylink. The MAC driver has > no idea, it just sees that the carrier is off. > > There are however some drivers which do PHYs without using the Linux > core code. But there are not so many of them. I would hope this code > is designed for the general case, and can also be used by those that > ignore the core code. > > Please could you explain how you see this being linked to phylib and > phylink, without having to modify every MAC driver. I'll take a look at how to make this work with the phy drivers. Thanks, Petr