Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp1230990pxb; Fri, 13 Aug 2021 17:45:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6o8LWjwpVBIltxxEisBsyWML4vH7Cdj+rKRKbVpHxgbcflhUOTOtJnODDuqVxa+jXiYbT X-Received: by 2002:a6b:f205:: with SMTP id q5mr4146254ioh.158.1628901903367; Fri, 13 Aug 2021 17:45:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628901903; cv=none; d=google.com; s=arc-20160816; b=nlPa37vJn1LAo//I3mEfhGVZwA9PzsCYtglYbfj2K42S83OXwU/W8R+o7R6dntdjVm yiNS3zgjqbOEkpRgCmDYzG/DRuiuC1fSX2FeG+damYb0q2fj1DH7pjnneKePnAQ/jUvf ea2X5TFqf4lsKBDztx4babQDMqgD9bkGqG+HnSknMrN+6tG9zpzpc/rgJ2RiafyDCYYy +vcMDjFaPpW7porccIyW/pCq1zRn7CY/EEn1yMCz28dsFsRadwPcEn8+xA8NPrIzpMqZ GRFLNfLmctygjRR7TdXYbDB4X804/1HKFZ3iUh2OlOKhDbefbHC7hfygcgRm70LBgj/T A1RQ== 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:subject:cc:to:from:date :dkim-signature; bh=t7G1jlsgGyjWZ/DM5/tpPyqfIt4xcnKhsd6RXvDqPzY=; b=SzUg4CitLgLdl1qeW2ckhKaSjVAxWM0ZJWTuGb7Pjrn+FE3VgHyILsiq0mumjVwdjo ue1Cf7YY+eIUFLwmSdvVyqwUWUgVPNETD0fZL3KV4jj4fmJKn8BU1f43hn/VhKATEJrf Jfp1aG4H2XGRy80MPn5tMiZ/Z79NurOgIlfFlNfouBA2JIje6ImTenqcs4VTTICLzI/Q xaCdxtPWvTLzpbHUGilIPdjIqJ5KwEI2/VRNxTwWFddyK4LKyFztSIem4bLmS7jDBDaq eJX+2plKYrU5IC2erZf40lzJPlHEOL+qzDT4Pj1WZbCtkKr62diDJqoQ9aV5maCIRSB/ hBQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=S3WAg5bG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n5si3699845ilk.136.2021.08.13.17.44.49; Fri, 13 Aug 2021 17:45:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@kernel.org header.s=k20201202 header.b=S3WAg5bG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235904AbhHNAof (ORCPT + 99 others); Fri, 13 Aug 2021 20:44:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:55796 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235330AbhHNAoe (ORCPT ); Fri, 13 Aug 2021 20:44:34 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 25BF760FBF; Sat, 14 Aug 2021 00:44:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628901847; bh=G+5OzDZx9dP3JaM+1Iut/Gwy5KjuYkh5MvoFa/6DAiA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=S3WAg5bG7oKZVEqbXdEc89pXe9i185EftwfLL9JslUgsAvRMMvbXM/XPlTK9fehrV sO5VTUc5AhwVvVRjj+gz8jMSyOiLDsFPzjz0CUv3OqulU3HS+3RXng76JBZzspLXoH 6swN2jMNl3nUyz2u8TWeTuApILBd3MObVL2bOUZMTouIEp+HurWyJb22aDrfxcdUPo yEp39ji8PHn7m+hsWRuy3WMDhUlqvW/GVbKumCkWZtWqK4b+tJ5+DsA6cB/gL+rmqt J7y8DgCfmbH2GmqRrU3FUe2046l9zZl9FTgL2aTIKgW0snTwFvxUTDYMByvgE08OPp WMts+b3NUo8qA== Date: Fri, 13 Aug 2021 17:44:06 -0700 From: Jakub Kicinski To: Alex Elder Cc: davem@davemloft.net, bjorn.andersson@linaro.org, evgreen@chromium.org, cpratapa@codeaurora.org, subashab@codeaurora.org, elder@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 3/6] net: ipa: re-enable transmit in PM WQ context Message-ID: <20210813174406.5e7fc350@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20210812195035.2816276-4-elder@linaro.org> References: <20210812195035.2816276-1-elder@linaro.org> <20210812195035.2816276-4-elder@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 12 Aug 2021 14:50:32 -0500 Alex Elder wrote: > +/** > + * ipa_modem_wake_queue_work() - enable modem netdev queue > + * @work: Work structure > + * > + * Re-enable transmit on the modem network device. This is called > + * in (power management) work queue context, scheduled when resuming > + * the modem. > + */ > +static void ipa_modem_wake_queue_work(struct work_struct *work) > +{ > + struct ipa_priv *priv = container_of(work, struct ipa_priv, work); > + > + netif_wake_queue(priv->ipa->modem_netdev); > +} > + > /** ipa_modem_resume() - resume callback for runtime_pm > * @dev: pointer to device > * > @@ -205,7 +226,8 @@ void ipa_modem_resume(struct net_device *netdev) > ipa_endpoint_resume_one(ipa->name_map[IPA_ENDPOINT_AP_MODEM_TX]); > ipa_endpoint_resume_one(ipa->name_map[IPA_ENDPOINT_AP_MODEM_RX]); > > - netif_wake_queue(netdev); > + /* Arrange for the TX queue to be restarted */ > + (void)queue_pm_work(&priv->work); > } Why move the wake call to a work queue, tho? It's okay to call it from any context.