Message ID | 20240917171647.1403910-16-eajames@linux.ibm.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-fsi-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=Xg+cFc3B; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linux-fsi-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X7T3h397fz1y1m for <incoming@patchwork.ozlabs.org>; Wed, 18 Sep 2024 03:17:04 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4X7T3h1T1pz2yXm for <incoming@patchwork.ozlabs.org>; Wed, 18 Sep 2024 03:17:04 +1000 (AEST) X-Original-To: linux-fsi@lists.ozlabs.org Delivered-To: linux-fsi@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=148.163.156.1 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1726593419; cv=none; b=mk8rIYDanYrdLWKuxd2hNPRW0+A4P7DO1HoeC4gKCfBmytvL33tJJ8hPKaln+Ly0euR5Z/7lLw9teb5jL2KFSlsIVTRHx8tdxIxkhiKyy8JQ0ST9oFLzyihG34CKmk2YES1NBYIwwMafVaIoyzAupR2Vaq9MsFi8jR8x+KSxK9rv5iSQIMVW3eMVG4xhFGk9zRqt2GX7a8oFMEMH0XGX1Wr+lfyWLxF/H7GdQhpLTngUnqEVP/waH2CLKlYZFz3VVuiaBB6dlIBsTq0kRjGZWawitNRU4ANMW34kKhktoD7wIIOsThXjhHmmc+jdNfmcmzE2FCp6VtLpBSXvG+B2hQ== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1726593419; c=relaxed/relaxed; bh=dnGqzXOeX4T8QhvF6PDp/id4OxgamrxvQO99vsDWvIc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MWesBuw52SGgXRmQ0gSeUNL55IvVWOeykWDh7qmchJqM757k3S9owBSARVhr0tradIHE2eQ4Sp5YUcY1cXi4x7tG9Sd88y+1+qOLkm3U21OVEQDYktkc5sWVnID2vzc0G5rkaPf98/Cct4SjwecmeqJMTbYg2bTo+4INvIwQbmHFwX1/GGP5KTwB3nfVui1rQeqsCwDHcgjonOw0t6HJSdfz2NZ6NahWaDcaYDR8EU+0vr1q0/qrFLxGKS5V/IhX8tlGOG5/gsOzLmRzyFA4mHp8PHgGSHpifHiXyXdNlNVHlEfCUQxrMSvxQ/JxzTV/VEPmmPD6rxK4l8oZoYB7Xw== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=Xg+cFc3B; dkim-atps=neutral; spf=pass (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=eajames@linux.ibm.com; receiver=lists.ozlabs.org) smtp.mailfrom=linux.ibm.com Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com 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=Xg+cFc3B; dkim-atps=neutral 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=lists.ozlabs.org) 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 4X7T3b3vwLz2xqc for <linux-fsi@lists.ozlabs.org>; Wed, 18 Sep 2024 03:16:59 +1000 (AEST) Received: from pps.filterd (m0360083.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 48H9pkd7022492; Tue, 17 Sep 2024 17:16:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=pp1; bh=dnGqzXOeX4T8Q hvF6PDp/id4OxgamrxvQO99vsDWvIc=; b=Xg+cFc3Bhy3bq3PNYOapIfw4KW8eZ ow8KN07jmcs7X6y5/Tk8JbtnqDmWpqcOEqHqKkUXN50/9+pHeEtdZ13L8/11MGMh qJcj03+r4ZcM3kvk/4G+asLcVnFFf3mO/OWh1BOXnO8Fiwgv2pAiKJHBjZemqu2Z GMrIzsa2Kk2CJh3KHrF1lNJQ9x+77w+UaykOXC42heyvwOlz87BSZGNGhvAxYFmk qegQbGeNw89SRi2N2oGuMwttGztOA1QHevRDJRTPpwzizPn/gi9hl8Nv7GRJB+qz evP75WFhsMQNzwK7C8XYU4OBcGQI3UM43+8xQ20IM3kJW/DleShp4zo9g== Received: from ppma13.dal12v.mail.ibm.com (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 41n3ud9hgn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Sep 2024 17:16:53 +0000 (GMT) Received: from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1]) by ppma13.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 48HGVuB3025033; Tue, 17 Sep 2024 17:16:52 GMT Received: from smtprelay07.dal12v.mail.ibm.com ([172.16.1.9]) by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 41nq1mx7ud-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Sep 2024 17:16:52 +0000 Received: from smtpav01.dal12v.mail.ibm.com (smtpav01.dal12v.mail.ibm.com [10.241.53.100]) by smtprelay07.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 48HHGpeA23658906 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 17 Sep 2024 17:16:51 GMT Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3EDDF58057; Tue, 17 Sep 2024 17:16:51 +0000 (GMT) Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 09B0A58059; Tue, 17 Sep 2024 17:16:51 +0000 (GMT) Received: from slate16.aus.stglabs.ibm.com (unknown [9.61.93.228]) by smtpav01.dal12v.mail.ibm.com (Postfix) with ESMTP; Tue, 17 Sep 2024 17:16:50 +0000 (GMT) From: Eddie James <eajames@linux.ibm.com> To: linux-fsi@lists.ozlabs.org Subject: [PATCH 15/15] fsi: i2cr: Reduce status checks for read operations Date: Tue, 17 Sep 2024 12:16:47 -0500 Message-ID: <20240917171647.1403910-16-eajames@linux.ibm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240917171647.1403910-1-eajames@linux.ibm.com> References: <20240917171647.1403910-1-eajames@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: eguy6qpgCxaVN2TdNyw2OM6_Z2OcTuhe X-Proofpoint-ORIG-GUID: eguy6qpgCxaVN2TdNyw2OM6_Z2OcTuhe X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1051,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-17_08,2024-09-16_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 bulkscore=0 phishscore=0 impostorscore=0 spamscore=0 priorityscore=1501 suspectscore=0 adultscore=0 mlxscore=0 lowpriorityscore=0 malwarescore=0 mlxlogscore=896 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2408220000 definitions=main-2409170122 X-BeenThere: linux-fsi@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <linux-fsi.lists.ozlabs.org> List-Unsubscribe: <https://lists.ozlabs.org/options/linux-fsi>, <mailto:linux-fsi-request@lists.ozlabs.org?subject=unsubscribe> List-Archive: <http://lists.ozlabs.org/pipermail/linux-fsi/> List-Post: <mailto:linux-fsi@lists.ozlabs.org> List-Help: <mailto:linux-fsi-request@lists.ozlabs.org?subject=help> List-Subscribe: <https://lists.ozlabs.org/listinfo/linux-fsi>, <mailto:linux-fsi-request@lists.ozlabs.org?subject=subscribe> Cc: alistair@popple.id.au, linux-kernel@vger.kernel.org, ninad@linux.ibm.com, andrew@codeconstruct.com.au Errors-To: linux-fsi-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "linux-fsi" <linux-fsi-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org> |
Series |
fsi: Fixes and improvements
|
expand
|
diff --git a/drivers/fsi/fsi-master-i2cr.c b/drivers/fsi/fsi-master-i2cr.c index 61e55740946b..44dbc7029942 100644 --- a/drivers/fsi/fsi-master-i2cr.c +++ b/drivers/fsi/fsi-master-i2cr.c @@ -145,9 +145,11 @@ int fsi_master_i2cr_read(struct fsi_master_i2cr *i2cr, u32 addr, u64 *data) if (ret) goto unlock; - ret = i2cr_check_status(i2cr->client); - if (ret) - goto unlock; + if (*data == 0xffffffffffffffffull) { + ret = i2cr_check_status(i2cr->client); + if (ret) + goto unlock; + } trace_i2cr_read(i2cr->client, command, data);
As an optimization, only check the status register if the eight byte i2c read operation returns 0xffffffffffffffff. This indicates that the I2C Responder operation failed and the status register will provide the reason. Otherwise, the operation was successful, so no status check is necessary. Signed-off-by: Eddie James <eajames@linux.ibm.com> --- drivers/fsi/fsi-master-i2cr.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)