Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp393893lqd; Wed, 24 Apr 2024 05:58:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUpdXGdvMYdCZHEdckYUo+aELTlxw+p+SHRp1wbypnDOdo6xax62fTndbG37LaSLYxOqRtzofEm1F5OPIyLzC+fMVxcr63ULnjWDDdJNA== X-Google-Smtp-Source: AGHT+IE+TC0WJ/SCjtV4JRNf6wJmt0YzVOkmmaJcgFyv914BpCF99sl8bs6s483/sGf476WhYLVC X-Received: by 2002:a05:6a20:12c6:b0:1ac:3b5d:94b3 with SMTP id v6-20020a056a2012c600b001ac3b5d94b3mr2502675pzg.2.1713963492677; Wed, 24 Apr 2024 05:58:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713963492; cv=pass; d=google.com; s=arc-20160816; b=w9hI3FQ3t4HtJF/8jDHASoQjezxUx0FP17ndZThMjeznKQyJ7U85u7DWjZkWAM4icA aIZaBXE2Xaup5m6egpVCMuKea59zkC7rm86Qk2tUWFrMpbRjkKkqHPqqpMxuQEYo8MY5 65Zu8tNtcmIQ+fhOxMQfGnasZxVvttbCvtgIutVfFXRbAZFSthIKW+dIzelogjlPTUxr drwpy/d+PTU3X5JD42JekvxZHJSZdcTCF//y1mxumOFTyPvjHZ/ge2eNJ4HSaBNDI0TT CY/YU+j4hv9SQZ1bpyoV0IAa+7eTNAAbCjt6LDn8vbtY326nrC3Z7NCvV1M5gs4HxLqV QCEw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=NBtTsZ2nj+w+rOBShYNHrv35fSs6tv0ZSqBr205SbEI=; fh=4NXuak82ruLrgOouuj+/vi770si+eimL9Ju00CV1kBg=; b=VuDvirvfSQvCm5l5QcABcLQFfFC6JYdUEu7TM+EYC26+tPCht7+PPXXULGYs7d+ry+ nnqQdS6mEY51xTuHgRG4bQss0Dk8hrW4+PhH+6d/t7v7ElPdSTXVJ7tuqXLDd4mrZFQ7 aicScC+T1545B5jl2f3CD1Df1xlJTkSajOcjLru4cAC14vlFzez1Mw7NFKpjHP1K/fx+ 5dSl5Qrv2GqaRf8b0sCEOfB/OCYbr2wd4s5D9f32aRDaadwIdfvbRB+n+PiwBvsaMMqr DtfGBTuDl8/ybS/PAMjxE8Vg25VFv9qzLvdhxCSVIPq1WK+ClZzCy9ToEnz/oJnTMhGs pdnA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=OxDiKL9I; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-156888-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156888-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id h3-20020a631203000000b005f7717e8192si11011720pgl.428.2024.04.24.05.58.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 05:58:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-156888-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=OxDiKL9I; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-156888-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156888-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 085D6B25BED for ; Wed, 24 Apr 2024 12:45:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5F8D915ADAC; Wed, 24 Apr 2024 12:44:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OxDiKL9I" Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E39EC1422AF; Wed, 24 Apr 2024 12:44:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713962698; cv=none; b=ChP0WhOVaaTirECZjUes2qn1IYw+N3U4siPtHt/XAqd+MHeJk8jO7X+gn2C1g2QObrHONO/X8Kbm/lTPrVA7rFOL3YKX7qB5AHobr7l1kqozmMfmj0X7ASr4xMPAeeSRsNjkPD9KSLoLqk4/gJo5Hx3j1AVWIAQhphTZLixG/uU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713962698; c=relaxed/simple; bh=0SfFOuwHAopSGaEcR/1RmEkZxcktC0rnqxKmQDvBO9U=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Content-Type; b=n9NCnX/hGe7wvoM9eVfdgAIrYTIcGMka8kAlsFqPDPjxiBSqWhyVkBM3H6+ddZdI5b5g8Dwi5tw35ipIKFcfiwYh8Y8DF9O+w5Fo9bLMnhydBDILL0piNlXXlTb1220MDFXcOq/nWNiwej8IHdbQJaDjr0XE3Kd17F2tnWXfiU8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=OxDiKL9I; arc=none smtp.client-ip=209.85.208.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-56e1baf0380so8045171a12.3; Wed, 24 Apr 2024 05:44:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713962695; x=1714567495; darn=vger.kernel.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=NBtTsZ2nj+w+rOBShYNHrv35fSs6tv0ZSqBr205SbEI=; b=OxDiKL9IH42tjQ5WE6uaTiMzsRIOLpx2BExscNlnvfqIB6uLdTzBUlaq6Y9wZS39Wy QG9QjhMyLnrPXx9qNA/OC7h+vzDLBOPFi0QHLzJyZ68uNfL11oUuJLPnbnlyU/N8QRfL 6ABcVhYUFh+BgesJ4kVElKqd3KM4/Qf5iYmD1FrNTmA7iCgUxWZu24dO4xBMXDK96FCA fnqVStbNQsi974JYhyLp3NqE/gn5CgkNjuvpy+7XiY+X2hXKMMlc0lTQL82+BmdFmXKM j9rQoJaubNq3M7/Sf0CV1apGvZVqo4sGDbmBZUmW4mC3iBFjuH8bJBsfgWRW7/ezkP3Y xeoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713962695; x=1714567495; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NBtTsZ2nj+w+rOBShYNHrv35fSs6tv0ZSqBr205SbEI=; b=J+Bk2Ybrt6ee+ElhuPRDVrJwYJcRUFP4d7G5NLVOjIddmjWAWepge1hZO8ANH3AbyU cPKB1PFmIRqnRNB+0yshdb6itef+mxPevGmMo+X/ParulW4WOiFBbQ+QcHLBYKXh4k8+ n75DcYAbkppxkDv+o4lo4FI/Lz7ODtExMjuivd4EwqLdBwqKWfYrbfjC+3RVNxGeL6RR 77q0j9GxkcICkWTbUoH4mxDTh/VfUp/N09WzwqolP+a+oVfJtHB0odOpaRWbqoLWYL5J mjYbNQjLOvs7cc/rgzAH24dHlJyMFefMi5kxPsd+O2tXTxTaYqcUGKqIriRvRwSHy1S1 Lahg== X-Forwarded-Encrypted: i=1; AJvYcCXJRSKKv3pgk9RkzZpi3MMKMhcwVj4s+y6yQLIrnXNCEWu1U2oILy8/FLCa/cLqWvLZqG2ymPlWdnpmrtmM3U/7Pp5LGFQJtoj+JV++kK6r38Zjmisj7d+QDwcXfn3uJAwvf4MYsPzqQKgEHM+JXvvPrLZNMSGkk6VKVvw+OESnfHFyyCdALm3JV8mRvq+/83E0g4Sh5g0DkwXr8bp99FvrVL4m/LXDSfe8blpUIRmXF3xrEqd6VoDbaaSRwpka/UJNwJRUfCjwJ3rRMPl8Ib6SytNQBvHOz8fPKaVweRX8OGt8 X-Gm-Message-State: AOJu0YywXjwsBQS+YfT+FDavkzM+DLKH2MynHVluBh0WojgBGgTwNrPT aMU+tcCc2eBPsSPdg5z1WR408yT2L4dRF7KDthJVhcrvAS6ckIuB2pP5ZWnUdXdSpi3VJcEyfca ehO2dFJ2cIO0JPXo0GpXGYVOtB13dOAyn X-Received: by 2002:a17:906:474a:b0:a58:8fc0:fbca with SMTP id j10-20020a170906474a00b00a588fc0fbcamr1389900ejs.45.1713962694994; Wed, 24 Apr 2024 05:44:54 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240410112418.6400-20-wsa+renesas@sang-engineering.com> In-Reply-To: From: Andy Shevchenko Date: Wed, 24 Apr 2024 15:44:19 +0300 Message-ID: Subject: Re: [PATCH 00/18] i2c: remove printout on handled timeouts To: Wolfram Sang , Andy Shevchenko , linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, linux-tegra@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Apr 24, 2024 at 3:41=E2=80=AFPM Andy Shevchenko wrote: > On Wed, Apr 24, 2024 at 12:00=E2=80=AFPM Wolfram Sang > wrote: > > On Wed, Apr 24, 2024 at 03:08:14AM +0300, Andy Shevchenko wrote: > > > Wed, Apr 10, 2024 at 01:24:14PM +0200, Wolfram Sang kirjoitti: > > > > While working on another cleanup series, I stumbled over the fact t= hat > > > > some drivers print an error on I2C or SMBus related timeouts. This = is > > > > wrong because it may be an expected state. The client driver on top > > > > knows this, so let's keep error handling on this level and remove t= he > > > > prinouts from controller drivers. > > > > > > > > Looking forward to comments, > > > > > > I do not see an equivalent change in I=C2=B2C core. > > > > There shouldn't be. The core neither knows if it is okay or not. The > > client driver knows. > > > > > IIRC in our case (DW or i801 or iSMT) we often have this message as t= he only > > > > Often? How often? > > Once in a couple of months I assume. Last time it was a few weeks ago > that there was a report and they pointed to this very message which > was helpful. > > > > one that points to the issues (on non-debug level), it will be much h= arder to > > > debug for our customers with this going away. > > > > The proper fix is to print the error in the client driver. Maybe this > > needs a helper for client drivers which they can use like: > > > > i2c_report_error(client, retval, flags); > > > > The other thing which is also more helpful IMO is that we have > > trace_events for __i2c_transfer. There, you can see what was happening > > on the bus before the timeout. It can easily be that, if device X > > times out, it was because of the transfer before to device Y which lock= s > > up the bus. A simple "Bus timed out" message will not help you a lot > > there. > > The trace events are good to have, not sure if production kernels have > them enabled, though. Ah, and to accent on the usefulness of the message that happens before one thinks about enabling trace events. How usual is that we _expect_ something to fail? Deeper debugging usually happens after we have noticed the issue. I'm not sure if there is an equivalent to signal about a problem without expecting it to happen. Is that -ETIMEDOUT being converted to some message somewhere? > > And, keep in mind the false positives I mentioned in the coverletter. --=20 With Best Regards, Andy Shevchenko