From patchwork Fri Jan 29 20:20:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 373356 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp2520443jam; Fri, 29 Jan 2021 12:23:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJw5tcAD9zkYsx+cfveSb02dRd1wEh4IZ1YtNJK4mw8Yqyb7hYHQgpF+bHwDqFAs2XKJ7/JB X-Received: by 2002:a17:906:3899:: with SMTP id q25mr6283789ejd.173.1611951801639; Fri, 29 Jan 2021 12:23:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611951801; cv=none; d=google.com; s=arc-20160816; b=gn3yaBVnFOacP2+xD5HgoNv58Z1UTbCF5BTws9leJZ1I8mI4ArVC3TkdiBTYRFeVpE JUE4Ui4C8jzMFjVXSpTAr9s9577+crb0nvWKeh86lBY2Wga+EzesZ49ohY/AOgYUHovp knxjdQy9aEVp49rZjuWMIAY9okoQDcBROGqqAPoFpssit5rsfVIdrdNMyt8AxhCfTM94 +MR+58R++p9mfDq4BQCPb35cdOhcJKWrdOkNewDWGOwi4mckNAilNsnSsiA/qb+uKzEt RQsgovmcMnhuibWEKYcFemyLtkN4D7W2pvC6mEn8cIVSxJfuUxUSvgT02OzulK1HXrVi 3QwQ== 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=KTuHAn9OfqeY3lac31rjWWvnuONhCRgNtLqnNnrmMyE=; b=eAvACNCxPz4A0nnNbBYP4jAN4Xnm6yyHCno+TpKAZt6rrMuPerEeG4l3pc7RS61wAu 89KFtfWGFfu52knM+TtEYmnatvojmgwZqR6PuVIE1O3q8h1v38eTtB0jGiV+fn6z+170 w5f1BeKjmP/ap3C5VUStf/ECqe5vgbRKHVsxYuVzYZFeCrKnGy205vZWGbB7JBH6dIjF dkGNUVRAgYjuSpyeintVFq6QJo9ZbnHsCCBAuzORxvDjwZBiCisBir3iJMU6thDeHRQ7 qK8eoZcUK05w1vLF4iQFSBdskCYQr0RMqO6joLkWq9YsruX5QP82fYTtRaPNCgsxzIzJ nlxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="b09q/t9c"; 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 a4si6007595edv.410.2021.01.29.12.23.21; Fri, 29 Jan 2021 12:23:21 -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="b09q/t9c"; 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 S233281AbhA2UWK (ORCPT + 7 others); Fri, 29 Jan 2021 15:22:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233055AbhA2UVZ (ORCPT ); Fri, 29 Jan 2021 15:21:25 -0500 Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com [IPv6:2607:f8b0:4864:20::d31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D40C3C0613ED for ; Fri, 29 Jan 2021 12:20:24 -0800 (PST) Received: by mail-io1-xd31.google.com with SMTP id 16so10662580ioz.5 for ; Fri, 29 Jan 2021 12:20:24 -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=KTuHAn9OfqeY3lac31rjWWvnuONhCRgNtLqnNnrmMyE=; b=b09q/t9cXwHgn7gEz1ttOt0SKrpalrnMta/O+XS2r+PGF8M+qlHiFlxmrR5nMKCaBl yDIpYLL+7ArJQAOTQ2o8o3YB766fkqL6XyZcWu6/63/ALThIKdAj0zUJa3ErrgFY692t lO5kDXekRAlBZcLQtsgtIZH4ejgngrn2Hp0BtKJBbca7Zq6/wB82hp3IdA5iDl/jc4dP fP8kUtcSTVr2coltsP6uqyfwtayE6GxlIhd36tiN1neHslxACPjtBKVZ9xQLAl3ORdA/ GL6/cjiP4rmANwegY/UhElaZNdhxaVJUY0kC7peRjXwhDuTuXhQwE1C0zq9mFlM3QP0I ZcHg== 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=KTuHAn9OfqeY3lac31rjWWvnuONhCRgNtLqnNnrmMyE=; b=lZyuOjH25AwHE3+WayPP7C95iLGt/zgl3rosApMdw7O8I7Dt9yK/saffasu93T3THo zAmx0daBEyobzsCkzqMDaxotlJ3ctDZEMKt64xvg1Pni5AeMcX+LsZM+77qwxumHgAy5 Cth6WGU/B+QqowjmCxzkFtHsCRVi9i5UeG7UdZDh3MxxXljBmzkhxKNOkQV063qBGHS/ +g3Qa7uDm/WgMQjuj6LgeglyOiwICw0NRWQ8RgR6EaK0kMk7mSfmPeCLZsqV4TFHA7xW 3dEK7Eu2BkCBUGJpAdDwSca6Z+3IQP+EQs/nNJaCU0gYwijhaHNp97ohT9wafeqq9NPN nxlw== X-Gm-Message-State: AOAM532KxjhHtHuAnvuHMOuLExBO8FIVZL8c5XlN+1RK4TRp1XicMdFf uK7AN2K0xxdEEvmIFFz9vlBH2A== X-Received: by 2002:a02:cead:: with SMTP id z13mr5219880jaq.62.1611951624296; Fri, 29 Jan 2021 12:20:24 -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 h23sm4645738ila.15.2021.01.29.12.20.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 12:20:23 -0800 (PST) From: Alex Elder To: davem@davemloft.net, kuba@kernel.org Cc: 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 1/9] net: ipa: don't thaw channel if error starting Date: Fri, 29 Jan 2021 14:20:11 -0600 Message-Id: <20210129202019.2099259-2-elder@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210129202019.2099259-1-elder@linaro.org> References: <20210129202019.2099259-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);