From patchwork Mon Jun 29 21:20:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 192016 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp3236143ilg; Mon, 29 Jun 2020 14:21:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyM6O2eN3+8jiKPpdGeGvkO94+gWxZA9/ywOWImSp+m/oIURezp/JhXVpMIoEQpaUByjGGk X-Received: by 2002:a50:d753:: with SMTP id i19mr20381429edj.9.1593465661340; Mon, 29 Jun 2020 14:21:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593465661; cv=none; d=google.com; s=arc-20160816; b=ipRNQ0IGjv3+WadDHNNTbB+63Tra51wL/rAN4W/Fi4HyI2kG2EOQcMuE9K4rCVvtKx 5qoReDZtw3JR1Ave7yvQDZTGFCjcqTYsbNZTM0h/vEloSeHgs7mHGfFfJowFvx/noB7R jmma/IDQQvWWPysI159Xvv6BRcu1niuTh3oywVfXyJqyaho7bmLxIDujx8LE//mQcyke 04+4CMWGuEbt7ZqvR1pJjYGRxdvTf7CyOeuu+HJNpEYc+RHoEknSRcc9zbpI1MzLAlhT nVEk/OLdUaJxt/DlDEH3lLqeSmyinmTr8Zd0j6USVjHlXEx8RUWhWuRvzSXhwe+yeRkr xVeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5NzyDp4mBovD0FjYRR3tCmdZlivRdkEwWwtmv1riTuY=; b=m+3fVWb+3MegAWDdpMHCRcEpht7Jv37jznrFmKEeTu31X7gcs4d9VfW7EA96UTuG3r RdO7L5CJIYq3i9M0+hyP1bWR/3wcrlTrNzh0NPFLPmDisvRfCMon/IcWSTyMEgN5J28M +BvSDjfJXZNmV/5UnuwZDZaemuq6Ugf4MWwQrdqnWg4CxvDyyPqleHrfy3Tj7TD83IWn 9zD4u2UGPH7hpF8DDIxGCY2XD7jWDfU7DPYj9jZYg6lQHRbr4Yo0z7AB319o/gPfhGxI nAx9SCUjIWkadMppXW9vLkDlJqUCnRqO35wR5J4QhxKimRfiNeuAbzlc8MGLGrJvnHyd yxhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HamVpoW1; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-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 a14si536337ejj.334.2020.06.29.14.21.01; Mon, 29 Jun 2020 14:21:01 -0700 (PDT) Received-SPF: pass (google.com: domain of netdev-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=HamVpoW1; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-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 S2390527AbgF2VUr (ORCPT + 9 others); Mon, 29 Jun 2020 17:20:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732287AbgF2VUn (ORCPT ); Mon, 29 Jun 2020 17:20:43 -0400 Received: from mail-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A13DC061755 for ; Mon, 29 Jun 2020 14:20:43 -0700 (PDT) Received: by mail-io1-xd44.google.com with SMTP id f6so3160733ioj.5 for ; Mon, 29 Jun 2020 14:20:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5NzyDp4mBovD0FjYRR3tCmdZlivRdkEwWwtmv1riTuY=; b=HamVpoW1/0IkR9G49C+/CBrniF24a3GIZ9p6TtnYlbSO4Jpx8uu5WJQGFRbkvKSq8+ j6kHhPKvjPGELtsFcvX674UMr9vz1yt16f77C9fqv3dSurKPtFE28qBjLKqruB7Xho2X tdlAVlQJ8FrLryNHSqhfuXOSG72GQYAucZyrHocMCCzVbIpl1LfYZfpUIxUpkfrxIHPW b2iUXuTJqVakaOT/xk2KnXKL9hh6lMOoKk5FYHtdHBmftDgFtgePg8K8CguTarT7UImA uEem5KM/ZKPBDW6O4Gpn1aoLYlJzQ3N/jjs+rPwztmOdvXYJ3bN/6sRaReYvD/dMZOWF YpWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5NzyDp4mBovD0FjYRR3tCmdZlivRdkEwWwtmv1riTuY=; b=RqZ8PgUNjGZq/vAH7Md84bnN7cVvy2mUvAlimijAOi5HtVOokt6yqi95wFH+0DFZ9c tAcECF7AkhI5n84ARBHL3lpBvAhmWBB2hOve3bEYkLs1Zi/SVC5NN93Btb2p+TwPpFUJ QoE1U7KfRyTJMyOI/yqNVKCJBWzIGGBg0553NtJv2Js7hOE5SBM9lenpmZjmreyvvVo1 V/5DQ9iGhMCWmBqyIsHy/jzyeYbpqIdWUeJmEuQasLNN6BUqc5phc7JjqGiKd5phEthk rgoS8Ajcc8RkIReDaaZWQ7FK/kGbyFluuTVLVYEFX7hghJ4Ze7NpNer1ulIDVBqU8/Rm hlwQ== X-Gm-Message-State: AOAM532s+MJZxE21aTj6Q3XrseZxN6tTvjI1ixubjkaWY5SmJjb4XGR5 Mwplvgur+4d+h/EsageX8bk4vQ== X-Received: by 2002:a05:6602:134d:: with SMTP id i13mr19247613iov.113.1593465642955; Mon, 29 Jun 2020 14:20:42 -0700 (PDT) Received: from presto.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id f18sm564588ilj.15.2020.06.29.14.20.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jun 2020 14:20:42 -0700 (PDT) From: Alex Elder To: davem@davemloft.net, kuba@kernel.org Cc: evgreen@chromium.org, subashab@codeaurora.org, cpratapa@codeaurora.org, bjorn.andersson@linaro.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net 1/3] net: ipa: always check for stopped channel Date: Mon, 29 Jun 2020 16:20:36 -0500 Message-Id: <20200629212038.1153054-2-elder@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200629212038.1153054-1-elder@linaro.org> References: <20200629212038.1153054-1-elder@linaro.org> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org In gsi_channel_stop(), there's a check to see if the channel might have entered STOPPED state since a previous call, which might have timed out before stopping completed. That check actually belongs in gsi_channel_stop_command(), which is called repeatedly by gsi_channel_stop() for RX channels. Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) -- 2.25.1 diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c index 55226b264e3c..ac7e5a04c8ac 100644 --- a/drivers/net/ipa/gsi.c +++ b/drivers/net/ipa/gsi.c @@ -500,6 +500,13 @@ static int gsi_channel_stop_command(struct gsi_channel *channel) int ret; state = gsi_channel_state(channel); + + /* Channel could have entered STOPPED state since last call + * if it timed out. If so, we're done. + */ + if (state == GSI_CHANNEL_STATE_STOPPED) + return 0; + if (state != GSI_CHANNEL_STATE_STARTED && state != GSI_CHANNEL_STATE_STOP_IN_PROC) return -EINVAL; @@ -789,20 +796,11 @@ int gsi_channel_start(struct gsi *gsi, u32 channel_id) int gsi_channel_stop(struct gsi *gsi, u32 channel_id) { struct gsi_channel *channel = &gsi->channel[channel_id]; - enum gsi_channel_state state; u32 retries; int ret; gsi_channel_freeze(channel); - /* Channel could have entered STOPPED state since last call if the - * STOP command timed out. We won't stop a channel if stopping it - * was successful previously (so we still want the freeze above). - */ - state = gsi_channel_state(channel); - if (state == GSI_CHANNEL_STATE_STOPPED) - return 0; - /* RX channels might require a little time to enter STOPPED state */ retries = channel->toward_ipa ? 0 : GSI_CHANNEL_STOP_RX_RETRIES; From patchwork Mon Jun 29 21:20:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 192014 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp3236042ilg; Mon, 29 Jun 2020 14:20:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIGsNPnyOTWAAlnkaes5mHtovH6wZjLymiGCdK4pXkVBvzMc0MIdWtknmjcUakDJFOrIyA X-Received: by 2002:a17:906:7247:: with SMTP id n7mr15728053ejk.105.1593465652682; Mon, 29 Jun 2020 14:20:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593465652; cv=none; d=google.com; s=arc-20160816; b=gEhF1rIsP7RhLdTvV5yq9x1rxmp6BLKh8d2Wmb2CHQB3HGdGeAYrhFNjJf4/nYUGoY hOQ8KtrllCV76b4eInz63KIbzzDFjsvnqcAeSkNlBd1hIy3JqTKSAKzsMxNCpCGVJmUx iIbRTIowGtFoMKwVjPAmBn3jZrvMGWZ4z6mSNoQ4ecI5shthVzO8F9+kNcZu6bKRt5O0 58ozukn6Rqqfvm1Tn/QtbtV7beQx/mhT8lFoOoTYYEvm0E2Z60xEdyJG6+lj9AiA3Gv9 R/0NXef1Knm3+VlXM+DAZIkzgoimRJXMcMKb6NlU+dExkIp07TDCl6rJu8b2a5l4w40L 9Aew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ikmoMwgWrI1HSTvIu3OsRZsmkzSggb5efR8I4lGwKfU=; b=bwF+IGEVfu6W3PepkawffV8I65sJ9NMnuISMpF1Lb+qlZ4CHHQV07mfkbaUOW3OpgK N1zXo53itBPWx5tptIipt4f+v7gPwAEFlcjaS1VVwnc4yyX4LVFq4NtledC8fiXm0HO1 Cwob0cA4kclLFtroB2AmzBcUyoqgEy86UZYyBrIB2AftthZMdA/leJrAfFHO6t3b0vWA NV6pj3UgwGW32cvwoxqCaw6IV25wTkqu9qsv8sBwZKWwx9MG/7WCqhlUJKppfAo5M1M2 RsiRxtLB04+M2rXHLIVNXWCZymm/yq1bVWRmEMX+7GoQqJDKDIWMQ0byr9DfpjJUkbPx 0C0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="sNLU/2+B"; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-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 f26si589388ejj.345.2020.06.29.14.20.52; Mon, 29 Jun 2020 14:20:52 -0700 (PDT) Received-SPF: pass (google.com: domain of netdev-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="sNLU/2+B"; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-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 S2390924AbgF2VUt (ORCPT + 9 others); Mon, 29 Jun 2020 17:20:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390659AbgF2VUp (ORCPT ); Mon, 29 Jun 2020 17:20:45 -0400 Received: from mail-il1-x144.google.com (mail-il1-x144.google.com [IPv6:2607:f8b0:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B65D6C03E979 for ; Mon, 29 Jun 2020 14:20:44 -0700 (PDT) Received: by mail-il1-x144.google.com with SMTP id s21so666941ilk.5 for ; Mon, 29 Jun 2020 14:20:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ikmoMwgWrI1HSTvIu3OsRZsmkzSggb5efR8I4lGwKfU=; b=sNLU/2+B0nxI/itWKc1EQzh6GK7KMZMGj5NLUcnvhUyQrjoZJUGpniCudLZIxJRNH6 lu6+5OQe+k6rqJZ1/QFthfraObsnIne4IodPSIBP05ya0avWoVWlC85uVgbF2DzYo6eK ZZucb9PINrN62vWvBTLNTRqpmIeyx5BVy2PKB+Xoipglj1h7B3SZshMox+7qySHR2N5H XMjGf4qMiAd2WR8jXGaee1sSeSzEQ7Diyzhm1Jg5n2fHjGD3I8VSFpdPBMaszoT2OW1c bXlVYGy3kcIsLw2YMc999fZ9kWiT9JUAAJSO22+X8FmWmDdqDkKpbPLd9TezaY7+nS0D +apw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ikmoMwgWrI1HSTvIu3OsRZsmkzSggb5efR8I4lGwKfU=; b=t9ufcqFwAn1rBvoZv4LLAIzEhhXJdQ//dPL4MMT6Y3MkYu51ty/K+MXVB/3R2Pv2J1 2wSCJW94kyeA3rLM6xbOJPaQVp3awPs3fqdUw3z+2UvUUrDSg47zV/6AvNP3pohdshza mpHcweu3HVf7IBrtEmwQHxDlc6dO/x7josX6f25zAhASlKNNQg+Pl9BxVAbzSYnIHPfv 2aMemMPC+/IWXcUOCFAMuUdYpOb0vbMk3HlFAf5R/kxKOTAf259sXd1fvt2znpNp2Ao8 kArj3yEQspnLmnGCp8iAN2aR1TL33vwyi7B+MLLOFPuSbyQN9XtSwuZ8PELPbaJ+yojm 8deQ== X-Gm-Message-State: AOAM532xQA3G3fQbP8hJmdhqV+bUIcCa5vi7HFUv0ZB9JF2pSC9EnQLP i1AX7zn5yLV+Z9Gavk2eGLdMcA== X-Received: by 2002:a92:d843:: with SMTP id h3mr18802430ilq.255.1593465644108; Mon, 29 Jun 2020 14:20:44 -0700 (PDT) Received: from presto.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id f18sm564588ilj.15.2020.06.29.14.20.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jun 2020 14:20:43 -0700 (PDT) From: Alex Elder To: davem@davemloft.net, kuba@kernel.org Cc: evgreen@chromium.org, subashab@codeaurora.org, cpratapa@codeaurora.org, bjorn.andersson@linaro.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net 2/3] net: ipa: no checksum offload for SDM845 LAN RX Date: Mon, 29 Jun 2020 16:20:37 -0500 Message-Id: <20200629212038.1153054-3-elder@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200629212038.1153054-1-elder@linaro.org> References: <20200629212038.1153054-1-elder@linaro.org> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The AP LAN RX endpoint should not have download checksum offload enabled. The receive handler does properly accomodate the trailer that's added by the hardware, but we ignore it. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_data-sdm845.c | 1 - 1 file changed, 1 deletion(-) -- 2.25.1 diff --git a/drivers/net/ipa/ipa_data-sdm845.c b/drivers/net/ipa/ipa_data-sdm845.c index 52d4b84e0dac..de2768d71ab5 100644 --- a/drivers/net/ipa/ipa_data-sdm845.c +++ b/drivers/net/ipa/ipa_data-sdm845.c @@ -44,7 +44,6 @@ static const struct ipa_gsi_endpoint_data ipa_gsi_endpoint_data[] = { .endpoint = { .seq_type = IPA_SEQ_INVALID, .config = { - .checksum = true, .aggregation = true, .status_enable = true, .rx = { From patchwork Mon Jun 29 21:26:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 192017 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp3239482ilg; Mon, 29 Jun 2020 14:26:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQ//0Bs+mCDzcolFOBSe5oWfA0SnEiVijSFurRiVd0IR39KOjuqVQLE7FjUIz7xYLENbx9 X-Received: by 2002:a05:6402:1c96:: with SMTP id cy22mr19235688edb.79.1593465996969; Mon, 29 Jun 2020 14:26:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593465996; cv=none; d=google.com; s=arc-20160816; b=tBEUuKDQc8OD0jnci0AC2U3qv1UhVw9IruQ46R/zJxn1SbV19twARD9J6JsbWIlSb7 kDKBSpM9OWqBbXXat277eOc9ogUetDjxq8yyJ3qPq3h58nTApAzZDH9gS/1nvQ0wTjgs VFFspsoRwYW+hM7tvcOQws6dnwkdPNbKY+E0qqDnfOiA79R/Vv4tBmwXkafP6lF5/fxN lPbLiJpRgGAlG4FscdPaK2Z2gYJ7R2fWjpBil5s9JYklcrOzM4WaIy0sFFL6EhcOVXq+ exTeJodU3JDbyUJCIVKhfpjpRqOAsGuMfejyG6JDICozmsK6+3YsCKcVDqjEHCOVywi0 D3ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=GEehQF5Dq7lIZlTVWZjKtKY7k4OY7nbzWNuwJEp3uCA=; b=Baz/mok14s56WjRKXBuiwFLcGmYmfF+CdWbDQzTGb7fc9Hza94G81uK1iYDrQPXXXy WBgCA8orYU6O4AjAg4CDTEHngKSpULfaGYsjqHNqKsZj0cYi5PmnpbBkTpadiUpDU4T8 75+j2HM39L4T+M19b5vOA7n8RbAmIbGXavoARt0TBn1b0Nh50js1jallNSguT9CcY1PK RjC3gmGPVGKij64GJ0qdsPk8HpEeSsBLHn4Ji4y8CV8ShMdAF/MzHQaOJ9rZA9ls99Tk iCVdwdawVmEfjS3+rFe5oCFhaAu3fMP5/GdBM51KZwFS1B/DO4CDynyDyVXBspLyJYbS cktA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ln3G7483; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-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 zp8si509409ejb.255.2020.06.29.14.26.36; Mon, 29 Jun 2020 14:26:36 -0700 (PDT) Received-SPF: pass (google.com: domain of netdev-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=ln3G7483; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-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 S2391006AbgF2V0c (ORCPT + 9 others); Mon, 29 Jun 2020 17:26:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729478AbgF2V03 (ORCPT ); Mon, 29 Jun 2020 17:26:29 -0400 Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 171FCC061755 for ; Mon, 29 Jun 2020 14:26:29 -0700 (PDT) Received: by mail-io1-xd41.google.com with SMTP id f6so3176073ioj.5 for ; Mon, 29 Jun 2020 14:26:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GEehQF5Dq7lIZlTVWZjKtKY7k4OY7nbzWNuwJEp3uCA=; b=ln3G7483aQUSMwb9MRnm/mfwRP3UHJuE105pebnyrPDCjv3wJ4pCVD26yDO9MGgq5k JjOHnqka6eTMXuxzgLdfJTsujakPMVePod6/HmfOJ61u+hS+IDwOaDZF9BGst5Aax8C/ MfKpSn++e97BcIr5Fi/3kwaxO3cjW1Fj39y2DwgsifHxvtjIq7+Sg5Fb+QO54agRz9Ck FfN1QUpDzCD9MP+grFDi2NpElVVvO9WZMnXjTs9SOBJ9vrcBFicpqfxdtP9jSQxfgshY u7dQQHNmmdVfHy7EBpisqyh4qOF7S6cFAGIkVZQPezKT2j7GmC+f2Jj04WW8ALq6bFFh UjPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GEehQF5Dq7lIZlTVWZjKtKY7k4OY7nbzWNuwJEp3uCA=; b=cDPkmxtjWmsAqzHV0E44x8lW9XxxAWD0CzkV4vs2zFVYCHSvsNZCgnyNYvbaoGEVMP NCStMSbTfysSjnd1t31K7ehNNqkc2vV6DdxfuBNqUXMIfMQagqzc774rLguIHJFJ7Pnf VZAO1jMO+7IinvzZILMROgOBZcjHRvqB+0c/d/rUJqRqYzteTJpjixKGUccDBcHSInPZ Rn73w2OVaf4auus6/Ta8w5e8FNz2lhEE37ET+sxAORWU1buWYVnHgPO16h66rIIlH4AJ xxnahH4HnzLQKv7ToRzwaUDIU05P37MpovyW+XTYSm65WGJEa3+AG/nkUE5FiE5Pj4DS 3B7g== X-Gm-Message-State: AOAM530Wve9rsF6+a7pHekh6VUJv0wJuMsO1BQGPEFDcelwEoZMSCXvn wCdKgeeAzCsl4geT4MZqPAC6XQ== X-Received: by 2002:a02:83c3:: with SMTP id j3mr19486288jah.81.1593465988443; Mon, 29 Jun 2020 14:26:28 -0700 (PDT) Received: from presto.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id j17sm589053ilq.7.2020.06.29.14.26.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jun 2020 14:26:27 -0700 (PDT) From: Alex Elder To: davem@davemloft.net, kuba@kernel.org Cc: evgreen@chromium.org, subashab@codeaurora.org, cpratapa@codeaurora.org, bjorn.andersson@linaro.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net 3/3] net: ipa: introduce ipa_cmd_tag_process() Date: Mon, 29 Jun 2020 16:26:25 -0500 Message-Id: <20200629212625.1153600-1-elder@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200629212038.1153054-1-elder@linaro.org> References: MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Create a new function ipa_cmd_tag_process() that simply allocates a transaction, adds a tag process command to it to clear the hardware pipeline, and commits the transaction. Call it in from ipa_endpoint_suspend(), after suspending the modem endpoints but before suspending the AP command TX and AP LAN RX endpoints (which are used by the tag sequence). Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_cmd.c | 15 +++++++++++++++ drivers/net/ipa/ipa_cmd.h | 8 ++++++++ drivers/net/ipa/ipa_endpoint.c | 2 ++ 3 files changed, 25 insertions(+) -- 2.25.1 diff --git a/drivers/net/ipa/ipa_cmd.c b/drivers/net/ipa/ipa_cmd.c index c9ab865e7290..d92dd3f09b73 100644 --- a/drivers/net/ipa/ipa_cmd.c +++ b/drivers/net/ipa/ipa_cmd.c @@ -586,6 +586,21 @@ u32 ipa_cmd_tag_process_count(void) return 4; } +void ipa_cmd_tag_process(struct ipa *ipa) +{ + u32 count = ipa_cmd_tag_process_count(); + struct gsi_trans *trans; + + trans = ipa_cmd_trans_alloc(ipa, count); + if (trans) { + ipa_cmd_tag_process_add(trans); + gsi_trans_commit_wait(trans); + } else { + dev_err(&ipa->pdev->dev, + "error allocating %u entry tag transaction\n", count); + } +} + static struct ipa_cmd_info * ipa_cmd_info_alloc(struct ipa_endpoint *endpoint, u32 tre_count) { diff --git a/drivers/net/ipa/ipa_cmd.h b/drivers/net/ipa/ipa_cmd.h index e440aa69c8b5..1a646e0264a0 100644 --- a/drivers/net/ipa/ipa_cmd.h +++ b/drivers/net/ipa/ipa_cmd.h @@ -171,6 +171,14 @@ void ipa_cmd_tag_process_add(struct gsi_trans *trans); */ u32 ipa_cmd_tag_process_count(void); +/** + * ipa_cmd_tag_process() - Perform a tag process + * + * @Return: The number of elements to allocate in a transaction + * to hold tag process commands + */ +void ipa_cmd_tag_process(struct ipa *ipa); + /** * ipa_cmd_trans_alloc() - Allocate a transaction for the command TX endpoint * @ipa: IPA pointer diff --git a/drivers/net/ipa/ipa_endpoint.c b/drivers/net/ipa/ipa_endpoint.c index 9f50d0d11704..9e58e495d373 100644 --- a/drivers/net/ipa/ipa_endpoint.c +++ b/drivers/net/ipa/ipa_endpoint.c @@ -1450,6 +1450,8 @@ void ipa_endpoint_suspend(struct ipa *ipa) if (ipa->modem_netdev) ipa_modem_suspend(ipa->modem_netdev); + ipa_cmd_tag_process(ipa); + ipa_endpoint_suspend_one(ipa->name_map[IPA_ENDPOINT_AP_LAN_RX]); ipa_endpoint_suspend_one(ipa->name_map[IPA_ENDPOINT_AP_COMMAND_TX]); }