From patchwork Fri Jan 29 20:20:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 373365 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp2522102jam; Fri, 29 Jan 2021 12:26:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJzVMqPPwoC2DgLGacVHZ5eb6ilSuq8acxsKcUEkSK1ykx55j0g2yKm6SXV1JEQ7PuRuO47A X-Received: by 2002:aa7:d8c6:: with SMTP id k6mr7250405eds.265.1611951982323; Fri, 29 Jan 2021 12:26:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611951982; cv=none; d=google.com; s=arc-20160816; b=PB+oibbv6ECQTNX/sKYEmPw4b3thTFl5403eX1sd14tCderistyzNi0tFfm3Ljfm03 9yxLfok2CGiyLldi8F4pzevSgSjH0fBMmJYFHMnPsxRwCFAT7n5XGu3jRFCE8ej1wyOl Rs/ohHVRVSyOQ7qhloiWsL/2F5PO/Og2PcQlet6gi5ZPjAS2h9Xh3lXJVrMW25gIzebJ pHLdYwUQOgFKiEgJWYlSVTx6wecx2lKTr61gw0hFQ5DMCLZErZnJcgfciy9tNSkmsxoe 5goEH+bqhZgabbQZrR2ZGVJkXwMOxy2Wzuow2WT/+xCR6xHPlpQ0Y0JppJVjMqeMZBvo 4p8w== 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=IyvOnmoZSqo2WxAcwPn8wTudNnGv17LW2Bgf4MzbHMg=; b=xc7RR6yrJX65snW0u+2uq8hbRuANr97uGog/YvJXGbsKw3nhxQtKDy2sL7RFDUZIKF jkN4iHAJr43lUhF56wHaUdg9uzMDBppBDjy56EVbyuSs4uR9SSlUqGq3rF/OCmkwswVJ yg3uDhWfwuqJRaiCC3hfBTf9IDfJJBenuF2rsgNA3KzEhXnyiesuMWChQnEsZEHJukZD G3//wHwdGrVYkU2JK21I7hOIKEeS29+P0R/XWEoX/8EXRqSQs9e8tEBA+u418UYx4f8P GYvq5bJuYR9ahYVs3HowyHLIkxzqn10Gjah3Ws3NSxGYVcWeJN0T7/6VJxlU43qewUEw 10ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VQH3LBiT; 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 bo9si6108047edb.435.2021.01.29.12.26.21; Fri, 29 Jan 2021 12:26:22 -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=VQH3LBiT; 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 S233374AbhA2UYu (ORCPT + 7 others); Fri, 29 Jan 2021 15:24:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233231AbhA2UWn (ORCPT ); Fri, 29 Jan 2021 15:22:43 -0500 Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4795DC061351 for ; Fri, 29 Jan 2021 12:20:31 -0800 (PST) Received: by mail-io1-xd2e.google.com with SMTP id u7so10625600iol.8 for ; Fri, 29 Jan 2021 12:20:31 -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=IyvOnmoZSqo2WxAcwPn8wTudNnGv17LW2Bgf4MzbHMg=; b=VQH3LBiTtAbVKsZ7bIPXv7N8Y56z2hGZVXASfmr8S5wK+/kuidN/tbI9eHA0E0zRtb s8EFwpujww5HWIcvaZchgGw+NwsCiBoMZZZjGizwuiVgyydyKupHLHqtPQaA7jYopSIC tHAuzDpHpxuwC1YpexvhBx8xxLgcIwp0IBIZITDnCa9cECdBL8D7yd7NwyEs60t5jYSi sBpnZjy5o7qtwEJjMH+KamWH8hw3yxzAF8T5BU5SKooTY1AlL7t8rOB1L0bc2PrVcG+4 EUV8MHriOpg2bVjwT5y4KKeYM7Qrnsgd7l7G5kelkwfLlzHtxx3xTqm4vf+yfaBPtm5K aEWg== 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=IyvOnmoZSqo2WxAcwPn8wTudNnGv17LW2Bgf4MzbHMg=; b=KDJUiujM06nFw+BwfQbkXsdA5wgSdbJs3W7qWhSnspsCgwlGNynv0Y27GfYScl48vY vrgS0Udb4eBZh/orAZzYW4ipNkynA6C8uv8Hxy/57H1RMwuqJUo0I/kCEOHMs9ekpbad 49B6MCNjvBwrAR3YN5fH3jmuxHWxcrEjtsbaZevAyK3H1cJerPnSRsiQgaJ8buiaREBm /GIfcyoT1PPMRhdnm6jxTl5et82ilJEKUsbalKnDQDS+AW60KdJFH4DPi2SySI+XxWuc KJFIk0wps3Xd9cEyS7t69QQ/ar5vIFaYCrJjQ+J1/Wb45xe+r9/I85rCkJMuFfob8igc C/gA== X-Gm-Message-State: AOAM532lyWMLFWI6gji8Uxg3yVfJOUSUJv+0x8VYqV6c8nwPyxj6iiBL FsiFbDRf2z4PxX0+GsYWWUt2Mg== X-Received: by 2002:a5d:8ac5:: with SMTP id e5mr4770819iot.33.1611951630792; Fri, 29 Jan 2021 12:20:30 -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.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 12:20:30 -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 7/9] net: ipa: don't disable IEOB interrupt during suspend Date: Fri, 29 Jan 2021 14:20:17 -0600 Message-Id: <20210129202019.2099259-8-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 No completion interrupts will occur while an endpoint is suspended, or when a channel has been stopped for suspend. So there's no need to disable the interrupt during suspend and re-enable it when resuming. We'll enable the interrupt when we first start the channel, and disable it again only when it's "really" stopped. Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) -- 2.27.0 diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c index 70647e8450845..74d1dd04ad6e9 100644 --- a/drivers/net/ipa/gsi.c +++ b/drivers/net/ipa/gsi.c @@ -959,30 +959,16 @@ void gsi_channel_reset(struct gsi *gsi, u32 channel_id, bool doorbell) int gsi_channel_suspend(struct gsi *gsi, u32 channel_id, bool stop) { struct gsi_channel *channel = &gsi->channel[channel_id]; - int ret; - /* No completions when suspended; disable interrupt if successful */ - ret = __gsi_channel_stop(channel, stop); - if (!ret) - gsi_irq_ieob_disable_one(gsi, channel->evt_ring_id); - - return ret; + return __gsi_channel_stop(channel, stop); } /* Resume a suspended channel (starting will be requested if STOPPED) */ int gsi_channel_resume(struct gsi *gsi, u32 channel_id, bool start) { struct gsi_channel *channel = &gsi->channel[channel_id]; - int ret; - /* Re-enable the completion interrupt */ - gsi_irq_ieob_enable_one(gsi, channel->evt_ring_id); - - ret = __gsi_channel_start(channel, start); - if (ret) - gsi_irq_ieob_disable_one(gsi, channel->evt_ring_id); - - return ret; + return __gsi_channel_start(channel, start); } /**