mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vaibhav Gupta <vaibhavgupta40@gmail.com>
To: Artur Paszkiewicz <artur.paszkiewicz@intel.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Vaibhav Gupta <vaibhavgupta40@gmail.com>,
	Intel SCU Linux support <intel-linux-scu@intel.com>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v1] scsi: isci: Don't use PCI helper functions
Date: Sat,  7 Nov 2020 15:34:19 +0530	[thread overview]
Message-ID: <20201107100420.149521-1-vaibhavgupta40@gmail.com> (raw)

PCI helper functions such as pci_enable/disable_device(),
pci_save/restore_state(), pci_set_power_state(), etc. were used by the
legacy framework to perform standard operations related to PCI PM.

This driver is using the generic framework and thus calls for those
functions should be dropped as those tasks are now performed by the PCI
core.

Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com>
---
 drivers/scsi/isci/init.c | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/drivers/scsi/isci/init.c b/drivers/scsi/isci/init.c
index 93bc9019667f..c452849e7bb4 100644
--- a/drivers/scsi/isci/init.c
+++ b/drivers/scsi/isci/init.c
@@ -715,10 +715,6 @@ static int isci_suspend(struct device *dev)
 		isci_host_deinit(ihost);
 	}
 
-	pci_save_state(pdev);
-	pci_disable_device(pdev);
-	pci_set_power_state(pdev, PCI_D3hot);
-
 	return 0;
 }
 
@@ -726,19 +722,7 @@ static int isci_resume(struct device *dev)
 {
 	struct pci_dev *pdev = to_pci_dev(dev);
 	struct isci_host *ihost;
-	int rc, i;
-
-	pci_set_power_state(pdev, PCI_D0);
-	pci_restore_state(pdev);
-
-	rc = pcim_enable_device(pdev);
-	if (rc) {
-		dev_err(&pdev->dev,
-			"enabling device failure after resume(%d)\n", rc);
-		return rc;
-	}
-
-	pci_set_master(pdev);
+	int i;
 
 	for_each_isci_host(i, ihost, pdev) {
 		sas_prep_resume_ha(&ihost->sas_ha);
-- 
2.28.0


             reply	other threads:[~2020-11-07 10:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-07 10:04 Vaibhav Gupta [this message]
2020-11-07 10:05 ` Vaibhav Gupta
2020-11-09 13:38 ` Artur Paszkiewicz
2020-11-11  4:08 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201107100420.149521-1-vaibhavgupta40@gmail.com \
    --to=vaibhavgupta40@gmail.com \
    --cc=artur.paszkiewicz@intel.com \
    --cc=intel-linux-scu@intel.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®