From patchwork Tue Jun 30 12:44:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 192068 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp3782085ilg; Tue, 30 Jun 2020 05:45:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkbq0/qH3lzYpbX7+iXIG8bze1CKRTfuTSM5UblsSbQPchXz5wuwrsJuBOH4fArp1D1eaW X-Received: by 2002:a17:906:c7c3:: with SMTP id dc3mr2842321ejb.376.1593521108337; Tue, 30 Jun 2020 05:45:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593521108; cv=none; d=google.com; s=arc-20160816; b=VYO0BUEksdnQEEI4FQ/wzS4CqGLQ2Py1jeyWVLgZjFQY++sNJnsekcqIedwlRFOtV7 HmzjbJkPz9hiVo6aESG1K6zm3QvfcXGwjeP6OWJiJL4aZyDd8NJp/ut4Kw5+3K0b2CTm S9mGYnr2VMD7oaQJnKjonRWwHKiegLP5YXfUtakfeursbqxhIowaQj6vdCmze73t0t+r KNntYC8YJTo+WiP5CYhNjMCXozdhWTgh53F41FrMgnfF8MMo5oseAqZjdRArI7eiSg52 COdaUoV0IOIaseuTpO+sc/zqT3fc0B0qHfurBR7q8Em8U6QB1cVsLX1Broe4LJv6nLuH Uqgg== 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=9XdXmEjc3ZwKGIQrLtpyxFD/vzTwMpcwaLUBfSuIMks=; b=M574SAiiZ7vtpunLdQotZqSuPpUrTxPCtzbitHx+JhwHtP2h7V6kyYABnxg1bXjdae dY4KfnHkEjbjoUxW0iH+58XQWAcRMMF3U+bsH+InHkpYATtJIqErP6DWpbDUQKWzP/Zd yzvPDr1l9AjC1yGen2DEQBUBP+gKLSruD5x/SH893H1ABIBIetpI8A9lr3O00sA3qYyL NhdB7EghibMIKwSNFmTGyB1+ZyACLaz7WXiefMbRB7ksBNk2oWG/p6wwIof9OMHPOFR1 LPAyW+Y3bdC4WdxTe7ajv/WD1854Yj/Vh9+S7OO0t7GCuZLQvWHHUIskq4XuDmBy2F72 QmmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="To/SEc0b"; 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 w18si1577601ejk.216.2020.06.30.05.45.08; Tue, 30 Jun 2020 05:45:08 -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="To/SEc0b"; 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 S2387900AbgF3MpF (ORCPT + 9 others); Tue, 30 Jun 2020 08:45:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387853AbgF3Mov (ORCPT ); Tue, 30 Jun 2020 08:44:51 -0400 Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6909C03E97B for ; Tue, 30 Jun 2020 05:44:50 -0700 (PDT) Received: by mail-io1-xd43.google.com with SMTP id y2so20819514ioy.3 for ; Tue, 30 Jun 2020 05:44:50 -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=9XdXmEjc3ZwKGIQrLtpyxFD/vzTwMpcwaLUBfSuIMks=; b=To/SEc0bC6K5+5p1yxkI48vyuR9vyavYUd62qJak98IF5Cj2h4nl0ExdB4WrvzeHvq biXJNGpar5EZMpHnAVLlHdMofF3GgW6C88xEU013SGCPXEbsQu/2dY6rEnYrntMHpoCx ir2/jmSRJD4r4olvYJUOCeq2y31mCJw4EnyEkkDslgAsfxV/bPGDbgJV5iv6x2ld08Ux vF/HL0hG/uTv741vc1hwBA757qU2ppmmISgFnjdL/PwEm2N5ZATx9WjWIP2kbILGZlVT 4NaV86nAxp0C3MceWBtIu3bit/GL0M0hI6d9lRetlGzlth5NxUHmmw6DAAKDkoqpgIRR IaaQ== 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=9XdXmEjc3ZwKGIQrLtpyxFD/vzTwMpcwaLUBfSuIMks=; b=Lj98PFTxhXDl54oh+9P67AFEYmtY2msyRSbyQvuB6HAItWQ3ooohRNuTUq7hXIBsyI Wq7IQWH4JYDoUxQ73O6Iknb3nV7uGlItsmLnONM1yzAU6KZQo6mI/oC+2UiODnIhuR0U 1TUoE188E/8v0gSGdGfJCBFTlGFXfvOCmlcwFH0JOflnpStkm6epH1GxFPgZ2xLuO+dx qih7cigx3adqEU5lkZIkwYlyaDKyM/PlOJaaLXeVFDApYRRghiqvc+AUD/FWk1B9zyev hDeTXLmV8aKFBXv0W5y0g/WP+Qc54h/s7VJawDFA5IBDn7bWgeBGfDw6qGtezzJVuSaw gkZg== X-Gm-Message-State: AOAM530WdBDSm0aWu01ZElQUumTzYoNQii9VRAnIDq42AjUCYQI6etfU x19vsR64eGRNaNiemhAV0kIQTg== X-Received: by 2002:a02:cb92:: with SMTP id u18mr351945jap.143.1593521088996; Tue, 30 Jun 2020 05:44:48 -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 t83sm1697536ilb.47.2020.06.30.05.44.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jun 2020 05:44:48 -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 v2 1/3] net: ipa: always check for stopped channel Date: Tue, 30 Jun 2020 07:44:42 -0500 Message-Id: <20200630124444.1240107-2-elder@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200630124444.1240107-1-elder@linaro.org> References: <20200630124444.1240107-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. Fixes: 650d1603825d ("soc: qcom: ipa: the generic software interface") Signed-off-by: Alex Elder --- v2: Added "Fixes" tag. 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 Tue Jun 30 12:44:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 192066 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp3781949ilg; Tue, 30 Jun 2020 05:44:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw71B6rk/DLZs8AiWzFPA8AzsAPkFoKXjqsYiVc68lLwbBzESsg/VTA5SYtaFlTBhKncbSY X-Received: by 2002:a50:e387:: with SMTP id b7mr22245627edm.190.1593521096897; Tue, 30 Jun 2020 05:44:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593521096; cv=none; d=google.com; s=arc-20160816; b=frALwY3C21ApoV/aF8rYNFgEr713icwQoMArROWp5wY4/O7eniX6Dtrf+jALJom9IS 2/JZaCc38fyeNUNQXYGZ3Dwpf2yzhJcBWLDRXXuRKlpDBy3J+N8RlRB3jTrY/rkdDpr6 3Hmb4zHECWCjn9r8FXobf1wPaViqDLYAH/7WVzvsGO7MiA/YfZy3OvvwcogCymZXVlor dMx29tEz/f2Ql9heVWd9nj331RqUHGufMdAIaBMRGl/geT3/3QRCT7kwMMtkpiIkSFWw I8qE3O42o+ui2fwpzDchnJmpuSK3GwNxDGKISFoEH26ObwO29RjSBage4icIS5ZYcSLe ehaw== 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=0fzm9ivbOZhTMkiMv3HS0noPXFaLM5j356lho+0tq40=; b=CDaQ0VI0YQtFaLRQGWXeRpYVvt/YWLBkhwmzGoYyCNOVqUEoICfx6h7tMX1VXWysYt h/WLxxC7zZceHzQ3yD+YlwGs8+aO6unYF29YkB9VCm4LCfihhOKOjixI9XWene0CMMXj 8k4GS/2B4oOOmIiMa9sq7vDiFkgICB4Kz5ghZZQjys4af87JY3mP66gAGR1+khKT8rk6 iG6fIW5r4vkMJf+OFsFEhYgAv6dmYnDol0FBWK1zZkjdhgCBAzCLYtZ+OClzbBwBH6u0 x5EPwfjXFEnHLzvLw9rDnoZNJJxe6Iohn0kEtJOUZi85RXj7q0bl5Vd78UVq5RjPKU+i 7Vlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=afhODrly; 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 v12si1647101eje.201.2020.06.30.05.44.56; Tue, 30 Jun 2020 05:44:56 -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=afhODrly; 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 S2387865AbgF3Moy (ORCPT + 9 others); Tue, 30 Jun 2020 08:44:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387836AbgF3Mou (ORCPT ); Tue, 30 Jun 2020 08:44:50 -0400 Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC1D2C03E979 for ; Tue, 30 Jun 2020 05:44:50 -0700 (PDT) Received: by mail-io1-xd43.google.com with SMTP id i4so20771424iov.11 for ; Tue, 30 Jun 2020 05:44:50 -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=0fzm9ivbOZhTMkiMv3HS0noPXFaLM5j356lho+0tq40=; b=afhODrlyuRuSgJChUpQG2XY3nveWqjldkpWmGxxjIP0xJfH/0BJkI+Jh3eGsxnB+OR zutMm5QTTporiO9wAqYMbWs0bD5SB4tuBfpn+yDG2UL3a5LtawbTw0TZkt9J9ZmJO5BL t5Xbl1+kb72T6t5ovYqhZ1/H528+/djnLm+JWr/D6/Jl4ryQ8ekHTVssYXrVdlFovycI 0iZiQc4jS222M1OpzWLp30LY5Sf4SdC7YMxra1Fak0RGs/fDOSrceJDBRvCHBFvpxlZV vY6xDrgDR45SvZ0N9UgWqZsriKpkx/UnmA23ktp2IYVlQ8l208uKpl8JVE8KhVV5U6Hm TGVQ== 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=0fzm9ivbOZhTMkiMv3HS0noPXFaLM5j356lho+0tq40=; b=sucbjdqUWgI2zAeIkSSPh5moZuegI1lSjMnD1sMoT73fO9nLpgcCZuAIwxwox3sW08 /oUpQ+7dlh74+PsJuSJKj2fOTET0IpZu3xEIKAQKP5omvl20SQ6Fo8IQCmVqOD+8z/TR SL+zQmCATGcRqy8nKKwhOXvj5q2pTm3HimAMqBqI+D6ZUsNs4CeIlF1pzRBXfNTSvGVy bzK8W5bbM1k2K22qq7q9fJXKTlznBOjTHOHM74UErWaywWMuMSxlA+dVeKsA2TLwVt1U x5vRgliN1M1H5d0hdmMV3w0nHdCx8t6jYKzsQStfgTAmPliWGYbqZphZ5M2/5DXBdHUA RI/A== X-Gm-Message-State: AOAM530zIJKulYteuTIPRpV5PPmy0Gl3rukeemOO409nPyHp4JyDld+2 o1PbXJJuz2RkADLUyzyhe2DTDg== X-Received: by 2002:a02:694c:: with SMTP id e73mr23210222jac.17.1593521090058; Tue, 30 Jun 2020 05:44:50 -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 t83sm1697536ilb.47.2020.06.30.05.44.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jun 2020 05:44:49 -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 v2 2/3] net: ipa: no checksum offload for SDM845 LAN RX Date: Tue, 30 Jun 2020 07:44:43 -0500 Message-Id: <20200630124444.1240107-3-elder@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200630124444.1240107-1-elder@linaro.org> References: <20200630124444.1240107-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 accommodate the trailer that's added by the hardware, but we ignore it. Fixes: 1ed7d0c0fdba ("soc: qcom: ipa: configuration data") Signed-off-by: Alex Elder --- v2: Fixed typo in description, and added "Fixes" tag. 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 Tue Jun 30 12:44:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 192067 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp3782006ilg; Tue, 30 Jun 2020 05:45:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzryeWXf2l5OpoNeThl/jqCRsqrfTrpGIo0/3ncW/F8n8TYND4ag6JTqpKgIgCG6B2sZyZQ X-Received: by 2002:a05:6402:306a:: with SMTP id bs10mr15157839edb.51.1593521101124; Tue, 30 Jun 2020 05:45:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593521101; cv=none; d=google.com; s=arc-20160816; b=Cue2IRdDpIztzKQS00CLnlCoRXFB9CWBISVfLMgYdrc6NGcjOcKgrHn/9RFtRxDU/V QdA1nP+D6m58AMc4TpRgJ12TGfaKBCBa/cYzO4tIS7bIm46JKDg8CVK3XS6jDF21GcVz /e5UZOGJpUBZq2qNwY/w8qpZrfiKvzjdq+v7O8QEy86FybxPjNULk6nF3geHPvzkVGUE UXm6rRFVqTvFW5TiitVPgt7khXuI7f+5bIsOnjvC0XLJ0NXQHjQErylhXYLRSQhcxMOD Ah0iXva93kNXF5nMM3GZV9DRUUR3Dt236p31pHvMNvLclKpidVQ+vbgxm1QP6ykxOJZH g8pw== 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=hhprUszVmOlah4/Ur36hFj2E6ek/4IJi+AwyXGta/Jg=; b=C/x9zWpU0cenQLPDarRXGDkTs6WZympNaMwHt2iM4WBzDr1cV8K5I9cisKD0I5xbIw faiF+xt8RPrMeUVM1j9cHL+SFX2p2n5hsvfunxoAm4wBiLmC3e8Z/OmHT2h2/mvhsorM 9mJWgMqvr4qUpXAau8YKcoeOJWc2oRRjFs26M/ENkPZf0SZUQYuRlKmJPjXWsyBL/xpg 2V1Qxo3tET9pjWiFNw8de+kEodvxp2WjQO86JFCHGmEOV2ID4idgT9YEpuzjEjjDQTOW thBSp2WbrrgG3SAxsPdoCddiYEHqPHyk5p+WPsrdmwlhwnYmFpMgxc0emjD6SgABn+c+ felA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KkXHJTeU; 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 v12si1647101eje.201.2020.06.30.05.45.00; Tue, 30 Jun 2020 05:45: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=KkXHJTeU; 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 S2387890AbgF3MpA (ORCPT + 9 others); Tue, 30 Jun 2020 08:45:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387855AbgF3Mov (ORCPT ); Tue, 30 Jun 2020 08:44:51 -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 A7F13C061755 for ; Tue, 30 Jun 2020 05:44:51 -0700 (PDT) Received: by mail-io1-xd44.google.com with SMTP id i4so20771472iov.11 for ; Tue, 30 Jun 2020 05:44:51 -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=hhprUszVmOlah4/Ur36hFj2E6ek/4IJi+AwyXGta/Jg=; b=KkXHJTeUKg/muI7mgvHgvdw0wHDkMhda+sgSpItV1HTVh8YztFciCNhoOjQKWdxzUb RMVDJrke3LdwacR2ltk3mQ0OlSf/j1AqcB3jIlm6404ZT9Heg4oq4QeMghI0Y9JH1yFr X97j/i2ZuE3dGuSaz3Jyz3AQSmzNzdUFS2mtYDKcvP4jlThSZRMq1vOX+UHU+vUwyn/7 /HSw5KsZL5AQUls3hoBL7q2dOeaTdPwEpqdmtnK8DCpDvwBPV96o8Hzz3/B9dFYd7o0G k1SBdVn17rh2y210NAK51W80Nmjdf0VA4aJjgdKYq+75o1r6JefIpzP5NwntSVNRWgag gytA== 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=hhprUszVmOlah4/Ur36hFj2E6ek/4IJi+AwyXGta/Jg=; b=PRrc/rmJG0fXNQU+Gm6rgtpVcZTx8cF4x5HTr/XuNlRRcGQUqcf1xbc65qyGGKZmdI AjW0LXD5HW5+KHeGPbqZC2xCO7elOBVCPpNWJJ5TGkJOrkf/J/VPgdx7z2rWv5/itDa5 6WLGdEkEueTHyv4LXz2+BDkByymCMMCT0I29MBv8yzdGvgWEoNYaS9FlX+iIahNN9bkT 2VKCOModL3ss/YB1d/lE/06s0oZkdSUFdOtEkMNeut86Nq6dTVAJ3zW1tg3tDe5qrYw8 x9+zKfEltGDTm9XYcyVRAgt7rGnrZYxlhtrGHw6mNsUuFPUAS6UjYtPK0lF/ux45z0Vr xdBQ== X-Gm-Message-State: AOAM533f20XFkqvjnuUSjxlY/utbnSUg06Qzbq/Pi2Wtsj3iaETn0iJZ jNo24zkO9AN0AZQ5SgkdPmXslg== X-Received: by 2002:a05:6602:2c8f:: with SMTP id i15mr21731390iow.45.1593521091047; Tue, 30 Jun 2020 05:44:51 -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 t83sm1697536ilb.47.2020.06.30.05.44.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jun 2020 05:44:50 -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 v2 3/3] net: ipa: introduce ipa_cmd_tag_process() Date: Tue, 30 Jun 2020 07:44:44 -0500 Message-Id: <20200630124444.1240107-4-elder@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200630124444.1240107-1-elder@linaro.org> References: <20200630124444.1240107-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 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 --- v2: No change from v1. 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]); }