From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f169.google.com (mail-dy1-f169.google.com [74.125.82.169]) (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 35A3534DCC7 for ; Fri, 16 Jan 2026 06:24:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768544685; cv=none; b=QQdeYtJ9qVCuJ8lopCRYSsXglVSpb9ZJS7OT6V3bdN5ewGU0uqP5mJ6PM+Wg/Sgvybxl2ecLDRX33tuItkEver9kZh2wAN6jUAhceDHab/YaSuSgXjY388oQI2a6Y3p6Ln4TA76F8HUIWJjOnezEsRPqKI/kpftvUj0Up5Ui2Dc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768544685; c=relaxed/simple; bh=dv99jy1AxC6m8gi7Y11or4/z6BHQMZw1mpON34cvDW8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=DZnwsBPOApmplBPBjaaCrLsBzfvsMmyYC27LKBbKiaZIZ5p2vN7Dq95iQ27hR4z7TBIPiEeLKc2S2Dbu38cEGYZmsPMiHv6bTTKyuEdv/hqaotJEVsbPC0UZY46kt7KLfLyf55nBmjQQZYZWeciNf8wOFg4yPgQFR8DhWKz96fc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=HEIhDVod; arc=none smtp.client-ip=74.125.82.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HEIhDVod" Received: by mail-dy1-f169.google.com with SMTP id 5a478bee46e88-2ad70765db9so273698eec.1 for ; Thu, 15 Jan 2026 22:24:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768544683; x=1769149483; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:sender:from:to:cc:subject:date:message-id:reply-to; bh=nVGIie6AarXFU7qbhP4pdPRIt209CVV4v5qZm8/x28o=; b=HEIhDVodlipTluSGh7U7rnxXJ36wckcXvxHBhPKANpMb5gIbGdRMiWfu+H1gwIQsXe +BYojtHftbVJobuqIETLWWPty0zoAmsedrP0Httr2yR8xlHwB0ycAaQ1a3t8TSSAzbgN IJV4Jmoy1/ZZMqmnnzhnMSlUUGxo9DduXkwgQWFF9kiL929qFAGkIt6rfeeQbG/E9uj3 X+DBYo8Ht8cfNL6Hy+nt5pGE7TbBeJEdbor2aXBeDu+/017qsl+IPunsyfGqqtlRKHOs AdfB1rba391wcDSn7LCoXVXGJ1UznVpyHQ7oYVmpqFcJsCtQP3vJjPsz+7ZBYGViG6GB rmlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768544683; x=1769149483; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:sender:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nVGIie6AarXFU7qbhP4pdPRIt209CVV4v5qZm8/x28o=; b=vla/pjhG9FtM/2C2ii2e3gjzPcx8bizI1Z0SMqfFMjelZP7f+0Y0wwZiUOxwEto6qJ 46Xp08K3uYpVUzjc21N1aYEH52fALkt5eKmYu0XPQeLOx1vAEu9XwCiar6DqB8uHsL5Z apeLg46ThRCdhIFLqAJwOgyxQAzii5b+lcUCUz6p31Zf+0CSgDN1qhTqfSmSIhDCEVvs 57EwHfuBx5GTpjsMfD4k/vjmMvCtSkdssIE4/PVDYjGhmL/TcgGb0EkhaxoZFIB9es9r ZbZFVrHdVL5iiIsr3wtoWWVEzDY9N+mhGpjww/vLnX7lcWAlRzu4h0yOnCepPktM6r5P +PCw== X-Forwarded-Encrypted: i=1; AJvYcCUXrPAxKiID9+kbzeTHV4erNk5c20XJlBt/cjP9JX+vGZc5XYU1opOj1LzbI+FR+l2cX7AySQT4J+m/aUM=@vger.kernel.org X-Gm-Message-State: AOJu0YwL6+foyRH/zOnGH1YFNsUnKiYRoHzmIT/KCRdcltp7wBskFBbb aMK8HKLB/L+zJfOLxMJoBvmqitps4Sz8w44mAoBXvVNorchzXZwcjulynlKfzA== X-Gm-Gg: AY/fxX52MMM4h+4kUq0Nfzr3b4sK42om6//f8cn1ip3F4CN/Ugj3pgXfERZiS7VWrK8 /coGZcmpp1VuTyZ6bZeVYtZ3efxET7qbtSpruRaERfhwWBu+G10NB57qWJ/eg09bEORhBylEgKH M6Tpp26iA0bihg+Zwml9V2Hcd7Nqtke3DhP2+CbADXLrxn1NE7uUYr8oEncy3IhXr7jUTAtsePk Z01wr3zQ8hsJ/qROvpK2T7udOXf62eGCd0oKt6sJEBIT+8DOb1S3wEScQXqx5KJMc9qrm7pOrWf WBrOxWX07noRRyL/6TRz2iKTHs7cmG8Ltw5O4NUJGKFwsVbkGu0XcxhDZnfQoCCHHSRplU5kLvj 9AYIjDCaMXIbLK/RMp5A/WiYuS1dIqE6eGNzFM+6MBMRPRS+mcDcROSAev4KcMPTXWinLE3oNUW kTHTzgi4LYhYa5VqJYJzYTDb16Oo8ToFHk80ZFOI0Lm6FG7poj89ICECp7ijPY X-Received: by 2002:a05:7301:1687:b0:2b0:4902:c0a3 with SMTP id 5a478bee46e88-2b6b5002fb8mr1698725eec.20.1768544683178; Thu, 15 Jan 2026 22:24:43 -0800 (PST) Received: from ?IPV6:2600:1700:e321:62f0:da43:aeff:fecc:bfd5? ([2600:1700:e321:62f0:da43:aeff:fecc:bfd5]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2b6b34c0e22sm1288205eec.6.2026.01.15.22.24.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 15 Jan 2026 22:24:42 -0800 (PST) Sender: Guenter Roeck Message-ID: <39b48803-e236-4acc-84e9-18162770f9ae@roeck-us.net> Date: Thu, 15 Jan 2026 22:24:41 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/3] hwmon: spd5118: Do not fail resume on temporary I2C errors To: TINSAE TADESSE Cc: "linux-hwmon@vger.kernel.org" , linux-kernel@vger.kernel.org References: <20260110172003.13969-1-tinsaetadesse2015@gmail.com> <2740c3ab-7cb0-4931-81a2-30b85e8615f9@roeck-us.net> Content-Language: en-US From: Guenter Roeck Autocrypt: addr=linux@roeck-us.net; keydata= xsFNBE6H1WcBEACu6jIcw5kZ5dGeJ7E7B2uweQR/4FGxH10/H1O1+ApmcQ9i87XdZQiB9cpN RYHA7RCEK2dh6dDccykQk3bC90xXMPg+O3R+C/SkwcnUak1UZaeK/SwQbq/t0tkMzYDRxfJ7 nyFiKxUehbNF3r9qlJgPqONwX5vJy4/GvDHdddSCxV41P/ejsZ8PykxyJs98UWhF54tGRWFl 7i1xvaDB9lN5WTLRKSO7wICuLiSz5WZHXMkyF4d+/O5ll7yz/o/JxK5vO/sduYDIlFTvBZDh gzaEtNf5tQjsjG4io8E0Yq0ViobLkS2RTNZT8ICq/Jmvl0SpbHRvYwa2DhNsK0YjHFQBB0FX IdhdUEzNefcNcYvqigJpdICoP2e4yJSyflHFO4dr0OrdnGLe1Zi/8Xo/2+M1dSSEt196rXaC kwu2KgIgmkRBb3cp2vIBBIIowU8W3qC1+w+RdMUrZxKGWJ3juwcg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5P7Cj687WuNMC6CcFd6j72kRfxklOqXw zvy+2NEcXyziiLXp84130yxAKXfluax9sZhhrhKT6VrD45S6N3HxJpXQ/RY/EX35neH2/F7B RgSloce2+zWfpELyS1qRkCUTt1tlGV2p+y2BPfXzrHn2vxvbhEn1QpQ6t+85FKN8YEhJEygJ F0WaMvQMNrk9UAUziVcUkLU52NS9SXqpVg8vgrO0JKx97IXFPcNh0DWsSj/0Y8HO/RDkGXYn FDMj7fZSPKyPQPmEHg+W/KzxSSfdgWIHF2QaQ0b2q1wOSec4Rti52ohmNSY+KNIW/zODhugJ np3900V20aS7eD9K8GTU0TGC1pyz6IVJwIE= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 1/15/26 05:50, TINSAE TADESSE wrote: > On Wed, Jan 14, 2026 at 5:23 PM Guenter Roeck wrote: >> >> On 1/14/26 05:07, TINSAE TADESSE wrote: >> ... >>>>> Hi Guenter, >>>>> >>>>> I tested changing the i801 SMBus controller to use >>>>> SET_LATE_SYSTEM_SLEEP_PM_OPS() instead of >>>>> DEFINE_SIMPLE_DEV_PM_OPS() as a diagnostic experiment. With this >>>>> change, spd5118 resume failures (-ENXIO) >>>>> still persist, suggesting PM ordering alone is insufficient and other >>>>> firmware interactions are involved. >>>> >>>> How about the problem in the suspend function ? Is that also still seen ? >>>> >>>> Also, the subject talks about -EIO. Is that still seen ? >>>> >>>> Either case, can you enable debug logs for the i801 driver ? >>>> It should generate log entries when it reports errors. >>>> >>>> Thanks, >>>> Guenter >>>> >>> >>> Hi Guenter, >>> >>> Thank you for the questions. To clarify: >>> >> Please do not drop mailing lists from replies. >> >>> 1) I have not observed any failures in the suspend path. The suspend >>> callback completes successfully, and >>> I have not seen I2C errors or warnings during suspend at any point. >> >> Sorry, I seem to be missing something. >> >> In that case, what is the point of patch 3/3 of your series which >> removes hardware accesses from the suspend function ? >> >>> 2) I have also not observed -EIO in my testing. The error consistently >>> reported on resume and subsequent hwmon access is -ENXIO. >>> Earlier references to -EIO were based on assumptions rather than >>> observed logs, and I should have been clearer about that. >>> >> >> Thanks for the clarification. >> >> Guenter >> >>> I am enabling debug logging for the i801 driver to collect more >>> concrete evidence of controller state during resume. >> > > Hi Guenter, > >> Sorry, I seem to be missing something. >> >> In that case, what is the point of patch 3/3 of your series which >> removes hardware accesses from the suspend function ? > > You are right to question this, and I agree that it needs clarification. > > Patch 3/3 was originally proposed under the assumption that the resume failures > were caused by spd5118 performing I2C transactions while the > controller was not yet available, > and that removing hardware accesses from the suspend path might > mitigate the issue. > At that point, I assumed the problem was limited to the resume callback. > > After enabling detailed i801 debug logging and testing with > SET_LATE_SYSTEM_SLEEP_PM_OPS() in the i801 driver, > it became clear that this assumption was incorrect. The controller > itself reports "i801_smbus: No response" > both during suspend and immediately after resume, and spd5118 merely > propagates the resulting -ENXIO. Outch, that really hurts, because it means that something is seriously broken in both the suspend and resume path. The device _must_ be accessible in the suspend path. Otherwise there is no guarantee that the device is accessible for normal (pre-suspend) operation. After all, someone could run a script reading sysfs attributes in a tight loop continuously, or the thermal subsystem could try to access the chip. That would suddenly start to fail if something in the device access path starts to be suspended while the underlying hardware is still believed to be operational. I could imagine some hack/quirk for the resume path, such as delaying resume for some period of time for affected hardware, but I have no idea what to do on the suspend side. We can not just drop device writes during suspend because some broken hardware/firmware does not let us actually access (and thus suspend) the hardware anymore by the time the suspend function is called. Guenter > This indicates that the issue is not caused by spd5118 suspend/resume > behavior, but by the unavailability of the > SMBus controller due to platform or firmware interactions during > s2idle transitions. > > Given this, I agree that patch 3/3 does not address the root cause and > does not provide a justified improvement. > I am therefore fine with dropping it. > > Thank you for pointing this out. >