From patchwork Mon Feb 1 17:28:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 374282 Delivered-To: patch@linaro.org Received: by 2002:a02:b18a:0:0:0:0:0 with SMTP id t10csp1495812jah; Mon, 1 Feb 2021 09:31:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJwUQomu9IiTf2YSygsv23ePS4+M6HQHonfNXm9qln2qCmYpO8yZVVyPx40a//63OilyAH1O X-Received: by 2002:a17:907:e92:: with SMTP id ho18mr4040656ejc.350.1612200666779; Mon, 01 Feb 2021 09:31:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612200666; cv=none; d=google.com; s=arc-20160816; b=MQRf7bgdgjxIB2oYKuGsbvTyE1ft9lmuOIVr0wGjTfgmjAtnYB5Hq8bpklYUVD0eAS F3nEi8d2X7iNBJT/39XyGkFMDXP+53sYv/cEiAdF4DkaBkDvoWEk/IIJUSqMmuJ4zoEE PoGIOL8cAXOjZlAb0oMbLC+FuH0iqT5wv3uF663TqnKvBLejpCgX0AJ6JfOjj/6zAzz6 CEtIHRsYa1BijDBZBDd99+GP3eRNIq42tw6FsYZ3E4xjQii2xcwDCEAMG1RsM/x6Ba56 9ND67xA/7CiUmHy/v8/GsLrOL35REkox19g+0feuatBqrkZUPoseb5b5ekU0VsP+4uhD Lfsg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=uLCedEHFwqPaDME/K4+4FPLqimlKNLFuYM52ltTab0E=; b=r1pWJbe4kEHu4VvTKdPqqAaV9BWTP0Uml8Yf/V16wTN7Q9f4rRjk/SrOSVzsAIMlOK qFnXU2LkmiMs/jZbrsUH7XrdkJBW008T0LoHgMikypoK1ANJG+5i2YIErgDUP218CSW/ wrUS4dxZj1d6VKyjdRwxbmvyI/YcGMD/mvXZlwO8Nh4vARp7Xt8cI0F1s5DEa0S9wGgz lnJzenLgmXNkuFjO4ZlVJICQzBfhJ+zlo+fr/aKkMhxrp0rVm4r7KlHjxoPDQLIDJ2t5 ih2bJlcTVTDjf5/Skhf1qIZzwqwhNaY042waIDFTaLA+qr/jt7uWQ68koZdD43LwVA9T eTmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ePEJY2qc; 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.06; Mon, 01 Feb 2021 09:31:06 -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=ePEJY2qc; 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 S231700AbhBAR3m (ORCPT + 7 others); Mon, 1 Feb 2021 12:29:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231280AbhBAR3e (ORCPT ); Mon, 1 Feb 2021 12:29:34 -0500 Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E087C06174A for ; Mon, 1 Feb 2021 09:28:54 -0800 (PST) Received: by mail-io1-xd2f.google.com with SMTP id h11so18199158ioh.11 for ; Mon, 01 Feb 2021 09:28:54 -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:mime-version :content-transfer-encoding; bh=uLCedEHFwqPaDME/K4+4FPLqimlKNLFuYM52ltTab0E=; b=ePEJY2qcloWxjPIxj/5TkvquPA5H1F/P4lrlFUqGBcW/SCjJZPR9Yt36rFocVv8jxd Sdn+w8WnnNuI8UG3Nby5sNs0aF30ia927hJ6IobE8tmtfKYtW2qkHApjXkRkm1jMGnYV fFhdzUJ0V/lvtIB1L33Xfg0MSAmWtP8JB1/k76Rldinglk5UhPYCG4R/f/fHGarV97pg AtEwFAHMCvFCm1Ea3ysDMseqbjmKDBI0liLYc4KHTckXm75zGWN00xSSFDHvqCkUwOMU FIWqXGEI4n5xVCib4JU2IUhRA8UAtLiUJm7hVo9RP1MxrxMi7jJyfBciJIsfIA2CbHd9 0bqQ== 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:mime-version :content-transfer-encoding; bh=uLCedEHFwqPaDME/K4+4FPLqimlKNLFuYM52ltTab0E=; b=CpFBfHVbKcZaK5AQWPnrME1w8ANvSGnqO7fYQ1IkzassJH+coPQlSmN9v0xJp28tC+ kuDkPXKQDbCaLxkA2LzhL9fsdhgF1WxMlhtQWSiCBaUWAn3/rzn83JcMFtPTj6nRrv1U 10jLc7y56hKhcfUIyzrB81sXXN9EwwQor0LQPbewFZs3DOpm49qTGaVXthR3PBHR/FJ3 XJa08qm9nI5Ymr42oA+jjvLsuNyggWT/KlF80h34iuFs/lmfc6wkOxhN4DMD07Gfdpjd bTR4q/TEWn6aCpbEpXa794JoYzZQu++4MDbiMYMVSLI4eQRggTVxTAAuncu+UblC/Ozf +1vw== X-Gm-Message-State: AOAM532PT/zKgU5x+p0VCEw+aT5c5FdWA5U69zhzLx1BKAvDBb3bcva+ 4XWwJDg8kw1KqrxvMNfG2912mw== X-Received: by 2002:a5d:9713:: with SMTP id h19mr13212099iol.14.1612200534065; Mon, 01 Feb 2021 09:28:54 -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.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Feb 2021 09:28:53 -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 0/7] net: ipa: don't disable NAPI in suspend Date: Mon, 1 Feb 2021 11:28:43 -0600 Message-Id: <20210201172850.2221624-1-elder@linaro.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This is version 2 of a series that reworks the order in which things happen during channel stop and suspend (and start and resume), in order to address a hang that has been observed during suspend. The introductory message on the first version of the series gave some history which is omitted here. The end result of this series is that we only enable NAPI and the I/O completion interrupt on a channel when we start the channel for the first time. And we only disable them when stopping the channel "for good." In other words, NAPI and the completion interrupt remain enabled while a channel is stopped for suspend. One comment on version 1 of the series suggested *not* returning early on success in a function, instead having both success and error paths return from the same point at the end of the function block. This has been addressed in this version. In addition, this version consolidates things a little bit, but the net result of the series is exactly the same as version 1 (with the exception of the return fix mentioned above). First, patch 6 in the first version was a small step to make patch 7 easier to understand. The two have been combined now. Second, previous version moved (and for suspend/resume, eliminated) I/O completion interrupt and NAPI disable/enable control in separate steps (patches). Now both are moved around together in patch 5 and 6, which eliminates the need for the final (NAPI-only) patch. I won't repeat the patch summaries provided in v1: https://lore.kernel.org/netdev/20210129202019.2099259-1-elder@linaro.org/ Many thanks to Willem de Bruijn for his thoughtful input. -Alex Alex Elder (7): net: ipa: don't thaw channel if error starting net: ipa: introduce gsi_channel_stop_retry() net: ipa: introduce __gsi_channel_start() net: ipa: kill gsi_channel_freeze() and gsi_channel_thaw() net: ipa: disable interrupt and NAPI after channel stop net: ipa: don't disable interrupt on suspend net: ipa: expand last transaction check drivers/net/ipa/gsi.c | 138 ++++++++++++++++++++++++++---------------- 1 file changed, 85 insertions(+), 53 deletions(-) -- 2.27.0 Acked-by: Willem de Bruijn