Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3599724pxp; Wed, 23 Mar 2022 01:50:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztEjcqdg64KfyWQ4g0/BnxOk8FAZjwn83iKbbh5TjfuRsEkaJ+oav68SAZLWPNKDeAgutb X-Received: by 2002:a05:6402:2553:b0:418:ff6a:ca66 with SMTP id l19-20020a056402255300b00418ff6aca66mr30987682edb.273.1648025440301; Wed, 23 Mar 2022 01:50:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648025440; cv=none; d=google.com; s=arc-20160816; b=XGDgAV83/uMUZFOZBAQUXxmAwJ3htwig7GGQygKxSnRCwMR1DmltdnTS6Camzyg14H 3edcOvyXgzcbyd7mHsMqc48TnW9HQDKtBpgoidOL0efyExiHYE8fHw18h50rHeEJho7s 2buaoSdLYDXhVym7StXffmxiew1kk2T718ir2bSCaiWD3Lr7k1SMIQV4yzVM4xJ2cDGK UiF2RBzugiDNPJTVHbUzqc1Q0N52g7dZHBsOOvLPTg/X7wCHQE/UUlGrXfko66RAofc7 sGlwY6ZNMIuo2GhxLKB64kvNpa0/KDA4KxzDRLlxjiAxyu5imVYjheCjgK93SCD9zCht aQqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=4WJ9d44cuvV06rIk5CFmH9Tb4Xt1bmmO3LGUdfRjfL0=; b=c3dk4DfZ6KPnwUEQPnXlZ9nfsk3iT3/kAUmxkQ1bLm4YoODOZUAIzbS6FDXXhBFYgt zfxleTcs0DexgOFID2oxe1T0r7jczTvV1LWHmJmiui06q1rIlQqZdchWk1L15ZaN8yti Aetsj37leLg6QSq4hwQVa92OlR6RYXRn8T2MgyBoSn9dMhuCFAw+1oQ/O4x2nylqpmtq HJRFpsO0K4yXetooyK+Ax8szecPcxrKASUKNl42VQLhzb6d78tcMuN1KSIxMvfFqO6zB L2kmHx24hIabwKlWgh9wQvfUsmVqxA29h+P7W1q3db42mZbqhZOvzj0T7kbfZwkQPaQE gi6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=QGdT7wfv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmx.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f2-20020a17090631c200b006df76385d60si12249982ejf.512.2022.03.23.01.50.15; Wed, 23 Mar 2022 01:50:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=QGdT7wfv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmx.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239895AbiCVRxq (ORCPT + 99 others); Tue, 22 Mar 2022 13:53:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234579AbiCVRxn (ORCPT ); Tue, 22 Mar 2022 13:53:43 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7D6E8D6AF; Tue, 22 Mar 2022 10:52:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1647971499; bh=8I3GWS6pWMeWlp9zUKzJSs1LzgYKqg1PVBPAq/Lm0LU=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:References:In-Reply-To; b=QGdT7wfvtbx7EEq50BWSNOASiB8Ii9nryA7qMItQPCg349ur6bRln9+OctCQWWaFw sKEmfK1ssCrodaywip/zGtr1TH9dzGkPDga3DON2C8SDJrjv3Q4Yk4TNwFde19j3Rf TgNQQ5wqXK/XhOkavE7/CibOdmg6poxuBj+4PKko= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from longitude ([5.146.194.160]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MGz1V-1nJIfA2WJf-00E1fI; Tue, 22 Mar 2022 18:51:39 +0100 Date: Tue, 22 Mar 2022 18:51:35 +0100 From: Jonathan =?utf-8?Q?Neusch=C3=A4fer?= To: Avi Fishman Cc: Jonathan =?utf-8?Q?Neusch=C3=A4fer?= , Tomer Maimon , KWLIU@nuvoton.com, Tali Perry , Linux I2C , Andy Shevchenko , Benjamin Fair , Krzysztof Kozlowski , OpenBMC Maillist , JJLIU0@nuvoton.com, Lukas Bulwahn , Tomer Maimon , devicetree , bence98@sch.bme.hu, Arnd Bergmann , sven@svenpeter.dev, Rob Herring , Avi Fishman , Tyrone Ting , yangyicong@hisilicon.com, semen.protsenko@linaro.org, jie.deng@intel.com, Patrick Venture , Linux Kernel Mailing List , Wolfram Sang , kfting@nuvoton.com, Tali Perry , olof@lixom.net Subject: Re: [PATCH v3 08/11] i2c: npcm: Correct register access width Message-ID: References: <20220303083141.8742-1-warp5tw@gmail.com> <20220303083141.8742-9-warp5tw@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="xEONTgdtFn65elzz" Content-Disposition: inline In-Reply-To: X-Provags-ID: V03:K1:0rjSZOfEJikFn7A+rHnQNa8z+5/c3I2xEC7rEjobVZzMEAraX6e HuMvVgLJ7P7UCggzPmwigfl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WY+c2+bSxnGaaKseQQI8/ct2 Zj8kg9vRi6LoMTwQqcmFeiygjPCjDlvlmOoRt+DQXl064e05wX+NhPPPjxQrNrZOEp39zmCOD N+S5rVXt0hWElZmwZoeQmKmon7b/RY0U7Mm+cb34+sYMJw6TcI/nlDcxTLV3hTYPpD5ZCfydF K04Vrx1fA5aJNtueyyXXjmIEnivAYonb2LtK4pSM42REOm/YQ0bD5dqMx8koNn3SuKmT/StPn Evc2hracwZPBr8= X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --xEONTgdtFn65elzz Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 22, 2022 at 07:18:34PM +0200, Avi Fishman wrote: > On Fri, Mar 4, 2022 at 10:42 PM Jonathan Neusch=C3=A4fer > wrote: > > > > Hello, > > > > On Thu, Mar 03, 2022 at 04:15:18PM +0200, Andy Shevchenko wrote: > > > On Thu, Mar 03, 2022 at 02:54:27PM +0200, Tali Perry wrote: > > > > > On Thu, Mar 03, 2022 at 04:31:38PM +0800, Tyrone Ting wrote: > > > > > > From: Tyrone Ting > > > > > > > > > > > > Use ioread8 instead of ioread32 to access the SMBnCTL3 register= since > > > > > > the register is only 8-bit wide. > > > > > > > > > > > Fixes: 56a1485b102e ("i2c: npcm7xx: Add Nuvoton NPCM I2C contro= ller driver") > > > > > > > > > > No, this is bad commit message, since you have bitwise masks and = there is > > > > > nothing to fix from functional point of view. So, why is this a f= ix? > > > > > > > > > > > > > The next gen of this device is a 64 bit cpu. > > > > The module is and was 8 bit. > > > > > > > > The ioread32 that seemed to work smoothly on a 32 bit machine > > > > was causing a panic on a 64 bit machine. > > > > since the module is 8 bit we changed to ioread8. > > > > This is working both for the 32 and 64 CPUs with no issue. > > > > > > Then the commit message is completely wrong here. > > > > I disagree: The commit message is perhaps incomplete, but not wrong. > > The SMBnCTL3 register was specified as 8 bits wide in the datasheets of > > multiple chip generations, as far as I can tell, but the driver wrongly > > made a 32-bit access, which just happened not to blow up. > > > > So, indeed, "since the register is only 8-bit wide" seems to be a > > correct claim. > > > > > And provide necessary (no need to have noisy commit messages) > > > bits of the oops to show what's going on > > > > I guess it's blowing up now because SMBnCTL3 isn't 32-bit aligned > > (being at offset 0x0e in the controller). > > >=20 > Hi Andy, > After this clarification can you please acknowledge this specific patch? > If you think there is a better way to describe this, can you propose one? To be honest, I think it's probably best to include all the necessary explanations in the next version of this patch, i.e.: - That the register was always defined as 8-bit in the datasheets, and so the 32-bit access was always incorrect, but simply didn't cause a visible error - How the 32-bit access caused an error now, perhaps with a trimmed Oops log as Andy suggested Jonathan --xEONTgdtFn65elzz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEvHAHGBBjQPVy+qvDCDBEmo7zX9sFAmI6DIQACgkQCDBEmo7z X9s7OQ//X2W94xxyy5YEI/+1O2hIBvmm36jDMTS3z+mAnxmeUKhEBZdn0v8d/euk JSimNGFJCDze0zmLhJK6yve/1N0Jg0IersKHikjnx06ZU4mgxG5udJKCU2W6MPVj Zp4IiXgBQ7pTDEMlgEPbT0wSjkmuiiimkjp6QWJZkyKapp3SttzUOiKX/3SeyUtZ Y1/L3txILtSnYuzlvlL5knG+KJu2Um3/BKCOEzqop+FeQr/16wEvYUWS5Ggg94kK M9uwBI9cgOhvqS+SOFoNHyPc2VIJ6zsshwz6lB8/NrRQMqrpqyjwZttderEguxNO MP96a9M7VKpytM+eEbzIZFIxSa/A0zeNqXXXQNB/K+t7Awwdhf32qD4jPRIK0JCK 2pO+hBT5XfRXmRI6f3U7X7lpSpzlR+DMLkq7nEI76rgJfN5qI87ml+WmbzIDXPFf b04x9eu6AbFeSuz0HW+F/MFwimMiTz+CKVpF7hgZEmJew7OiJT2a1bu6eTPr+4Fv pOut/60haUWiMulL9QXqbk+0gWWa8k3Mzv6DwQ0wbO/GFHkzlRfBOkMyUUXmNnho RdBd0cCISHsGLRsRkXEHgCRT67X1sadBrxcB03k91MKNNJoD4mnUr79JpFvIJidC XL4AOd2HO/z+OFq2y4K14ea8dPl1NgziCcFpC46TAKBrywMDtgg= =EGzi -----END PGP SIGNATURE----- --xEONTgdtFn65elzz--