Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp1193949lqb; Thu, 30 May 2024 03:14:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUUEdR1Q7RFBGW1bgSmyFN5C/QOQivjo0hZPxUlvkAuNppjm3IMXSa0ozcGTyLHBlFSSLM/EckcqYzj1yIYqkwD6zQK9DgQAbYP3x/V7A== X-Google-Smtp-Source: AGHT+IGPaL2l/BMOhdfEH2PyGKa4CmeDQq14a5T8nmw8EVdIjo1K8t3P9DwxJ04V6Ci9LgDmkUJd X-Received: by 2002:ac2:53a7:0:b0:52b:7c78:4efb with SMTP id 2adb3069b0e04-52b7d436ffemr1134041e87.40.1717064052429; Thu, 30 May 2024 03:14:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717064052; cv=pass; d=google.com; s=arc-20160816; b=XfUhnWIy7T5aaHzAUqdeZJCQxTWgJs3SaVt31p+GHjCeTfPZh4Sla61EySCZKYEmba wW8/s6SbEPR6zliq9jTKHtne0agcTFlhUChO8JyZ68q/KhXS41YBwltv5/E2pDXKQZt4 4+zvRTmsW/rM4KScSdUGDtDlYNmHULBiRa3ykOYIwgxsaTYE5kir6lPXL1MFcmUDu3+v v2lnIVEn8xxbVgnmGaoooJgKE7qmyY9C0glJAfAxCINVykDHnTWAdL+YbkmQgg3yOKSW VRI0AH7BSNSc/0QRfeMo7fdJMgXLhmt8P2/JSPpDeu3VP9R/3rOgLOFLqHbptbUTljUM XxvA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=41J3Z/IVE6I1IoeSyMALA6C7Rmp54Bxc3Fb73rwPDsQ=; fh=9otojc+57+M9Vyr8etd/eKstBsocO7uSsrunmj+aq8Q=; b=iM9lQ9tUWeAJZ4ZOlFqf3ZVK4JUsL2uYXZJ39qqhpr9Nfdgx3F7uSOoxcP2BcMj7Ia NPcE+xsgi9uH/vqWFxdYMZdI4Pa5TXNze4dG/WZOMi/d1KUQ8Yp0g/VIhH7OXZSkg8Eg uPgmTOdHmHtWpcwf5+8uQnl2zLI1S/Q2etS+uI2eNUkphZvjxip1Q37Y6AwhuP4XtXwI dkmf4qQefEIMHrDzYCcfv/ib5eHZvT35yB2hxSByjJu+qKFxqago9aoNEq1SrwoM3HZ9 MCvWLZYnBNaBe1pAotzJyF0lcnYrwNNMyeha2mHKunuRh8M2ICXom06wN2oZVm20vHzM mv/g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-195237-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195237-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a637e9d4addsi213793466b.550.2024.05.30.03.14.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 03:14:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195237-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-195237-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195237-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 2760C1F239E5 for ; Thu, 30 May 2024 10:14:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 31372176AB7; Thu, 30 May 2024 10:14:04 +0000 (UTC) Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 90C466F2F1 for ; Thu, 30 May 2024 10:14:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717064043; cv=none; b=r+w6cTT7Nt+sFIY56+mIJMLGUZom8PAiT3pzlvyPm8e6BKTs+gssjkbTi6df/u1uVCgsMBDwJ5WlHzqAjT8zxsHsoEe/JiKNi2jDGqvpYPD14enABZKXjW4x9DN+Iwe5O936Dt2KxW3EsNGmLF73BSJjhoH2Hg3DpVriWimwHXQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717064043; c=relaxed/simple; bh=n62SWmX8IMb2fkF1l+lS53qxQkKvTK7doJvh+owS99Q=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lpJYGbw3cwToiCurVxbJPsfWbV2Xuf3Iwq1LCxVr6NjIeaHqzWwgHelSTyIkhSjeiAiUGZh3aqBWDGC5UYbEtDvx6u4jvfnkJH6QgKjeq/84+ksUI4ECMJjzg9x/c8fHHCYkn2OfAfBG6598ZsigDv5jQmNPdCJtusAlL+4bDps= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sCcn8-0005Uf-EP; Thu, 30 May 2024 12:13:50 +0200 Received: from [2a0a:edc0:2:b01:1d::c5] (helo=pty.whiteo.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sCcn6-003aAS-Fz; Thu, 30 May 2024 12:13:48 +0200 Received: from ore by pty.whiteo.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1sCcn6-0004y6-1E; Thu, 30 May 2024 12:13:48 +0200 Date: Thu, 30 May 2024 12:13:48 +0200 From: Oleksij Rempel To: Kory Maincent Cc: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Donald Hunter , Thomas Petazzoni , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Dent Project , kernel@pengutronix.de Subject: Re: [PATCH 4/8] net: pse-pd: pd692x0: Expand ethtool status message Message-ID: References: <20240529-feature_poe_power_cap-v1-0-0c4b1d5953b8@bootlin.com> <20240529-feature_poe_power_cap-v1-4-0c4b1d5953b8@bootlin.com> <20240530113341.36865f09@kmaincent-XPS-13-7390> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20240530113341.36865f09@kmaincent-XPS-13-7390> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Hi, On Thu, May 30, 2024 at 11:33:41AM +0200, Kory Maincent wrote: > Thanks for the review! > > On Thu, 30 May 2024 01:13:59 +0200 > Andrew Lunn wrote: > > > > +static const struct pd692x0_status_msg pd692x0_status_msg_list[] = { > > > + {.id = 0x06, .msg = "Port is off: Main supply voltage is high."}, > > > + {.id = 0x07, .msg = "Port is off: Main supply voltage is low."}, > > > + {.id = 0x08, .msg = "Port is off: Disable all ports pin is > > > active."}, > > > + {.id = 0x0C, .msg = "Port is off: Non-existing port number."}, > > > + {.id = 0x11, .msg = "Port is yet undefined."}, > > > + {.id = 0x12, .msg = "Port is off: Internal hardware fault."}, > > > + {.id = 0x1A, .msg = "Port is off: User setting."}, > > > + {.id = 0x1B, .msg = "Port is off: Detection is in process."}, > > > + {.id = 0x1C, .msg = "Port is off: Non-802.3AF/AT powered device."}, > > > + {.id = 0x1E, .msg = "Port is off: Underload state."}, > > > + {.id = 0x1F, .msg = "Port is off: Overload state."}, > > > + {.id = 0x20, .msg = "Port is off: Power budget exceeded."}, > > > + {.id = 0x21, .msg = "Port is off: Internal hardware routing > > > error."}, > > > + {.id = 0x22, .msg = "Port is off: Configuration change."}, > > > + {.id = 0x24, .msg = "Port is off: Voltage injection into the > > > port."}, > > > + {.id = 0x25, .msg = "Port is off: Improper Capacitor Detection"}, > > > + {.id = 0x26, .msg = "Port is off: Discharged load."}, > > > > I don't know of any other driver returning strings like this. Have you > > seen any other PSE driver with anything similar? > > We would like to be able to return the failure reason but there is nothing > generic in the IEEE 802.3 standard to be able to add it to the UAPI. > The TI controller has SUPPLY and FAULT EVENT Register which could report few > messages. I am not aware of other PoE controller and how they deal with it. > We could add sysfs for reporting the status messages for all the ports but I > don't think it is a better idea. We have ETHTOOL_LINK_EXT_STATE* and THTOOL_LINK_EXT_SUBSTATE_ for different kind of link fail diagnostic. I think it would be good to make the same for PSE ports. Not all of them will overlap with other PSE controllers, but we will have one unified diagnostic interface. It will be easier for user space application to parse and react on it. -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |