Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2215401/?format=api
{ "id": 2215401, "url": "http://patchwork.ozlabs.org/api/patches/2215401/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-i2c/patch/20260324140556.2249039-1-martin.aberer@bachmann.info/", "project": { "id": 35, "url": "http://patchwork.ozlabs.org/api/projects/35/?format=api", "name": "Linux I2C development", "link_name": "linux-i2c", "list_id": "linux-i2c.vger.kernel.org", "list_email": "linux-i2c@vger.kernel.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260324140556.2249039-1-martin.aberer@bachmann.info>", "list_archive_url": null, "date": "2026-03-24T14:05:56", "name": "i2c: ocores: Use read_poll_timeout_atomic to avoid false poll timeouts", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "49166b0693bc62ab42fa68c434db1f606b6c7351", "submitter": { "id": 92947, "url": "http://patchwork.ozlabs.org/api/people/92947/?format=api", "name": "Martin Aberer", "email": "martin.aberer@bachmann.info" }, "delegate": { "id": 149066, "url": "http://patchwork.ozlabs.org/api/users/149066/?format=api", "username": "cazzacarna", "first_name": "Andi", "last_name": "Shyti", "email": "andi.shyti@kernel.org" }, "mbox": "http://patchwork.ozlabs.org/project/linux-i2c/patch/20260324140556.2249039-1-martin.aberer@bachmann.info/mbox/", "series": [ { "id": 497296, "url": "http://patchwork.ozlabs.org/api/series/497296/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-i2c/list/?series=497296", "date": "2026-03-24T14:05:56", "name": "i2c: ocores: Use read_poll_timeout_atomic to avoid false poll timeouts", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/497296/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2215401/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2215401/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-i2c+bounces-16701-incoming=patchwork.ozlabs.org@vger.kernel.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linux-i2c@vger.kernel.org" ], "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=bachmann.info header.i=@bachmann.info\n header.a=rsa-sha256 header.s=selector1 header.b=jw96WrCm;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.105.105.114; helo=tor.lore.kernel.org;\n envelope-from=linux-i2c+bounces-16701-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (1024-bit key) header.d=bachmann.info header.i=@bachmann.info\n header.b=\"jw96WrCm\"", "smtp.subspace.kernel.org;\n arc=fail smtp.client-ip=52.101.72.76", "smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=bachmann.info", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=bachmann.info" ], "Received": [ "from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fgBhS3hWXz1xy1\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 25 Mar 2026 01:08:08 +1100 (AEDT)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 4EF4930234F2\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 24 Mar 2026 14:06:18 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 764873DEFE6;\n\tTue, 24 Mar 2026 14:06:16 +0000 (UTC)", "from AM0PR02CU008.outbound.protection.outlook.com\n (mail-westeuropeazon11023076.outbound.protection.outlook.com [52.101.72.76])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 298AA3D6496;\n\tTue, 24 Mar 2026 14:06:13 +0000 (UTC)", "from AS9PR04CA0170.eurprd04.prod.outlook.com (2603:10a6:20b:530::14)\n by AS8PR05MB8327.eurprd05.prod.outlook.com (2603:10a6:20b:3c0::20) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9723.31; Tue, 24 Mar\n 2026 14:06:09 +0000", "from AMS0EPF000001A5.eurprd05.prod.outlook.com\n (2603:10a6:20b:530:cafe::a4) by AS9PR04CA0170.outlook.office365.com\n (2603:10a6:20b:530::14) with Microsoft SMTP Server (version=TLS1_3,\n cipher=TLS_AES_256_GCM_SHA384) id 15.20.9723.31 via Frontend Transport; Tue,\n 24 Mar 2026 14:06:02 +0000", "from webmail.bachmann.info (185.67.228.71) by\n AMS0EPF000001A5.mail.protection.outlook.com (10.167.16.232) with Microsoft\n SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.20.9723.19 via Frontend Transport; Tue, 24 Mar 2026 14:06:08 +0000", "from ATFKPCLXMAAB.bachmann.at (10.204.120.2) by atfkex03.bachmann.at\n (10.10.10.31) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.29; Tue, 24 Mar\n 2026 15:06:08 +0100" ], "ARC-Seal": [ "i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774361176; cv=fail;\n b=bOezhi2XpU8CVg6UK0qXWSu5oZrq2sAF/d7OMwgqNdvU5OTpNs7ijZWdbMdQJCgosnbPJ8ihytID2kC6imeXldZJr/Kzo1KnYo0EFmTEsEeSZotI/Ogk3s5CkzLKNBDsxuVs4L06bdACEhZQJpaaIsjMrmOMckx7ULsAm0oRK9I=", "i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;\n b=QqRig+ljAI9pZu0PRTDR9cPiLHBa2v65l7J9aJl1rUP/Bmi/rw4DuAWOduxz40WfEk8LIuBpOwng7gCqXHPbecieaIy+ifVDpt8fx+XRCgiXIh+1f4KnEYrEkKPw3rF2uM6mBgbJ4cLYWKcKoLv+LeKFCFSn8e/H2sxYLKzlMjq+/NqMoV8EIM9qY6wOewhHqxZKuN+cA+SPJpswUZWA+jqks2VYniGJXwRl27VNcNL5zs1kmg9UOfS+9f3WcDQludgjD2mWOSvSsB5s27HVpQDft+eJV5cl7+3OdEQ0Ra8lQpwbCuTqWhOkW6ka50p15iq6+6n6y1eSI2iaewghOg==" ], "ARC-Message-Signature": [ "i=2; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774361176; c=relaxed/simple;\n\tbh=IYsOSzzQi2wPVMAsVXdGg6cr84aReKCGEK8/N2h1vuA=;\n\th=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=NaZQrNhKBLmNOP3KotjNBX1JUlT5AFJRq2AmJFTk84Tl4ALKFIODjz8SBh+30WRIrkny1CXZXVLxQkFtdiZdR3HOKJ6YybPELJQ7dg8YRUa1GyP73gkOpwbm00mxi3U8VGWulZnCCQzwF1H5ALKnCirCCKB2pAjH9oyoEtoDP5Y=", "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector10001;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=xQ5sQn4FlZBcYVMs45uGu1SZIrkdHjMRgfTx/MT7wWM=;\n b=vOyxvfbKbuQJ6ls7jX2QYmxPERTYOd1UlcTP1UkZ7du1PGe0sFKrp1fWj+IaRGch388N1RuwXKc89Ie+8BVTt6IQoPv1tsCPrSA8NE/cuQKRHliKt7hHAVwHEu2rguhWd9VD/4WIWXKWIp0bM5stNTMUlEkHWz1YKVqBDopqQc/trFLmYVRScWaq+y7WC0VHfV6ZPbEzlvMWO6ynInad7MKugsdARXFlQ0t9cX5O+4BjfHGJJzTKzqDEbQ5ypGbfhQfHNjHLQvBpArcHgCVuhdX2gA0Xx1SOC+vxpBn0YTmgo/N2hXavoq7DHjBvnmjlk0n5Begglfi3dzy5o43z2Q==" ], "ARC-Authentication-Results": [ "i=2; smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=bachmann.info;\n spf=pass smtp.mailfrom=bachmann.info;\n dkim=pass (1024-bit key) header.d=bachmann.info header.i=@bachmann.info\n header.b=jw96WrCm; arc=fail smtp.client-ip=52.101.72.76", "i=1; mx.microsoft.com 1; spf=softfail (sender ip\n is 185.67.228.71) smtp.rcpttodomain=korsgaard.com\n smtp.mailfrom=bachmann.info; dmarc=fail (p=quarantine sp=quarantine pct=100)\n action=quarantine header.from=bachmann.info; dkim=none (message not signed);\n arc=none (0)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=bachmann.info;\n s=selector1;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=xQ5sQn4FlZBcYVMs45uGu1SZIrkdHjMRgfTx/MT7wWM=;\n b=jw96WrCmOSroHp7iBWwsNIG1nkHI32bJlnmr9ULAoLYUXos+L6Asvdy5pPKPaUTAQ0vVrL3NKbzDyree4OEgKSzzPySzNq5T1s/jvSZZwuKxKaVtmu87lldrwSddtLkDcdupNfUj5yCmU6R054Ew5cbifD2OG1h7G7sYQsiQtwA=", "X-MS-Exchange-Authentication-Results": "spf=softfail (sender IP is\n 185.67.228.71) smtp.mailfrom=bachmann.info; dkim=none (message not signed)\n header.d=none;dmarc=fail action=quarantine header.from=bachmann.info;", "Received-SPF": "SoftFail (protection.outlook.com: domain of transitioning\n bachmann.info discourages use of 185.67.228.71 as permitted sender)", "From": "Martin Aberer <martin.aberer@bachmann.info>", "To": "<peter@korsgaard.com>, <andrew@lunn.ch>", "CC": "<andi.shyti@kernel.org>, <linux-i2c@vger.kernel.org>,\n\t<linux-kernel@vger.kernel.org>, Martin Aberer <martin.aberer@bachmann.info>", "Subject": "[PATCH] i2c: ocores: Use read_poll_timeout_atomic to avoid false poll\n timeouts", "Date": "Tue, 24 Mar 2026 15:05:56 +0100", "Message-ID": "<20260324140556.2249039-1-martin.aberer@bachmann.info>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20260323135249.550925-1-martin.aberer@bachmann.info>", "References": "<20260323135249.550925-1-martin.aberer@bachmann.info>", "Precedence": "bulk", "X-Mailing-List": "linux-i2c@vger.kernel.org", "List-Id": "<linux-i2c.vger.kernel.org>", "List-Subscribe": "<mailto:linux-i2c+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:linux-i2c+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-ClientProxiedBy": "atfkex03.bachmann.at (10.10.10.31) To atfkex03.bachmann.at\n (10.10.10.31)", "X-EOPAttributedMessage": "0", "X-MS-PublicTrafficType": "Email", "X-MS-TrafficTypeDiagnostic": "AMS0EPF000001A5:EE_|AS8PR05MB8327:EE_", "X-MS-Office365-Filtering-Correlation-Id": "3a416dee-86c6-4371-0da2-08de89ae7f74", "X-MS-Exchange-SenderADCheck": "1", "X-MS-Exchange-AntiSpam-Relay": "0", "X-Microsoft-Antispam": "\n\tBCL:0;ARA:13230040|82310400026|36860700016|1800799024|376014|18002099003|22082099003|56012099003;", "X-Microsoft-Antispam-Message-Info": "\n\tsL3Vab8I3G4Ia98ZH9hadSBuWeXaX0M5QaSzIWxcvaizC5pyrlmKWF6ZlQGfhNq2Gyq9oRmbAOmjMslXHGYvilXzVmoqdYYqOSzmTHCfNxtEorpIYndpEBG9Z3GhdowPMWqG7Ko9+D/Rosu42UkrPt+0I8kmrAVyS9m9OxP6HfL2daU0AbWcf8htxkfVIAt2t/iYVlUs+Hzwphn0cqb1c2tsZexyW8pX8ca9DBEfQBScgyQcxyB4vc1VwUY5RYuHJFfqet9ERmqCGH3r4DL8M3dhfdkuWszbPw8GFxcjjGbRabfaeYCnk6rK2U54KDYRLdaFqIC1e/ATD2QdE/eokJdKlMM/Ry1wv8qrxHd6ZuuLjppW3zhCEf2QGLuxXNNQy79NakZzXK3NhHhFomswF9YL1RpiUh84EdwhiTqAWUCe/uuC+3KfdZlaAkIZCqr+qY1FMhUN6Flkf4VdSFxKU9Vg/sBVKQ2LM+9r9NPBVXo9D7TOaSgJ3btykDxv0n8xNGOEjbGZENIBF9duqFgDoDErE1TuFfr4YVLNLQmY6X+UDC0rzLo+Eevr3oKTx6JNyEx5Ak5t6qFBOmP1qLZh+JLfMp9d84xHEWSCR4jXiAGOnx0j/TT0Qq/d1OgrMNkvjvZpxgUe0nmY9pYKP0e+g9SSItrbEfPG4m/QPIc6EX50+KQ8LlPj7L/muxanqamIaDzPvEFiJyL8numikFs21pTVxzSfS5modG+kGGT2DFR6T+qIwaaTPvlE0qXwhyDVlsLy8EO6ZpJeJRIi6ZPlhA==", "X-Forefront-Antispam-Report": "\n\tCIP:185.67.228.71;CTRY:AT;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:webmail.bachmann.info;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(36860700016)(1800799024)(376014)(18002099003)(22082099003)(56012099003);DIR:OUT;SFP:1102;", "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "1", "X-MS-Exchange-AntiSpam-MessageData-0": "\n\t4RJFVOk6QNqpDVh9AY63znm5ubQKAR+1k4buNsdN7xeowAma21Z95xuelT6/i0l+JYd25arpeLNLIZbJQ94tu/EXQGABGR191IFSsQaY6GNTMVm7cGJqjQvKBo46NMWToMtgNLXPfEcwLWh2DPk+0iZmsCOHPWZyYCWalJ4TTKrGKCvfKxWifwNkwDckY2RF7ktXqA6nj9v1vaib+H7UYiBjgsDlW7tVlVR3zyavg0TlvRX1Jszw3d3/O467QyVMQHQby0vYHVpxGrtVbUMREYhZjgxkyLKB5S2ZveQg9BIImPTooWa6fT3IUlty7aulyfUK5PDoHNzcvp8xwMIAsiYbJKihh4O6aeMyz1eaQNkWQ0Oyux9bYUE8UtHoe0+bPwz6DwyLi1tU2y0bRaznHMB9KNag/RwPbTRqicmJzEkQdCaGn934bn6XFenfpcLz", "X-OriginatorOrg": "bachmann.info", "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "24 Mar 2026 14:06:08.8067\n (UTC)", "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 3a416dee-86c6-4371-0da2-08de89ae7f74", "X-MS-Exchange-CrossTenant-Id": "e3bace4d-d2e7-4d8f-afb8-152509ee3f1a", "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=e3bace4d-d2e7-4d8f-afb8-152509ee3f1a;Ip=[185.67.228.71];Helo=[webmail.bachmann.info]", "X-MS-Exchange-CrossTenant-AuthSource": "\n\tAMS0EPF000001A5.eurprd05.prod.outlook.com", "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous", "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem", "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "AS8PR05MB8327" }, "content": "Replace the manual polling loop in ocores_wait() with the kernel helper\nread_poll_timeout_atomic(). This simplifies the code and ensures robust\ntimeout handling. By using this helper, we avoid spurious timeout errors\nthat could occur under high CPU load or preemption, as the macro handles\ntiming and condition checks atomically.\n\nSigned-off-by: Martin Aberer <martin.aberer@bachmann.info>\n---\n drivers/i2c/busses/i2c-ocores.c | 24 +++++++++---------------\n 1 file changed, 9 insertions(+), 15 deletions(-)", "diff": "diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c\nindex 0f67e57cdeff..df6ebf32d6e8 100644\n--- a/drivers/i2c/busses/i2c-ocores.c\n+++ b/drivers/i2c/busses/i2c-ocores.c\n@@ -24,6 +24,7 @@\n #include <linux/io.h>\n #include <linux/log2.h>\n #include <linux/spinlock.h>\n+#include <linux/iopoll.h>\n #include <linux/jiffies.h>\n \n /*\n@@ -258,7 +259,7 @@ static void ocores_process_timeout(struct ocores_i2c *i2c)\n * @reg: register to query\n * @mask: bitmask to apply on register value\n * @val: expected result\n- * @timeout: timeout in jiffies\n+ * @timeout_us: timeout in microseconds\n *\n * Timeout is necessary to avoid to stay here forever when the chip\n * does not answer correctly.\n@@ -267,21 +268,14 @@ static void ocores_process_timeout(struct ocores_i2c *i2c)\n */\n static int ocores_wait(struct ocores_i2c *i2c,\n \t\t int reg, u8 mask, u8 val,\n-\t\t const unsigned long timeout)\n+\t\t unsigned long timeout_us)\n {\n-\tunsigned long j;\n+\tu8 status;\n \n-\tj = jiffies + timeout;\n-\twhile (1) {\n-\t\tu8 status = oc_getreg(i2c, reg);\n-\n-\t\tif ((status & mask) == val)\n-\t\t\tbreak;\n-\n-\t\tif (time_after(jiffies, j))\n-\t\t\treturn -ETIMEDOUT;\n-\t}\n-\treturn 0;\n+\treturn read_poll_timeout_atomic(oc_getreg, status,\n+\t\t\t\t\t(status & mask) == val,\n+\t\t\t\t\t0, timeout_us, false,\n+\t\t\t\t\ti2c, reg);\n }\n \n /**\n@@ -314,7 +308,7 @@ static int ocores_poll_wait(struct ocores_i2c *i2c)\n \t * once we are here we expect to get the expected result immediately\n \t * so if after 1ms we timeout then something is broken.\n \t */\n-\terr = ocores_wait(i2c, OCI2C_STATUS, mask, 0, msecs_to_jiffies(1));\n+\terr = ocores_wait(i2c, OCI2C_STATUS, mask, 0, 1000);\n \tif (err)\n \t\tdev_warn(i2c->adap.dev.parent,\n \t\t\t \"%s: STATUS timeout, bit 0x%x did not clear in 1ms\\n\",\n", "prefixes": [] }