Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp461284pxf; Wed, 10 Mar 2021 09:39:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJxjwuWNaLuByteVJ+3BfpkYtPVYMJXduGT3x9kI7tol7zBZr8XjP2GFs8CbA7aA1yk+Lhvn X-Received: by 2002:a05:6402:ce:: with SMTP id i14mr4601588edu.42.1615397954421; Wed, 10 Mar 2021 09:39:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615397954; cv=none; d=google.com; s=arc-20160816; b=R1wK1n4uZACh0Sal5BqvQXFnxf+W7cyX/itifZT4Z1bOV+sbAmd5daBLxE4N1K5a49 3OOaH0u4007Vy//C0UIFzy6eYsrjd2mk6uvNzPtepdTiexG6LAalWMMsQKKO8YuW7pa3 pmLNShfYsSP3aININyfL8aPcP0DTYufS9HVrY+87gqRE5RQGliyNNo8NUsSDGKaF1Nsv XXrmn2ZmPN4DhdUBZq4z2LaFyyCkfjD00BGBrfy/AYAyCP3uUbcGgXHyA5KNKLzSAkv8 1GP8bVe4N9GSAFFl8LGmSVW9rvephdn70/Avo8nbXMjIl5Ujf/5UumVcyaJRbHvGMlZy S9zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=o0qx1P3+0pCBpzbRfl6S1GiH0ttn2Cr7Rfh1TFUYrhQ=; b=upzais/5vyKSAw65ZIMeG2q5wnazVq6kv/kZq6mE/xCBMFEG87mC8UVWDcTwBglgIr DtIx9ioGD61pC3dWeywGZ9gyy8bSLkJFc1rGVFASMURguM9nYDFcvLu+MJmF+GDQnU2d B1bKGQ1TjYNfgegHQFa9cPRzHnXhDzh4rAuS3IWzXtRVIo6f+5ks/uWidThvZG5+ShGa E5nezKZ2o8i7vzw7Qz8WP9DF/s7sgNBtqRql6bJnnJl+C7cRyq5+4/Q5Rw6Vo5P2a8xn 7S66FJZYUpAkidwNNNh6r3CpuFzVT/pDxusBcBltIvFTjNgO6egMHeEyXXi9Z+nmMuIG PODw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Uja17BIp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jt20si26542ejb.157.2021.03.10.09.38.50; Wed, 10 Mar 2021 09:39:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Uja17BIp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S229503AbhCJRgn (ORCPT + 99 others); Wed, 10 Mar 2021 12:36:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229828AbhCJRgW (ORCPT ); Wed, 10 Mar 2021 12:36:22 -0500 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A9D1C061760 for ; Wed, 10 Mar 2021 09:36:22 -0800 (PST) Received: by mail-ed1-x52b.google.com with SMTP id d13so29366318edp.4 for ; Wed, 10 Mar 2021 09:36:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=o0qx1P3+0pCBpzbRfl6S1GiH0ttn2Cr7Rfh1TFUYrhQ=; b=Uja17BIpkiNfpDNxhJMmLhmb8CGjis7QUU3NcZ4/f3U1Qn5cTg6ox4jcC5tq0n/EN3 ykXWeo9+ZXtwb/CXKbssqJu33xOUSyOYr8gfiXneu/zi5M/TT9zLlIEGTsglPgNCdUf5 Lv1PaJZve5bvCaVruzXelkNouHd120Qv+4/EPbWqN/gPHtpT4eYiUHTosynuYl3GieVJ 29tBxIFl4NPkAQiPp18tq5V/UqxxeL6Jp7Wk7oTvUAdwpLRc9cLrh1p96GkY03RDMF0U 2ghfmrdoYKBzr5VmuHmY+Z3Fxl6hO7gP6BP+VvwxTZlBJ0rjAF++t45lqY3dmRwVC/jh iaGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=o0qx1P3+0pCBpzbRfl6S1GiH0ttn2Cr7Rfh1TFUYrhQ=; b=ZlllXIbSSjumTlLjiD3uss87Ey8yUozCLg008hrn98xv4UoV0xnOB+QKWWMuGGXw2Z NTkfdyB/NfIifbv+dWQ2yMBAMYYK6tu+1u19xQKdYtTti75gk3CXIFUNDLRffqT9tv98 saoXYm/wAAeAaPXtR1KS1FsWew2MRK069fjwHbi1N4Y1vSKa1qQ0ujEoLjvkg9dPTb5c JOv4yxdDb5IreKEA765BtjZ7qZe6hs3qDMJ7pYBnd0VXoCivk3n++ixIBGxpnqXohaHI jRHhftC8UfwgTAzM/mjyCOizKetBc+/OSsJq5xiNM9BYZ9dx1rVkj825+YbqtJq7/p6M IoWQ== X-Gm-Message-State: AOAM532DfggYVYN+2RP0DYNjPIEvVq0/85LOC4AiKyALVrpUQhV8i3en HT38ev2MmWeblxGq1XE4Z8p2SSq2io31kaMI+hhs7w== X-Received: by 2002:aa7:c3cd:: with SMTP id l13mr4530827edr.52.1615397780739; Wed, 10 Mar 2021 09:36:20 -0800 (PST) MIME-Version: 1.0 References: <20210310132321.948258062@linuxfoundation.org> <20210310132322.413240905@linuxfoundation.org> In-Reply-To: <20210310132322.413240905@linuxfoundation.org> From: Naresh Kamboju Date: Wed, 10 Mar 2021 23:06:09 +0530 Message-ID: Subject: Re: [PATCH 5.10 14/49] net: ipa: ignore CHANNEL_NOT_RUNNING errors To: Greg Kroah-Hartman , Jakub Kicinski , Alex Elder Cc: open list , linux-stable , Sasha Levin , lkft-triage@lists.linaro.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 10 Mar 2021 at 18:56, wrote: > > From: Greg Kroah-Hartman > > From: Alex Elder > > [ Upstream commit f849afcc8c3b27d7b50827e95b60557f24184df0 ] > > IPA v4.2 has a hardware quirk that requires the AP to allocate GSI > channels for the modem to use. It is recommended that these modem > channels get stopped (with a HALT generic command) by the AP when > its IPA driver gets removed. > > The AP has no way of knowing the current state of a modem channel. > So when the IPA driver issues a HALT command it's possible the > channel is not running, and in that case we get an error indication. > This error simply means we didn't need to stop the channel, so we > can ignore it. > > This patch adds an explanation for this situation, and arranges for > this condition to *not* report an error message. > > Signed-off-by: Alex Elder > Signed-off-by: Jakub Kicinski > Signed-off-by: Sasha Levin > --- > drivers/net/ipa/gsi.c | 24 +++++++++++++++++++++++- > 1 file changed, 23 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c > index 2a65efd3e8da..48ee43b89fec 100644 > --- a/drivers/net/ipa/gsi.c > +++ b/drivers/net/ipa/gsi.c > @@ -1052,10 +1052,32 @@ static void gsi_isr_gp_int1(struct gsi *gsi) > u32 result; > u32 val; > > + /* This interrupt is used to handle completions of the two GENERIC > + * GSI commands. We use these to allocate and halt channels on > + * the modem's behalf due to a hardware quirk on IPA v4.2. Once > + * allocated, the modem "owns" these channels, and as a result we > + * have no way of knowing the channel's state at any given time. > + * > + * It is recommended that we halt the modem channels we allocated > + * when shutting down, but it's possible the channel isn't running > + * at the time we issue the HALT command. We'll get an error in > + * that case, but it's harmless (the channel is already halted). > + * > + * For this reason, we silently ignore a CHANNEL_NOT_RUNNING error > + * if we receive it. > + */ > val = ioread32(gsi->virt + GSI_CNTXT_SCRATCH_0_OFFSET); > result = u32_get_bits(val, GENERIC_EE_RESULT_FMASK); > - if (result != GENERIC_EE_SUCCESS_FVAL) > + > + switch (result) { > + case GENERIC_EE_SUCCESS_FVAL: > + case GENERIC_EE_CHANNEL_NOT_RUNNING_FVAL: While building stable rc 5.10 for arm64 the build failed due to the following errors / warnings. make --silent --keep-going --jobs=8 O=/home/tuxbuild/.cache/tuxmake/builds/1/tmp ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- 'HOSTCC=sccache clang' 'CC=sccache clang' drivers/net/ipa/gsi.c:1074:7: error: use of undeclared identifier 'GENERIC_EE_CHANNEL_NOT_RUNNING_FVAL' case GENERIC_EE_CHANNEL_NOT_RUNNING_FVAL: ^ 1 error generated. make[4]: *** [scripts/Makefile.build:279: drivers/net/ipa/gsi.o] Error 1 Reported-by: Linux Kernel Functional Testing Build log link, https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc/-/jobs/1086862412#L210 -- Linaro LKFT https://lkft.linaro.org