From patchwork Mon Feb 1 17:28:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 374280 Delivered-To: patch@linaro.org Received: by 2002:a02:b18a:0:0:0:0:0 with SMTP id t10csp1495800jah; Mon, 1 Feb 2021 09:31:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJySfr6SI3rYuiMuJI7Qb/yuOI4vWvXKnboXK/WBaU9ZYsKUs2yQgeyZAn6JLcKq381u1TX6 X-Received: by 2002:a17:906:d93:: with SMTP id m19mr5199066eji.212.1612200665993; Mon, 01 Feb 2021 09:31:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612200665; cv=none; d=google.com; s=arc-20160816; b=toW6eZ+UNBZvkCflelNgabo/6SJGYwxk0vAjX8Ix6j/oYAtaslGemHLQ/iiYsa6cn5 4P1sLMqZQ8HoXziz6Yz+NOYniu+qj3aZg2y3TAkYu1gcPyBNEL0pChLzrd7gofe1mr+U Orik4GizaalYOyqqUNNA3wn2DnKTcTcHeiPc73jzQFdSUnQSuTreYDV89RJ1ht1wkzDA jfbmuQH+u77PDelhzen6M712Kd85k7mskUTZP9TAkz7vzBMvln5GNtt0423ulDgHbxqJ jLwULCPbfbeFQTzOXJ7IEQheSBJlkFTtUXT4dY8r9DeDgHm/x0Its9Qoj/j/fAP6wbpM vJJQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Nmi+suSrpZfRwUpuA9SDfz6AzQTTcweGvCEfMikGM/s=; b=poIrO+h0D7vWkNnQ5penK3u9u+1UpfzRXcoMg8fap3NxQ3zc1kfeDqwmET52IItTUh H/D8/dVbEM9c2tE6tGPoXCP9sYn1n7Cjf93e1Aug0LPz9L0LS6Bl5uzkEPs/EQJAJwmk EOuDjXJ2v0rqwHOYdFg0K7F9VmFJ0cOGP0WUv13JAQv7e4XrWeKj9CpWNZvKMLqFbAps FHEvcFUJd/37L9FGU2RcWBOYFPgOBBGk3pEtMYnEk9uF/IgRuC20WSgJEfx+tmEfh523 hNZBGNkifyv+mxHP1kaGkLYpHRLJcZ74g44c4M6tTFl4hQUpG1hzoKBgrCWH4AANCr+y QgMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SCjwns0x; 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 n1si4741749edv.429.2021.02.01.09.31.05; Mon, 01 Feb 2021 09:31:05 -0800 (PST) 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=SCjwns0x; 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 S231772AbhBAR3r (ORCPT + 7 others); Mon, 1 Feb 2021 12:29:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230129AbhBAR3f (ORCPT ); Mon, 1 Feb 2021 12:29:35 -0500 Received: from mail-il1-x134.google.com (mail-il1-x134.google.com [IPv6:2607:f8b0:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16882C061756 for ; Mon, 1 Feb 2021 09:28:56 -0800 (PST) Received: by mail-il1-x134.google.com with SMTP id m20so8841631ilj.13 for ; Mon, 01 Feb 2021 09:28:56 -0800 (PST) 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=Nmi+suSrpZfRwUpuA9SDfz6AzQTTcweGvCEfMikGM/s=; b=SCjwns0xGu4PCRVAJxUo4cKOUR203WZ9Rix9ZEVp+QhKiTx9EOir+C4rbRwdem6Q+W szdAGcuBPF8xNcHUvWeTrt53S6TtRwh086q5BVt7Lwz+n6qfiZkjvaCjBcGoQVip/Tv9 ZeCUTwIbbAqlDUFA35dg9xRJupeMAdjl5qHMpssAtmNMGQkHZ2TSJYBIaPsrRpQs4z10 9AwkcdrDmMHUFN06WBX1Gvn39GbTH0ZcL3T+qwLm3ZnQ3qjqphmvgv+K2g1SYlYYJGYQ M6QlS7HoNWNSTa+sZtjFNjBPXQA+IO5Oi4fPOgZXWUqa9I0w6NVofqT4iao6epSrkbtR M38Q== 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=Nmi+suSrpZfRwUpuA9SDfz6AzQTTcweGvCEfMikGM/s=; b=P6uHEwag5Gb+jzlsvqE3wO0j3DYJ13u2BaHnELirj3Ls9NL6tvLhX1VjWBeKFnMklo Be7ezyaKYqWM+DEonNwzExo9wUknR+Z2cHBVeiXph2UGBU3Wbry2d20dVFs/ogJpA4cz yyelxovytwFLDRUYVWkLRvSA+HFp1b2pRO8Ajxsee4Qa/lsuOa5KlZU5wCNDkSrDoHhV b6b0WZCTnx7Xsb/DdT6BzpwMSIcypbHC+i20g3x/VgNQUUfABZGqf+glBygWhOm5ECB/ GVdrLJE8FF/McBdaZui+cPsJNuNCda4CnCljhlICyv0zJnN0n4v9VBGs76cQKoBFufKp BoYQ== X-Gm-Message-State: AOAM532vLF/Fe6xQcdZSgY/UPa4pH/3ucZ45tmLn0b3HZLgANnwQsi6s eG7NcSAR9hK4rz0LEb7KlerBuA== X-Received: by 2002:a05:6e02:19cc:: with SMTP id r12mr14043945ill.4.1612200535576; Mon, 01 Feb 2021 09:28:55 -0800 (PST) Received: from presto.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id v2sm9529856ilj.19.2021.02.01.09.28.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Feb 2021 09:28:54 -0800 (PST) From: Alex Elder To: davem@davemloft.net, kuba@kernel.org Cc: willemdebruijn.kernel@gmail.com, elder@kernel.org, evgreen@chromium.org, bjorn.andersson@linaro.org, cpratapa@codeaurora.org, subashab@codeaurora.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next v2 1/7] net: ipa: don't thaw channel if error starting Date: Mon, 1 Feb 2021 11:28:44 -0600 Message-Id: <20210201172850.2221624-2-elder@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210201172850.2221624-1-elder@linaro.org> References: <20210201172850.2221624-1-elder@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org If an error occurs starting a channel, don't "thaw" it. We should assume the channel remains in a non-started state. Update the comment in gsi_channel_stop(); calls to this function are no longer retried. Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.27.0 diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c index f79cf3c327c1c..4a3e125e898f6 100644 --- a/drivers/net/ipa/gsi.c +++ b/drivers/net/ipa/gsi.c @@ -885,7 +885,9 @@ int gsi_channel_start(struct gsi *gsi, u32 channel_id) mutex_unlock(&gsi->mutex); - gsi_channel_thaw(channel); + /* Thaw the channel if successful */ + if (!ret) + gsi_channel_thaw(channel); return ret; } @@ -910,7 +912,7 @@ int gsi_channel_stop(struct gsi *gsi, u32 channel_id) mutex_unlock(&gsi->mutex); - /* Thaw the channel if we need to retry (or on error) */ + /* Re-thaw the channel if an error occurred while stopping */ if (ret) gsi_channel_thaw(channel);