[{"id":3669988,"web_url":"http://patchwork.ozlabs.org/comment/3669988/","msgid":"<acW0BlZAp5Pdn329@zenone.zhora.eu>","list_archive_url":null,"date":"2026-03-26T22:34:31","subject":"Re: [PATCH] i2c: ocores: Use read_poll_timeout_atomic to avoid false\n poll timeouts","submitter":{"id":85956,"url":"http://patchwork.ozlabs.org/api/people/85956/","name":"Andi Shyti","email":"andi.shyti@kernel.org"},"content":"Hi,\n\nOn Tue, Mar 24, 2026 at 03:05:56PM +0100, Martin Aberer wrote:\n> Replace the manual polling loop in ocores_wait() with the kernel helper\n> read_poll_timeout_atomic(). This simplifies the code and ensures robust\n> timeout handling. By using this helper, we avoid spurious timeout errors\n> that could occur under high CPU load or preemption, as the macro handles\n> timing and condition checks atomically.\n> \n> Signed-off-by: Martin Aberer <martin.aberer@bachmann.info>\n\nPlease, next time don't send this as --in-reply-to, but please\nsend it as a v2 with a proper changelog.\n\nOther than this, Christian, Andrew, anyone who wants to give this\na look?\n\nThanks,\nAndi","headers":{"Return-Path":"\n <linux-i2c+bounces-16821-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 (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=QzcnGteM;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.232.135.74; helo=sto.lore.kernel.org;\n envelope-from=linux-i2c+bounces-16821-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=\"QzcnGteM\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201"],"Received":["from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fhdyt6ytyz1xy1\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 09:40:38 +1100 (AEDT)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sto.lore.kernel.org (Postfix) with ESMTP id 70C9F30909AF\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 26 Mar 2026 22:34:37 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 3E69F2F7AAB;\n\tThu, 26 Mar 2026 22:34:35 +0000 (UTC)","from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org\n [10.30.226.201])\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 DB40517BA2;\n\tThu, 26 Mar 2026 22:34:34 +0000 (UTC)","by smtp.kernel.org (Postfix) with ESMTPSA id 2DB95C116C6;\n\tThu, 26 Mar 2026 22:34:33 +0000 (UTC)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774564474; cv=none;\n b=bPNW60Bobat265BRiqfPsB9FGMG6ZQDopOlJ9+zKbcq868FbqH0yZj37MC/2FzWH6bAlyjhm97Ng4gQg1BFmY1nx8fgPUpsAMM6VWFq2chpqW34UNSFWy142B4Pz1EVCe9es4S832y+QVNiaqVc/cPbnyENhb3uKQ6m9TFn+JiY=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774564474; c=relaxed/simple;\n\tbh=wkl8G216CH2WNw0hnJabeZmnO1/MHaRrp+glbaeQkyA=;\n\th=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:\n\t Content-Type:Content-Disposition:In-Reply-To;\n b=G9fEpRUa1uuFbHr/OvRcUBf5h5c5/yY5/iaRqRr7fpSXNMXfTBF1yv01GdgibPizPHTo/0GQM7OM0ymicu/xX2Q4CvTqv/UZ0LLEDF14MXLV030zqSvW6pH5BNlWVgYrBXkJpIksCi4iBjYLIDyT7l6Gfb70V5Zd/onkK4L2hRc=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=QzcnGteM; arc=none smtp.client-ip=10.30.226.201","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1774564474;\n\tbh=wkl8G216CH2WNw0hnJabeZmnO1/MHaRrp+glbaeQkyA=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=QzcnGteMl6z4KmrqazVx1R96mjP/TBAraVvpaEX/IAI4Mau9Yfe8utofK792jOnyV\n\t 2Rbg/b/xS0a4cDj779Sx5Hbh3qMNxDrO1d2Q7W7TRXpJVzZRuG0OOJvQUr4kjKd47W\n\t uWp1Sbj7pQcT/DE4jrIe5uCmBtvOY3Tl1YbtAnW8ENd9u/CLFO0bgik7tYxsv0ao4h\n\t 0Nzd56k2sp4KqRfq5l79jBSvPvLX71W2k9ugejQEPP3s0HuhqTqzuvUXbUePgWYNtT\n\t ABO325uLhGPIjQ7jxlMqMfARuo7QVjyJq+DFuqbtN8hZsr67f1lJBZJQ/Kx9pmjTTY\n\t Q83bWbokaRI4Q==","Date":"Thu, 26 Mar 2026 23:34:31 +0100","From":"Andi Shyti <andi.shyti@kernel.org>","To":"Martin Aberer <martin.aberer@bachmann.info>","Cc":"peter@korsgaard.com, andrew@lunn.ch, linux-i2c@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org, Christian Gmeiner <christian.gmeiner@gmail.com>","Subject":"Re: [PATCH] i2c: ocores: Use read_poll_timeout_atomic to avoid false\n poll timeouts","Message-ID":"<acW0BlZAp5Pdn329@zenone.zhora.eu>","References":"<20260323135249.550925-1-martin.aberer@bachmann.info>\n <20260324140556.2249039-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-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20260324140556.2249039-1-martin.aberer@bachmann.info>"}},{"id":3670008,"web_url":"http://patchwork.ozlabs.org/comment/3670008/","msgid":"<c9afbdf9-d5ce-4f1c-8192-5d3baebe125c@lunn.ch>","list_archive_url":null,"date":"2026-03-27T00:27:16","subject":"Re: [PATCH] i2c: ocores: Use read_poll_timeout_atomic to avoid false\n poll timeouts","submitter":{"id":13608,"url":"http://patchwork.ozlabs.org/api/people/13608/","name":"Andrew Lunn","email":"andrew@lunn.ch"},"content":"On Tue, Mar 24, 2026 at 03:05:56PM +0100, Martin Aberer wrote:\n> Replace the manual polling loop in ocores_wait() with the kernel helper\n> read_poll_timeout_atomic(). This simplifies the code and ensures robust\n> timeout handling. By using this helper, we avoid spurious timeout errors\n> that could occur under high CPU load or preemption, as the macro handles\n> timing and condition checks atomically.\n\nIt is not that it does it atomically, but that it always does a check\nafter the delay, even if the delay has taken us past the timeout.\n\nApart from that, and the other comments:\n\nReviewed-by: Andrew Lunn <andrew@lunn.ch>\n\n    Andrew","headers":{"Return-Path":"\n <linux-i2c+bounces-16823-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=lunn.ch header.i=@lunn.ch header.a=rsa-sha256\n header.s=20171124 header.b=dckkfzoW;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-i2c+bounces-16823-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch\n header.b=\"dckkfzoW\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=156.67.10.101","smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=lunn.ch","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=lunn.ch"],"Received":["from tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::12fc:5321])\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 4fhhLM5XQVz1yFr\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 11:27:39 +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 B5B8C3013A60\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 00:27:34 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 965FB242D86;\n\tFri, 27 Mar 2026 00:27:31 +0000 (UTC)","from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101])\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 DCBCF188596;\n\tFri, 27 Mar 2026 00:27:28 +0000 (UTC)","from andrew by vps0.lunn.ch with local (Exim 4.94.2)\n\t(envelope-from <andrew@lunn.ch>)\n\tid 1w5v2i-00DZ1u-BQ; Fri, 27 Mar 2026 01:27:16 +0100"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774571251; cv=none;\n b=IqF29yZYLz6XfBjULJDLEK68tEchjl75DJrhtuGyldAcMaxA62Tn0OL9npzuUy5o/U95uIPti/VxzKfsqg7Oxq7svDR/QEqAoL9lnyCzivjiEIVvaHMWOgQt4OBhtj6WMvlc1n0hv6KY5CoSps84v/eEUn+xeTHSMuA+AaWZJTI=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774571251; c=relaxed/simple;\n\tbh=9qHZtiDhanOQnxlnlcnMIGn5yWvjvh/nCVC9KUTq/2c=;\n\th=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:\n\t Content-Type:Content-Disposition:In-Reply-To;\n b=AKHVKT92mQw2ig7lEEYwhhvVd2KQU1geqz/VdUeTI8uVLSpMI1G7hy5CRFQXTGI2WXotq1tyPfcYOFt5BsdCRh5HQwf2VkockmFaIC8xqxEma8EyD4Lj6x+oNd/BQsENGdH28fIg0ROGToM2MXWL+kTAIh0kRVktEJrPwSF14n8=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=lunn.ch;\n spf=pass smtp.mailfrom=lunn.ch;\n dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch\n header.b=dckkfzoW; arc=none smtp.client-ip=156.67.10.101","DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch;\n\ts=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version:\n\tReferences:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject:\n\tDate:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:\n\tContent-ID:Content-Description:Content-Disposition:In-Reply-To:References;\n\tbh=eG/sTjio8XWgbGLo2OAUG4mjXh3DemIvsZC9G4MtvBw=; b=dckkfzoWgBd8lmaM1ZBOtoBWI9\n\tJNARRzv/aULxVQoN2n0ykkuapNlnytAC77PsQi8VsIy1vmDPA4XVqBeVyiDw6apQQ1i8q41fwOyFo\n\tp4PR8vMSXYLfiPEiLf+Y+CLil//NmsAWqnNSPEcJjNSjIHuXML50ol/OHXgTXhR+tS5s=;","Date":"Fri, 27 Mar 2026 01:27:16 +0100","From":"Andrew Lunn <andrew@lunn.ch>","To":"Martin Aberer <martin.aberer@bachmann.info>","Cc":"peter@korsgaard.com, andi.shyti@kernel.org, linux-i2c@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org","Subject":"Re: [PATCH] i2c: ocores: Use read_poll_timeout_atomic to avoid false\n poll timeouts","Message-ID":"<c9afbdf9-d5ce-4f1c-8192-5d3baebe125c@lunn.ch>","References":"<20260323135249.550925-1-martin.aberer@bachmann.info>\n <20260324140556.2249039-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-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20260324140556.2249039-1-martin.aberer@bachmann.info>"}},{"id":3670324,"web_url":"http://patchwork.ozlabs.org/comment/3670324/","msgid":"<acaMqaKYy6mctA2S@zenone.zhora.eu>","list_archive_url":null,"date":"2026-03-27T14:03:44","subject":"Re: [PATCH] i2c: ocores: Use read_poll_timeout_atomic to avoid false\n poll timeouts","submitter":{"id":85956,"url":"http://patchwork.ozlabs.org/api/people/85956/","name":"Andi Shyti","email":"andi.shyti@kernel.org"},"content":"Hi,\n\nOn Fri, Mar 27, 2026 at 01:27:16AM +0100, Andrew Lunn wrote:\n> On Tue, Mar 24, 2026 at 03:05:56PM +0100, Martin Aberer wrote:\n> > Replace the manual polling loop in ocores_wait() with the kernel helper\n> > read_poll_timeout_atomic(). This simplifies the code and ensures robust\n> > timeout handling. By using this helper, we avoid spurious timeout errors\n> > that could occur under high CPU load or preemption, as the macro handles\n> > timing and condition checks atomically.\n> \n> It is not that it does it atomically, but that it always does a check\n> after the delay, even if the delay has taken us past the timeout.\n\nI took the liberty of changing the commit log to this:\n\n    i2c: ocores: Use read_poll_timeout_atomic to avoid false poll timeouts\n\n    Replace the manual polling loop in ocores_wait() with the kernel helper\n    read_poll_timeout_atomic(). This simplifies the code and ensures robust\n    timeout handling.\n\n    In particular, the helper guarantees a condition check after the\n    delay, even if the delay exceeds the timeout, avoiding spurious\n    timeout errors under load or preemption.\n\nLet me know if it doesn't work.\n\nI merged the patch to i2c/i2c-host.\n\nThanks,\nAndi","headers":{"Return-Path":"\n <linux-i2c+bounces-16843-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 (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=cRq1A9K9;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-i2c+bounces-16843-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=\"cRq1A9K9\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201"],"Received":["from tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::12fc:5321])\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 4fj2ZG1BC3z1y1P\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 28 Mar 2026 01:09:10 +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 AEC473058BC6\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 14:03:50 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 884CB3BA24F;\n\tFri, 27 Mar 2026 14:03:49 +0000 (UTC)","from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org\n [10.30.226.201])\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 2F264289E06;\n\tFri, 27 Mar 2026 14:03:48 +0000 (UTC)","by smtp.kernel.org (Postfix) with ESMTPSA id 48F56C2BCB2;\n\tFri, 27 Mar 2026 14:03:48 +0000 (UTC)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774620229; cv=none;\n b=ktFezQOpXw1vs72I8NnILYINkciUtFFoKW0/9KKSNa0XmlnaeQpEf4qkccyCCx5ESfPkiR1q9GbUT5IspH50URVk7cLErnCVSYFLEgYrPWhsu9xiZ92TPKP4RsoVyUOp41ijQ37andC87RpAdI4y3yguEfx7UcQ2Vxj6UP6wDyk=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774620229; c=relaxed/simple;\n\tbh=XxTRwyCGAx0jvq4FieN6junPj14vSkBn4sCe5OTN4Q0=;\n\th=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:\n\t Content-Type:Content-Disposition:In-Reply-To;\n b=fr1/MQJBWuv/qCiYokWEBsPa9WQZn9GhKah3kMUMu7+i5BHiyt4gtCrG/NFvXwHicwLmTngN4sDgvnfCNfoZqyAoFtHekPhaE5FuplaEskhVhCsTotWqseUbFo7S61iQABkma5p8usp7qxetsPTUHSr8RUtSBqxnr/swjkOTte4=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=cRq1A9K9; arc=none smtp.client-ip=10.30.226.201","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1774620228;\n\tbh=XxTRwyCGAx0jvq4FieN6junPj14vSkBn4sCe5OTN4Q0=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=cRq1A9K9qe/yOh/MR+dHyrx6H+FaAi5EX/X0EjZZqEja30Yd0K5G/aTTd+Cu6EkGL\n\t KDTgxd1GStIoLPiqkCw1KaFJ8AEmBnuRqhChViYlApDK9Z3qP7sglA3Wy/aIizlxvE\n\t WthE09EVJ6ePfS3JFP1Kmhg+pRrO9PEXdROgr7JCfHLdjwW8I9LLf2aXWvhp5EBcMD\n\t W+dU/tvlK2L5GJ+tGUTQG/8w1haw6cREbCNEt4DCN4Da0osLdMlWpJ8rm4Qa963sNr\n\t DXROiHonq5S65sxb3uG6woqAyMyklJAaV3YmmOoAyB2W3efHTANsiN+pdNDZ0FNOaU\n\t N+IYgObWwL8Vw==","Date":"Fri, 27 Mar 2026 15:03:44 +0100","From":"Andi Shyti <andi.shyti@kernel.org>","To":"Andrew Lunn <andrew@lunn.ch>","Cc":"Martin Aberer <martin.aberer@bachmann.info>, peter@korsgaard.com,\n\tlinux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org","Subject":"Re: [PATCH] i2c: ocores: Use read_poll_timeout_atomic to avoid false\n poll timeouts","Message-ID":"<acaMqaKYy6mctA2S@zenone.zhora.eu>","References":"<20260323135249.550925-1-martin.aberer@bachmann.info>\n <20260324140556.2249039-1-martin.aberer@bachmann.info>\n <c9afbdf9-d5ce-4f1c-8192-5d3baebe125c@lunn.ch>","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-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<c9afbdf9-d5ce-4f1c-8192-5d3baebe125c@lunn.ch>"}},{"id":3670325,"web_url":"http://patchwork.ozlabs.org/comment/3670325/","msgid":"<8acca1c5-af03-4cb4-9d01-6b4d035cf81a@lunn.ch>","list_archive_url":null,"date":"2026-03-27T14:05:42","subject":"Re: [PATCH] i2c: ocores: Use read_poll_timeout_atomic to avoid false\n poll timeouts","submitter":{"id":13608,"url":"http://patchwork.ozlabs.org/api/people/13608/","name":"Andrew Lunn","email":"andrew@lunn.ch"},"content":">     In particular, the helper guarantees a condition check after the\n>     delay, even if the delay exceeds the timeout, avoiding spurious\n>     timeout errors under load or preemption.\n> \n> Let me know if it doesn't work.\n\nThat is good, thanks.\n\n     Andrew","headers":{"Return-Path":"\n <linux-i2c+bounces-16844-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=lunn.ch header.i=@lunn.ch header.a=rsa-sha256\n header.s=20171124 header.b=NfirfCPq;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c15:e001:75::12fc:5321; helo=sin.lore.kernel.org;\n envelope-from=linux-i2c+bounces-16844-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch\n header.b=\"NfirfCPq\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=156.67.10.101","smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=lunn.ch","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=lunn.ch"],"Received":["from sin.lore.kernel.org (sin.lore.kernel.org\n [IPv6:2600:3c15:e001:75::12fc:5321])\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 4fj2ZW2grKz1y1P\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 28 Mar 2026 01:09:23 +1100 (AEDT)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sin.lore.kernel.org (Postfix) with ESMTP id 58B16302A135\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 14:05:53 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 9205D3DA7E0;\n\tFri, 27 Mar 2026 14:05:51 +0000 (UTC)","from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101])\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 E280222173D;\n\tFri, 27 Mar 2026 14:05:49 +0000 (UTC)","from andrew by vps0.lunn.ch with local (Exim 4.94.2)\n\t(envelope-from <andrew@lunn.ch>)\n\tid 1w67ok-00DfYf-7r; Fri, 27 Mar 2026 15:05:42 +0100"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774620351; cv=none;\n b=tXEQlK4FQtCsCdT49jzBvEUWqJZGZ1+u7oqa+LyoJaWhvgfDi0M46eU9cGorwnjrv3Y2LCHVS5wyq+al+Zn2BS9K/MBF+BOW+dHPAqjh5y9CElJOxOf49Os4FV8LC2yRXB9y2uBCYexEejyUE7+uBsH0Z89BUSM6SpxvrQZ+Clc=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774620351; c=relaxed/simple;\n\tbh=1Ytr54Qui4gyj+gv4PL4vq/K3QaCphWji1udL+1JykU=;\n\th=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:\n\t Content-Type:Content-Disposition:In-Reply-To;\n b=rvX3AJNT3wv9vFrHDkoo/xePZWAl/pSRsFr+mWHFqqhRkMC1JhvByJFa/s32Y4HEg0i7k2wAYRrhf7ztKGwMdrsBGOnqc2gncq64nReehUba653I5gsf5v6gTA2zjZ9v2WxTO2OEdWu5DQKZz1/Dy9Nma+lI1wHmqAZLkWMnNWc=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=lunn.ch;\n spf=pass smtp.mailfrom=lunn.ch;\n dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch\n header.b=NfirfCPq; arc=none smtp.client-ip=156.67.10.101","DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch;\n\ts=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version:\n\tReferences:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject:\n\tDate:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:\n\tContent-ID:Content-Description:Content-Disposition:In-Reply-To:References;\n\tbh=6gGcLLtSBfnKsz9SgIctKwnoDITsxj0pHAg5z2KVu6M=; b=NfirfCPqbP4T1VNxijPYAaKw1Y\n\tYVfZYew3om/nsamtTPK7cyYab0+xBEygtqCj0p374qzMSJsceCnJ1kU4pcyEJ2MXHxs9Hnb+Xp+G+\n\t6XPJEp0VGp9GEDc2c7yU604iwqtCxKEsfgdcPmeRJ5HhjpmH/cwWX48scQ1tv6IETRqE=;","Date":"Fri, 27 Mar 2026 15:05:42 +0100","From":"Andrew Lunn <andrew@lunn.ch>","To":"Andi Shyti <andi.shyti@kernel.org>","Cc":"Martin Aberer <martin.aberer@bachmann.info>, peter@korsgaard.com,\n\tlinux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org","Subject":"Re: [PATCH] i2c: ocores: Use read_poll_timeout_atomic to avoid false\n poll timeouts","Message-ID":"<8acca1c5-af03-4cb4-9d01-6b4d035cf81a@lunn.ch>","References":"<20260323135249.550925-1-martin.aberer@bachmann.info>\n <20260324140556.2249039-1-martin.aberer@bachmann.info>\n <c9afbdf9-d5ce-4f1c-8192-5d3baebe125c@lunn.ch>\n <acaMqaKYy6mctA2S@zenone.zhora.eu>","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-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<acaMqaKYy6mctA2S@zenone.zhora.eu>"}}]