Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp386071lqd; Wed, 24 Apr 2024 05:42:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWp5+OR9wqNA75xPq4PT+WImjq2GWiwiIPUq8kpTG/ITs+chPNgR28JsKJdhj9Qss4dBsnv1vWC7oRFg9uR9eKNfx871UUIWqwRN4CesA== X-Google-Smtp-Source: AGHT+IHnLjxhjbpuWs7D/Fc8j+cF4AiBnV3n6mDn7C7RrOIZ9W92BhH7AUBdv7NC8u33GizX8bRT X-Received: by 2002:a05:6a20:c90d:b0:1aa:5ca9:c565 with SMTP id gx13-20020a056a20c90d00b001aa5ca9c565mr2691371pzb.8.1713962531554; Wed, 24 Apr 2024 05:42:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713962531; cv=pass; d=google.com; s=arc-20160816; b=eEDY6mmQyncDs3RVFPFcL9wJWNaptyW5WPWEuErwEl1PsDgiMwMI45WWN9dTynkmSl f8H0X5UgwDYT034dEqlYZvtN2utRM6v0bLYtbdia6U4uCfZ1Oe6pyhC0mIxiyhcO1ta1 X5A7Vuo/ykSpBWpUCA0KAmsQzZY3zjir7HumaUtLT2oK/bhYPWNcEyqyE1Wq3o7JUXvS wQnBQctPANQiHQaDT11of3iXAsqIoQrlkeW0TJhWE4jC9jGt0S4LwA+v+GauYkrG5KPV TpxJNdVtAP50ceKByhYCVTFvSKowGRtROFIpjpZXT9OFTK0hMHLGY9gqENOMcyr8OW/F Igkg== 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=RHZIct1D0pwRcJc5TIZbntuTMJlJZEOfxhjoV++WJSc=; fh=YWhSJlj0OGTHoPMurbHPTTncQJq1I/KZinMIuOOebOE=; b=ZklVQaRM5kndVyHOX1nIsEhr14Drcwm15TJ+keh+TcmRlZ2rKTn33IRe3E8+CQOgvZ dUM6CWz2sDbTj7uXn5uwDF30lTMxhXah3nCJn88KcYqf+4y+/YFg/kvtk74Zh0PtGRB/ l6x5w+SsATy5Gy5KcK2m1IjnkWJiM2r2ckOcEPKeOKGsvvGXN88SM2wgiqFgSYADqJMw n5CpCYGaHPNEEjqVdrB7+N+XqzaclpUdSb498Vwqi309Cv+K6uWOxxkVls+bvTWbZhez MiOMv5UonzQaLkl8ra5k+cxepXPwlQJA34GiN8l1/46Mo4e9QbxKg9P5Z3l+nbc9eoOE eMYg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="ZnMv5Y/3"; 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-156884-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156884-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id u7-20020aa78487000000b006ee7e0eadadsi11173915pfn.228.2024.04.24.05.42.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 05:42:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-156884-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="ZnMv5Y/3"; 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-156884-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156884-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 2550B2842B1 for ; Wed, 24 Apr 2024 12:42:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2C31515B128; Wed, 24 Apr 2024 12:42:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZnMv5Y/3" Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) (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 5741E1422AF; Wed, 24 Apr 2024 12:41:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713962521; cv=none; b=K7or0xg1+9/ZLn3XVNaxfVlAFfUOXzspx1bPh/qvNEokhd4LuyZ39kspeUDMCBEHrceisp/AzIRS2kL6tyVy0N+d3eSq3m4qKItzvBqNFsHzrPhWOh2nCh3epxgUHn5nUha1Cckk2B803CcKYLjfZkVks/5/LnYxTQihiGWe1Gk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713962521; c=relaxed/simple; bh=nyNhqyLFjqr0dCw+Re85psoVUJBi/GoV8lGY2doOudk=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Content-Type; b=Gvzg5vQNaNAyH+ZipPIAC8hscc2JZoCWtuRRyqzXxlj/L5stuh13vnJTOXR413zWPaIGv8BTSuWbYZPPqiii93ZBb4MYOaJHDWwPNonb1AKXdgIC/sss4/ZAdgRtjCSWa8afyra/eSQpDSJ3KtC15AYi0Iyp0i7HO/UbmV8+fVs= 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=ZnMv5Y/3; arc=none smtp.client-ip=209.85.218.42 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-ej1-f42.google.com with SMTP id a640c23a62f3a-a55b3d57277so424122466b.2; Wed, 24 Apr 2024 05:41:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713962517; x=1714567317; 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=RHZIct1D0pwRcJc5TIZbntuTMJlJZEOfxhjoV++WJSc=; b=ZnMv5Y/3J5YJMm6xh4LIPGI7WwkxL+dCr4wxp1sOnjmWspBZ7nep5v3N4/6yKnTU8I ETAXJmNt02AfHs/TQuVhUDm9Pc5RfHXCBcDO1N6gJqgTX0ZLJHStvH8TnIJlraJeIxs9 1cFGOHJdC12U1P6YsXwjLmzM3944JbvwJZya7d1cQPDylrFFsTLvgJmpN4b75QnoxGQE UzYHiWCscPP/cEEU2XCJZgR8TbenA08FbQVLPsLHad5yTJQie4yDnrvYK9RjeffKN70D kKO2LcImii7W+Jd5jRd9AO5ff6FRZqjxM3GFhbiOmzSbcR4njJOeWKsl3tJFlB75rPT3 of9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713962517; x=1714567317; 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=RHZIct1D0pwRcJc5TIZbntuTMJlJZEOfxhjoV++WJSc=; b=ZW5GasuOoS3yx7QwHHdG/7qaT0z3MLslUOsbZaNot/nLT0mwFWqGwfciooi1803f0J I9vZ5mzITYd1wuHAyJFiRM1u44NXl7t0UvOjyOcUIWVUo604bGfsKgGVjn5NXRNh9fw1 KL9g/mMtu8sQXoZzVAnxIaw3jhVAiLVhvE47O/8zIBJjEJiaCn+89UB20lOzVAf9hM6V OpqrC3mxjQxXjuBrmdlvX14geVUSvrOG3NW3LR7eUJhO0VfRDMSoa/gZiIVD139wRUUF B3IGQXcr+dD8f+69PLnnYmb7+zJBRKi9X1XqUanhh0jxOSw0vvz8oi6KpgMFm4XQYGPW hZkg== X-Forwarded-Encrypted: i=1; AJvYcCUPIv9newTI4wWOTA/+yKUoVo4SwdJhxk4s1Y7EoPTSEvKHlndOpIhuQbgldO++aaZMklo//yQww0BjccwoLv4nvm8wMWb53JOPYfvQ/ADKAMEpXaTEJ9wG4PksWd3sAHCgt+qH/uKiY24SLqFAoAOOmJS6V/lcPPZs5kwDtgU3iBSyJCadiigU4ZqdtEl+lXqG5yUXBDdFtVy+s0R1GZ+joD9ARza1DDwAYhnUJoolvGBaH+yZwNNesl7kkVsbEunofDiAeHs1GHWCV21S6WXDU4UsjR4KcaHIE55UC+TEUzER X-Gm-Message-State: AOJu0Yx+NdjKZDgEMqlkt8nGCDmH7etNG61IocU4mowXrLL+5JWvY85h 6c0R4CW5ZlG6n9L8dEUQTbUkTlhEjURU3e4aPRiE/oryaA9XW+OwjMkKvyrF44+dLZsdt7ujjBr 9bKpqaL6EeTEOsrvLZo+SY07WAVA= X-Received: by 2002:a17:906:7716:b0:a58:873e:a058 with SMTP id q22-20020a170906771600b00a58873ea058mr1515393ejm.27.1713962517515; Wed, 24 Apr 2024 05:41:57 -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:41:21 +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 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 tha= t > > > 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 the > > > 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 the= 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 har= der 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 locks > 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. > And, keep in mind the false positives I mentioned in the coverletter. --=20 With Best Regards, Andy Shevchenko