From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9BAD6C369D1 for ; Sun, 27 Apr 2025 11:29:49 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4ZlkrX090rz2ynh; Sun, 27 Apr 2025 21:29:48 +1000 (AEST) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=202.12.124.154 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1745753387; cv=none; b=LESgwNEzDuxkwkWSKLmKdzqhbNqOD+1nra3LUAquFxL8GZDEWddPdsNMzRxADUKvb9xrsJn5Jz2W/c2RZakMygSQ1xMKt3p0FIjpJNldebaakkujXiK55b5QjGC44tvVDYWzKoLGnLzFBk7yAu58Sh5IrAQyIGmf0CitoRKRk2elouu6DKfW6Y11XtiTSvgyzBS7OxnhrOeZq2upKiHU2yzsYlsvs3k5dOl5q83MMfFbCK94m0F6HGIklZOEa7LBY2Vgc1Px0CmtHAA3N5nXHXFGpPp8OR7KNPkM42K5UxmAnK2zGwzg+0fdPESs2koSS0m0fqcyt8b++ZqWUgFGxg== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1745753387; c=relaxed/relaxed; bh=5AVnMYrfQqCKvIYMObZqGv0ycuhL3WyZhFo4zuHwRSU=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=jIDR0AN51upstr2RaTS8VbQ0dn+JZ3vqBEWrhYQE7c//FLcuzctMhqRZXxqYvabOMuBP18RDnSuCR8zv+L+VDqwfZwY0TgdgKvqxTDbyPilP0ojLcCImI0Z7jcFdxrukhJQAi9SJJRS7MX4F88xfePrt5F00OPfcn4x4qi2hgL0Cr6PuSp6J6jHBFZJvio/9xbBmGPIGQDaOkE6nJwDkeQflQnDbFsFEehXeApnxJJZModl9mjOgfkqwWMxRp1pQKNv7FwscIn0EVbMEsYtCMAJxxiURa15Wl2lrhM6eFnu4dRl3G2c2BHedZkpTPOnhBSCqR0MoGnnhWSHWaZrU4A== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=svenpeter.dev; dkim=pass (2048-bit key; unprotected) header.d=svenpeter.dev header.i=@svenpeter.dev header.a=rsa-sha256 header.s=fm1 header.b=cHiGN+ZH; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=EjsUXopk; dkim-atps=neutral; spf=pass (client-ip=202.12.124.154; helo=fhigh-b3-smtp.messagingengine.com; envelope-from=sven@svenpeter.dev; receiver=lists.ozlabs.org) smtp.mailfrom=svenpeter.dev Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=svenpeter.dev Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=svenpeter.dev header.i=@svenpeter.dev header.a=rsa-sha256 header.s=fm1 header.b=cHiGN+ZH; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=EjsUXopk; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=svenpeter.dev (client-ip=202.12.124.154; helo=fhigh-b3-smtp.messagingengine.com; envelope-from=sven@svenpeter.dev; receiver=lists.ozlabs.org) Received: from fhigh-b3-smtp.messagingengine.com (fhigh-b3-smtp.messagingengine.com [202.12.124.154]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4ZlkrT0YZ0z2ym3 for ; Sun, 27 Apr 2025 21:29:44 +1000 (AEST) Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfhigh.stl.internal (Postfix) with ESMTP id 4F1702540219; Sun, 27 Apr 2025 07:29:41 -0400 (EDT) Received: from phl-imap-07 ([10.202.2.97]) by phl-compute-04.internal (MEProxy); Sun, 27 Apr 2025 07:29:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svenpeter.dev; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm1; t=1745753381; x=1745839781; bh=5AVnMYrfQqCKvIYMObZqGv0ycuhL3WyZ hFo4zuHwRSU=; b=cHiGN+ZHVQvwAmWDVqx50p8JoFWULaccQJvoTA0aQQhbWoFj 6J7CETqWlKWiUxtKkRoO5VBEsJc6Am067bGJBPDJwas4PXB2FBqDdwB4cW40fhmj wW7+AXxGlx5lVtBORqbrSngOYGPpMo0CvUWAa45O4OOu7+7wunwDjjoonqC7g/zW Wdnh+EFjZyvK1jID1HhANCjNFi9iIEdoQ0r7P92cG721VszlAtd/czvo6+R8Hnxd ucQR93PRE5ZxsRismq+JU6fyHS6HATK+azAFOjjrYuhZcxpk1Z0JCOm6aexDIxt9 fT5+7FT2550zPfT/Cm8SqfCMPnSLrPEoNfBqnA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1745753381; x= 1745839781; bh=5AVnMYrfQqCKvIYMObZqGv0ycuhL3WyZhFo4zuHwRSU=; b=E jsUXopkgxavIZ1xItTb/bHcd5C9+Mg0mtnK92mV2vksvqWHpIuKCP+LQ9bu5hBCc TZ2zPdMVV72GaMriRYLOEZTZN2BUlRteq/ZRE2Kz93PfwQOjIWE0wawVSOd54nKk seKri/NZ/obQ3FAeZXO8dbcnPWXrcLAfqCvty8lppFSb5WdiwkR/0yTZYCUgLtRG veElxm/j9xyyoVLMrHwkYYF7cSjcxkS79ZjK941CezfydKUJSLjMV4vODtI/wrcn 343CLszdcrK/IUnuzPChqz6yiHhvgSImt7VzQWkWukoosIkOqVrsgctzZcDflKy3 DsI3xeOBJqtDICJKGf9QA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvheejleehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepofggfffhvfevkfgjfhfutgfgsehtjeertder tddtnecuhfhrohhmpedfufhvvghnucfrvghtvghrfdcuoehsvhgvnhesshhvvghnphgvth gvrhdruggvvheqnecuggftrfgrthhtvghrnhepleefteeugeduudeuudeuhfefheegveek ueefffdvffektdffffelveffvddvueffnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomhepshhvvghnsehsvhgvnhhpvghtvghrrdguvghvpdhnsggp rhgtphhtthhopeduhedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheptghhrhhish htohhphhgvrdhlvghrohihsegtshhgrhhouhhprdgvuhdprhgtphhtthhopehmphgvsegv lhhlvghrmhgrnhdrihgurdgruhdprhgtphhtthhopehnphhighhgihhnsehgmhgrihhlrd gtohhmpdhrtghpthhtohepnhgvrghlsehgohhmphgrrdguvghvpdhrtghpthhtohepjhes jhgrnhhnrghurdhnvghtpdhrtghpthhtoheprghnughirdhshhihthhisehkvghrnhgvlh drohhrghdprhgtphhtthhopehnrghvvggvnheskhgvrhhnvghlrdhorhhgpdhrtghpthht ohepmhgrugguhieslhhinhhugidrihgsmhdrtghomhdprhgtphhtthhopehlihhnuhigqd grrhhmqdhkvghrnhgvlheslhhishhtshdrihhnfhhrrgguvggrugdrohhrgh X-ME-Proxy: Feedback-ID: i51094778:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 3F050BA0070; Sun, 27 Apr 2025 07:29:39 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: MIME-Version: 1.0 X-ThreadId: T5434dab6164679dd Date: Sun, 27 Apr 2025 13:29:17 +0200 From: "Sven Peter" To: "Andi Shyti" Cc: "Janne Grunau" , "Alyssa Rosenzweig" , "Madhavan Srinivasan" , "Michael Ellerman" , "Nicholas Piggin" , "Christophe Leroy" , "Naveen N Rao" , "Neal Gompa" , "Hector Martin" , linuxppc-dev , asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Message-Id: In-Reply-To: References: <20250415-pasemi-fixes-v2-0-c543bf53151a@svenpeter.dev> <20250415-pasemi-fixes-v2-4-c543bf53151a@svenpeter.dev> Subject: Re: [PATCH v2 4/6] i2c: pasemi: Improve error recovery Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi, On Thu, Apr 17, 2025, at 15:07, Andi Shyti wrote: > Hi Sven, Hector, > > ... > >> +/* >> + * The hardware (supposedly) has a 25ms timeout for clock stretching, thus >> + * use 100ms here which should be plenty. >> + */ >> +#define TRANSFER_TIMEOUT_MS 100 > > Please use the PASEMI prefix here. TRANSFER_TIMEOUT_MS it's not a > naming belonging to this driver. > > 100ms looks a bit too much to me, but if you say it works, then > it works. > The problem here is that we only have very outdated documentation for this hardware and no real idea what changed since Apple bought PASemi and continued using their i2c controller. We know that 10ms (which used to be the original timeout iirc) is not nearly enough and we also know that we need at least 25ms for clock strechting (assuming nothing changed in the past 10+ years). We just bumped it to 100ms to be safe after we very rarely got error reports which we tracked down to timeouts and haven't gotten any reports since. I've addressed all your other comments for v3 which I'll send out in a few minutes. Best, Sven