Message ID | 20221024234850.4049778-1-caleb.connolly@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp736615wru; Mon, 24 Oct 2022 18:07:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4lU6HauSxnX+Dv4vnXKIILa6aGAOdr6a1kUBfmGUm9kJjT9c/rTK5zg3btyt2T+oTB3l+q X-Received: by 2002:a17:907:3f95:b0:7a2:36c7:31bd with SMTP id hr21-20020a1709073f9500b007a236c731bdmr11346249ejc.353.1666660027892; Mon, 24 Oct 2022 18:07:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666660027; cv=none; d=google.com; s=arc-20160816; b=iLhkL/dc3hQ3bUycjoZDl4HPlCW+SIWlkxrt5fQF29BhkZd0oCCDQO2p/s3hWJs2zN alDLKf7MhS6YwNhBPHqY+9SN8m/ARnccghcsmYpRoflMJGZnoEZ0lXUHXXxT/mNzwSBX ChkC7Ku6BrzDvKKjGJozuBvOJjXj0og2Mp24cLEq15O/jK0GYUt/I8KDl/OYh9fLBnSO qN7aYbf+HvwTzVnYQMA4B2wxPDVv2MlimF/gHHDWEftmm93IabJORVyhzSt6Vukp3XET qa3+RMc55PargmGH8NPgHEUUSHuk8EH1L5e1yL/TmSAWEmXFnpbRYORsV8xSHPeW+mJU mG4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=INM0X9nAcAvNb9TJaNUKsyqVPgEHr1UlnG5q98DRrSI=; b=SvGK+uEDmqJSLdEA/YPHCzsRA3VhROibRw+A6ELU+h30tM+RpVlSFyNzp9GqDEnm69 ZiquW/n7H+tRYJmhYPF/pnhQi8X7sW8NgbEazdr2RlElvG8bT/RMCfDuCsJc8g7xwsYD UhHJB1kuaT4g3jmojL6ReFTuAhWJYguDIWjQSw3NcQdRPa7GFgL5JdgKSbsoc9r9g0qI nfwyq3n+yLA7ROD5rbCIXx1/rXCrJV/zszoLBfaTe7hU/0nb9PYYJI4f83Hi9IqbliYB pGs+guSexOkr7EJi9xRqRZlLUAnBFBNOdyVWhOfjUasFSUGl2PLq5sM6S3reendeeI77 Nitg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=t5GVk+k5; 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=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x22-20020a1709064a9600b0079fc462e3e6si1054165eju.398.2022.10.24.18.06.44; Mon, 24 Oct 2022 18:07:07 -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=@linaro.org header.s=google header.b=t5GVk+k5; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229909AbiJYA73 (ORCPT <rfc822;pwkd43@gmail.com> + 99 others); Mon, 24 Oct 2022 20:59:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229841AbiJYA6l (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 24 Oct 2022 20:58:41 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D69B1D52E1 for <linux-kernel@vger.kernel.org>; Mon, 24 Oct 2022 16:49:06 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id k8so9717088wrh.1 for <linux-kernel@vger.kernel.org>; Mon, 24 Oct 2022 16:49:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=INM0X9nAcAvNb9TJaNUKsyqVPgEHr1UlnG5q98DRrSI=; b=t5GVk+k5k+51LqxpwlfF1A3PiSI603YNrmNPV2GMBI1fqcXRXlT7FCTqMmWDzASAV7 JUrulPot3hiZ0lA84kB9v71cJDZg3Yuia0oc9owu5BKeHdVyDpehosmMfGkEqu7+yYYU /SMSVd3I7JvUE2/s+UsvuYlR9GC0BONbOSTAgpyNJUKW+THukQNbzzqzjy+KjxWriWtS x5p5wSaPlw7O5Aeyy0xDd+V2qUePfoCcLNtytZrAH/01i1SFeaKWqbGtMW02IjzwGfKq T9xJZkw2s4WU3mMtNr/HykQtRCd5xR7qD0A1Hknjz5hvzDe4K40P8dONgbtG8OoLajg5 Kghg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=INM0X9nAcAvNb9TJaNUKsyqVPgEHr1UlnG5q98DRrSI=; b=e5MxRVh7MgL1gJyLzq5iXZ5qMQj7J/1AYctZDlbd0VF3THabu+jH6/sOLGByroSi8k JMvK+J4IdAb3/reGQ4Iv/OM/VJj1FMhF2zrVriLhsh0IFS/7sL4TdwJrw01E1hqTpoVP y2kyRd990n2DJJ1l7AI/rxwHRoI2OGdIiguWzyMqLyi8k1oStLba8xSTSgVRCZo75Msd bBWgzjvLFPRiZs+Ad6aWEl2N27Cv/IhoLfr412qQs2y06m/Tn6U2M1bgVvnf1JVjhiSX mw5fPsyRZauwxvLcWr+9vpNyGZyKgg6SFgY4syLTz1Z7f+eJ7UBKfqPmqmU1qczqrjjh Qdqw== X-Gm-Message-State: ACrzQf2CiaCGCtYGqQo0KxN8iSRhBrLppAyIT2a1pqAuYjNOz+Ecggrm lTtBN5vs10OxeKmjq7lTfAyKfg== X-Received: by 2002:a5d:5a82:0:b0:224:f744:1799 with SMTP id bp2-20020a5d5a82000000b00224f7441799mr23154371wrb.582.1666655344946; Mon, 24 Oct 2022 16:49:04 -0700 (PDT) Received: from localhost.localdomain (cpc76482-cwma10-2-0-cust629.7-3.cable.virginm.net. [86.14.22.118]) by smtp.gmail.com with ESMTPSA id iv13-20020a05600c548d00b003b4fdbb6319sm9783809wmb.21.2022.10.24.16.49.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 16:49:04 -0700 (PDT) From: Caleb Connolly <caleb.connolly@linaro.org> To: Alex Elder <elder@linaro.org>, "David S . Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Jami Kettunen <jami.kettunen@somainline.org> Cc: Caleb Connolly <caleb.connolly@linaro.org>, Alex Elder <elder@kernel.org>, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH] net: ipa: don't configure IDLE_INDICATION on v3.1 Date: Tue, 25 Oct 2022 00:48:50 +0100 Message-Id: <20221024234850.4049778-1-caleb.connolly@linaro.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747619705326288558?= X-GMAIL-MSGID: =?utf-8?q?1747619705326288558?= |
Series |
net: ipa: don't configure IDLE_INDICATION on v3.1
|
|
Commit Message
Caleb Connolly
Oct. 24, 2022, 11:48 p.m. UTC
IPA v3.1 doesn't support the IDLE_INDICATION_CFG register, this was
causing a harmless splat in ipa_idle_indication_cfg(), add a version
check to prevent trying to fetch this register on v3.1
Fixes: 6a244b75cfab ("net: ipa: introduce ipa_reg()")
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
---
This will need to wait for Jami's Tested-by as I don't have any v3.1 hardware.
---
drivers/net/ipa/ipa_main.c | 3 +++
1 file changed, 3 insertions(+)
Comments
On 10/24/22 6:48 PM, Caleb Connolly wrote: > IPA v3.1 doesn't support the IDLE_INDICATION_CFG register, this was > causing a harmless splat in ipa_idle_indication_cfg(), add a version > check to prevent trying to fetch this register on v3.1 > > Fixes: 6a244b75cfab ("net: ipa: introduce ipa_reg()") Actually, the bug first appeared long ago. This commit: 1bb1a117878b9 ("net: ipa: add IPA v3.1 configuration data") marked IPA v3.1 supported. But it did not update the code to avoid accessing the IDLE_INDICATION register for IPA v3.1 (in ipa_reg_idle_indication_cfg_offset()). That being said, we have no evidence that it caused harm, and until we do I'd rather not try to fix the problem that far back. The commit you point out is the one where we actually start checking (and WARNing), and I think it's reasonable to say that's what this fixes. > Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> > --- > This will need to wait for Jami's Tested-by as I don't have any v3.1 hardware. I would very much like to get a Tested-by tag. But from my perspective, this patch looks good. Previously offset 0x220 was used, even though it was not well-defined for IPA v3.1. This is a bug fix destined for the net/master branch. Reviewed-by: Alex Elder <elder@linaro.org> Thank you. > --- > drivers/net/ipa/ipa_main.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/net/ipa/ipa_main.c b/drivers/net/ipa/ipa_main.c > index 3461ad3029ab..49537fccf6ad 100644 > --- a/drivers/net/ipa/ipa_main.c > +++ b/drivers/net/ipa/ipa_main.c > @@ -434,6 +434,9 @@ static void ipa_idle_indication_cfg(struct ipa *ipa, > const struct ipa_reg *reg; > u32 val; > > + if (ipa->version < IPA_VERSION_3_5_1) > + return; > + > reg = ipa_reg(ipa, IDLE_INDICATION_CFG); > val = ipa_reg_encode(reg, ENTER_IDLE_DEBOUNCE_THRESH, > enter_idle_debounce_thresh);
On 25.10.2022 02:48, Caleb Connolly wrote: > IPA v3.1 doesn't support the IDLE_INDICATION_CFG register, this was > causing a harmless splat in ipa_idle_indication_cfg(), add a version > check to prevent trying to fetch this register on v3.1 > > Fixes: 6a244b75cfab ("net: ipa: introduce ipa_reg()") > Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> Tested-by: Jami Kettunen <jami.kettunen@somainline.org> > --- > This will need to wait for Jami's Tested-by as I don't have any v3.1 > hardware. > --- > drivers/net/ipa/ipa_main.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/net/ipa/ipa_main.c b/drivers/net/ipa/ipa_main.c > index 3461ad3029ab..49537fccf6ad 100644 > --- a/drivers/net/ipa/ipa_main.c > +++ b/drivers/net/ipa/ipa_main.c > @@ -434,6 +434,9 @@ static void ipa_idle_indication_cfg(struct ipa > *ipa, > const struct ipa_reg *reg; > u32 val; > > + if (ipa->version < IPA_VERSION_3_5_1) > + return; > + > reg = ipa_reg(ipa, IDLE_INDICATION_CFG); > val = ipa_reg_encode(reg, ENTER_IDLE_DEBOUNCE_THRESH, > enter_idle_debounce_thresh);
Hello: This patch was applied to netdev/net.git (master) by Jakub Kicinski <kuba@kernel.org>: On Tue, 25 Oct 2022 00:48:50 +0100 you wrote: > IPA v3.1 doesn't support the IDLE_INDICATION_CFG register, this was > causing a harmless splat in ipa_idle_indication_cfg(), add a version > check to prevent trying to fetch this register on v3.1 > > Fixes: 6a244b75cfab ("net: ipa: introduce ipa_reg()") > Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> > > [...] Here is the summary with links: - net: ipa: don't configure IDLE_INDICATION on v3.1 https://git.kernel.org/netdev/net/c/95a0396a0642 You are awesome, thank you!
diff --git a/drivers/net/ipa/ipa_main.c b/drivers/net/ipa/ipa_main.c index 3461ad3029ab..49537fccf6ad 100644 --- a/drivers/net/ipa/ipa_main.c +++ b/drivers/net/ipa/ipa_main.c @@ -434,6 +434,9 @@ static void ipa_idle_indication_cfg(struct ipa *ipa, const struct ipa_reg *reg; u32 val; + if (ipa->version < IPA_VERSION_3_5_1) + return; + reg = ipa_reg(ipa, IDLE_INDICATION_CFG); val = ipa_reg_encode(reg, ENTER_IDLE_DEBOUNCE_THRESH, enter_idle_debounce_thresh);