Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp322036ybh; Mon, 20 Jul 2020 18:02:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGXWW+xwMh4bMq234L+823PX20YKvCm1CyLTT+u7mS2Yy32X0h+eE5M36S6zQ2L5kX6E2b X-Received: by 2002:aa7:ccd5:: with SMTP id y21mr23145005edt.91.1595293357269; Mon, 20 Jul 2020 18:02:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595293357; cv=none; d=google.com; s=arc-20160816; b=W9nlj27pisNt7djxkcsHEZqL49F4Dhn1gouaHsloa6JYcoqGiCXBWctwyoQDbFwC9I u+HOm17LiUfe+dq7vdCb7lUTyTtz3NLxuyZ+uA/UZN8FWU0O1RJciDXQOllDzdH/kx4D CzWUH5Neg2gVqO+RwaRtBKVX6zmT8FCu6acX4xhXTQuIFr07ZkEUsqrojR948FOHsTpv mkkife5c1Gvi4hArhdiRNJ8b7BzkdgueKxhO3kOdiziJ9kDy5oS9p1hQ9gumwcp+5QF8 EzL7+ejd7G1WD6+51JuK6AZTlXDZvRGepyl4SOybXv7bGaoWp21nMxIDQ+iSSQX88bMf jzXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=b73CKe6w4KSCHZVj9r0P+XK9mFUv5BSD0MlkJHbU5FA=; b=eZamuSvVchXyEJ03vQgfQpU0c4LdJPTM2hSSw91rfOkRclNJapRS2Nt8oyhW3x2tNK wlp1x972O95zRcUWoUWnt3KRpE5Sf3S7/fzl5kmwEIRU9Xzji7SSDI63xRXUdhM3CU7G jgS58817loK5gsnGsXGgymlcb5xpKLG1ibBGB9oJI90XdfshMLhAiADIpE2+eYOTF38F L9SURu3rW61LwuBe9BMylfYm0IW2P7a/FQAqgVW3+cFgORWfQo1zlj/HRp7aCbDqlq7O 1+nhcg7KGURHprzqaA8iyknpPmVdbTiKnrybWRF8tN6/qnHX/Rhi0sWhtNR0n0hyT2hB 2lCA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mb18si12361796ejb.384.2020.07.20.18.02.13; Mon, 20 Jul 2020 18:02:37 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728125AbgGUBB3 (ORCPT + 99 others); Mon, 20 Jul 2020 21:01:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726127AbgGUBB2 (ORCPT ); Mon, 20 Jul 2020 21:01:28 -0400 Received: from shards.monkeyblade.net (shards.monkeyblade.net [IPv6:2620:137:e000::1:9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFC94C061794; Mon, 20 Jul 2020 18:01:28 -0700 (PDT) Received: from localhost (unknown [IPv6:2601:601:9f00:477::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 2245411FFC7ED; Mon, 20 Jul 2020 17:44:43 -0700 (PDT) Date: Mon, 20 Jul 2020 18:01:27 -0700 (PDT) Message-Id: <20200720.180127.766376211786885544.davem@davemloft.net> To: vaibhavgupta40@gmail.com Cc: helgaas@kernel.org, bhelgaas@google.com, bjorn@helgaas.com, vaibhav.varodek@gmail.com, christopher.lee@cspi.com, kuba@kernel.org, linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, skhan@linuxfoundation.org, netdev@vger.kernel.org Subject: Re: [PATCH v1] ethernet: myri10ge: use generic power management From: David Miller In-Reply-To: <20200720161930.777974-1-vaibhavgupta40@gmail.com> References: <20200720161930.777974-1-vaibhavgupta40@gmail.com> X-Mailer: Mew version 6.8 on Emacs 26.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 20 Jul 2020 17:44:43 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vaibhav Gupta Date: Mon, 20 Jul 2020 21:49:31 +0530 > Drivers using legacy PM have to manage PCI states and device's PM states > themselves. They also need to take care of configuration registers. > > With improved and powerful support of generic PM, PCI Core takes care of > above mentioned, device-independent, jobs. > > This driver makes use of PCI helper functions like > pci_save/restore_state(), pci_enable/disable_device(), > pci_set_power_state() and pci_set_master() to do required operations. In > generic mode, they are no longer needed. > > Change function parameter in both .suspend() and .resume() to > "struct device*" type. Use to_pci_dev() and dev_get_drvdata() to get > "struct pci_dev*" variable and drv data. > > Compile-tested only. > > Signed-off-by: Vaibhav Gupta Applied, thank you.