Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp472097pxf; Wed, 10 Mar 2021 09:52:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJygGpzeIrLrOPfAXEoyytwZcjQnltT4z7+9zvsnOFgKaw8+2luS5Jt2fIa0/V5r3WStp835 X-Received: by 2002:a17:906:780b:: with SMTP id u11mr5018432ejm.492.1615398743876; Wed, 10 Mar 2021 09:52:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615398743; cv=none; d=google.com; s=arc-20160816; b=awTDxqcZQubqlxTSp7njACQVCe68IkLWEuWKpoO9+8YRCJ1tN4M2/nASJIzKlxp4Ky UerT5HY4zOpAnHUo6w60uFpIhBYxboz6LF1VyW5it7ygAobGUIcxkhiHn+sefZgY/oFN E544mBFb8ZwV6Tc/wFL1iUwY1C06OdXpgEScw2nRZ3LC2zln2MMDvmpaxJEf3WOrInf/ dRMQ5DCaJWlZlJAq60jt0Y5LPZ96ZOVA0Kk+Y84uy6hg1ETYh++bzJjrtFpt7L7JKtwk bd9n0O+o3qk3XvgYKiyGchme6hqHsHELqtWWfrCUI1E7hm3FUmANKCflZPcKybwQtnV+ 9l2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=pjhY9oWxqLqIb5ufRBoTvobG2ljtmnnOM6d4fQirr8c=; b=yHUbH1FTFLOvRKqQHA56qfJ80wIBf2QLhw7ZnYVT9WPqgDQJHEK5Oyn/OUGbMsIEjx o2mBBdBukspLsRC27I+0E6iIvMvYMa/CnRZT6P6Ol/AyCg3wkAAzeHSbbwe0hm2PDzPn nDG3P8DjEoJvXS1PwX1VxxQWkYRsIoQ15tA2+JE35HdWe6CyKXvAElSzBWdkVpCCyIpV aoZBNOTZbyftNPDMODm+4UBQWlQyQGYIUYCVQEeJIQxTb5LZoyltf6sMfVxvzSO4CS7J 4Vya10VrxK7D3cglwf9a8POCMht2jOd9ZeXnVs1RyG/0L7CUKvwqYVFHoplxdPlyI8DJ tTkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vZPceUuD; 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 u27si18543ejj.726.2021.03.10.09.52.01; Wed, 10 Mar 2021 09:52:23 -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=vZPceUuD; 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 S233542AbhCJRsh (ORCPT + 99 others); Wed, 10 Mar 2021 12:48:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233570AbhCJRsF (ORCPT ); Wed, 10 Mar 2021 12:48:05 -0500 Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB2D4C061761 for ; Wed, 10 Mar 2021 09:48:05 -0800 (PST) Received: by mail-io1-xd2c.google.com with SMTP id y20so525680iot.4 for ; Wed, 10 Mar 2021 09:48:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=pjhY9oWxqLqIb5ufRBoTvobG2ljtmnnOM6d4fQirr8c=; b=vZPceUuDn68WpBRoiQ1Q2dEUjhbJJ9aHA6FfzCTmls8eD0M1QscdzTIHkQGfQAzX9C QWT9U1zuDksfaB4HaOSduoJt3g40b7DTzyN0vrPorA+jxz9wQ/h4obNX9UPznS1fpz3T yKNCFOLaYw3OtusVKZ0iroINJ05oflR0zDtpUGTLwmaIDafaD+lYCBNvypvHejcM9MII A/WQXlfzmAURAC/0YQzyBpHVmDzNHhFraT4zFMF0Emn5eXcqcq4LIw11pcEp+Cfpvbj/ y5rHmNenLuA1Vzzmw0/g8LeAYKo3JmW2JueFmgaxr482b+dENHYocHPcnW4PYukypanS 7VxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=pjhY9oWxqLqIb5ufRBoTvobG2ljtmnnOM6d4fQirr8c=; b=QTE0syIlg8kyQvGhvKpmS2nD+2e181lj+QKTQmXybxiXjOCcSN8PV1jdV6VmKpQeyj 7bn9vYmxJ1+RPQoGrChU6oQ6maFexLTI0ngQ5HvQ2E9vep8Ag7cFDhbSoxcQ1aCn0VRv pshUngFkE4H9gRlYhmqdnCJK1qsnieNto/hMbUMLLGe/PHuKC+f+/MKlWJgvyBCPiEUh GzeAIAFrSVKX0L+C3D+v854nbE/aj20YCtyLaxQgkJg1J5a7nak8kjLZkrYhCIc/45F3 HeTg4luLj7hpcn3KDwrgT3KgSYeD8SZ4WOL7l56f9/Klm3lDv3ZHq0D80LMdXzXTj390 otNQ== X-Gm-Message-State: AOAM532PwTT8QztpkjLA6J2oRv8wYis5VZfIcf44kbw4ilEGLyttbyBF aTfq/Ai4hCWmrYwdbGh5xDkDYA== X-Received: by 2002:a05:6602:15cd:: with SMTP id f13mr3210274iow.173.1615398485006; Wed, 10 Mar 2021 09:48:05 -0800 (PST) Received: from [172.22.22.4] (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.googlemail.com with ESMTPSA id s9sm122455iob.33.2021.03.10.09.48.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 10 Mar 2021 09:48:04 -0800 (PST) Subject: Re: [PATCH 5.10 14/49] net: ipa: ignore CHANNEL_NOT_RUNNING errors To: Naresh Kamboju , Greg Kroah-Hartman , Jakub Kicinski Cc: open list , linux-stable , Sasha Levin , lkft-triage@lists.linaro.org References: <20210310132321.948258062@linuxfoundation.org> <20210310132322.413240905@linuxfoundation.org> From: Alex Elder Message-ID: Date: Wed, 10 Mar 2021 11:48:03 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/10/21 11:36 AM, Naresh Kamboju wrote: > On Wed, 10 Mar 2021 at 18:56, wrote: >> >> From: Greg Kroah-Hartman >> >> From: Alex Elder >> >> [ Upstream commit f849afcc8c3b27d7b50827e95b60557f24184df0 ] Upstream commit f849afcc8c3b27d7b5 is described as: v5.10-rc4-1094-gf849afcc8c3b2 Is this being "back-ported" to v5.10 stable? Maybe I'm confused. -Alex >> 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 >