From patchwork Tue Oct 19 20:53:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eddie James X-Patchwork-Id: 1543602 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=nDW6OHne; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=linux-fsi-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HYmDJ1lMWz9sPf for ; Wed, 20 Oct 2021 07:53:20 +1100 (AEDT) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4HYmDH4vWPz307L for ; Wed, 20 Oct 2021 07:53:19 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=nDW6OHne; dkim-atps=neutral X-Original-To: linux-fsi@lists.ozlabs.org Delivered-To: linux-fsi@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=eajames@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=nDW6OHne; dkim-atps=neutral Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4HYmDB354mz2ymg for ; Wed, 20 Oct 2021 07:53:13 +1100 (AEDT) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19JKqYta010227; Tue, 19 Oct 2021 16:53:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=bWSLdJokj3Lbnm7HvXDpghITkmfYosOMdEXedxpqtzI=; b=nDW6OHne8hEetonI9eRDw9MJHXBWm9buXJS5KUYRBiscsPUlXF/1H5qjuDkmEa/M7s3S noaNMRoDIvhkkF0mw6M7q/oxuj0Ves91riYtdS9JFX1J1poJcciOQQYGHs7+v8nxiln4 TsBCgmF7mnwSJOfAI8RCkYYLkEbI2Zew8XOtzjMlrLqvtK7adrAtY3LNHvQptIfVmlQo OtbiMrtruJOm5Gg5b+GS6ekpcPwRchAhxFIpTtGOIHuK5B5rCvHOIHZY/ADrpTeIK+Bc WC6BQBhv3XYfE6TwvmYbUZBYAnDMForYJ6WX39YypvnYr43M5EkNdPzqrzr/pCpn9mRE lw== Received: from ppma03wdc.us.ibm.com (ba.79.3fa9.ip4.static.sl-reverse.com [169.63.121.186]) by mx0a-001b2d01.pphosted.com with ESMTP id 3bt5ek00da-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 Oct 2021 16:53:10 -0400 Received: from pps.filterd (ppma03wdc.us.ibm.com [127.0.0.1]) by ppma03wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 19JKq1FI031910; Tue, 19 Oct 2021 20:53:09 GMT Received: from b01cxnp23032.gho.pok.ibm.com (b01cxnp23032.gho.pok.ibm.com [9.57.198.27]) by ppma03wdc.us.ibm.com with ESMTP id 3bt4srs1d9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 Oct 2021 20:53:09 +0000 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 19JKr8ST52560214 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Oct 2021 20:53:08 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6E8F0124055; Tue, 19 Oct 2021 20:53:08 +0000 (GMT) Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9C6E3124058; Tue, 19 Oct 2021 20:53:07 +0000 (GMT) Received: from v0005c16.aus.stglabs.ibm.com (unknown [9.211.36.93]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 19 Oct 2021 20:53:07 +0000 (GMT) From: Eddie James To: linux-fsi@lists.ozlabs.org Subject: [PATCH v4 0/4] occ: fsi and hwmon: Extract and provide the SBEFIFO FFDC Date: Tue, 19 Oct 2021 15:53:03 -0500 Message-Id: <20211019205307.36946-1-eajames@linux.ibm.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: sQzvMspzv4QAgSPwezngz6BHdGZXZyA4 X-Proofpoint-ORIG-GUID: sQzvMspzv4QAgSPwezngz6BHdGZXZyA4 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-19_02,2021-10-19_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 bulkscore=0 phishscore=0 malwarescore=0 mlxlogscore=721 adultscore=0 lowpriorityscore=0 clxscore=1015 spamscore=0 suspectscore=0 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110190118 X-BeenThere: linux-fsi@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-hwmon@vger.kernel.org, jdelvare@suse.com, linux-kernel@vger.kernel.org Errors-To: linux-fsi-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "linux-fsi" Currently, users have no way to obtain the FFDC (First Failure Data Capture) provided by the SBEFIFO when an operation fails. To remedy this, add code in the FSI OCC driver to store this FFDC in the user's response buffer and set the response length accordingly. On the hwmon side, there is a need at the application level to perform side-band operations in response to SBE errors. Therefore, add a new binary sysfs file that provides the FFDC (or lack thereof) when there is an SBEFIFO error. Now applications can take action when an SBE error is detected. Changes since v3: - Rebase - Add a check for valid FFDC length - Add comments about SBE words being four bytes Changes since v2: - Add documentation Changes since v1: - Remove the magic value that indicated an SBE/SBEFIFO error with no FFDC. - Remove binary sysfs state management and intead just clear the error flag when the whole FFDC has been read. Eddie James (4): fsi: occ: Use a large buffer for responses fsi: occ: Store the SBEFIFO FFDC in the user response buffer docs: ABI: testing: Document the OCC hwmon FFDC binary interface hwmon: (occ) Provide the SBEFIFO FFDC in binary sysfs .../sysfs-bus-platform-devices-occ-hwmon | 13 ++ drivers/fsi/fsi-occ.c | 164 +++++++++--------- drivers/hwmon/occ/p9_sbe.c | 86 ++++++++- include/linux/fsi-occ.h | 2 + 4 files changed, 186 insertions(+), 79 deletions(-) create mode 100644 Documentation/ABI/testing/sysfs-bus-platform-devices-occ-hwmon