diff mbox series

[v3,17/28] scsi: pm_8001: Drop PCI Wakeup calls from .resume

Message ID 20201001122511.1075420-18-vaibhavgupta40@gmail.com
State New
Headers show
Series scsi: use generic power management | expand

Commit Message

Vaibhav Gupta Oct. 1, 2020, 12:25 p.m. UTC
The driver calls pci_enable_wake(...., false) in pm8001_pci_resume(), and
there is no corresponding pci_enable_wake(...., true) in
pm8001_pci_suspend(). Either it should do enable-wake the device in
.suspend() or should not invoke pci_enable_wake() at all.

Concluding that this driver doesn't support enable-wake and PCI core calls
pci_enable_wake(pci_dev, PCI_D0, false) during resume, drop it from
pm8001_pci__resume().

Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com>
---
 drivers/scsi/pm8001/pm8001_init.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Jinpu Wang Oct. 1, 2020, 12:53 p.m. UTC | #1
On Thu, Oct 1, 2020 at 2:30 PM Vaibhav Gupta <vaibhavgupta40@gmail.com> wrote:
>

> The driver calls pci_enable_wake(...., false) in pm8001_pci_resume(), and

> there is no corresponding pci_enable_wake(...., true) in

> pm8001_pci_suspend(). Either it should do enable-wake the device in

> .suspend() or should not invoke pci_enable_wake() at all.

>

> Concluding that this driver doesn't support enable-wake and PCI core calls

> pci_enable_wake(pci_dev, PCI_D0, false) during resume, drop it from

> pm8001_pci__resume().

>

> Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com>

Looks good to me!
Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com>


Thanks!
> ---

>  drivers/scsi/pm8001/pm8001_init.c | 1 -

>  1 file changed, 1 deletion(-)

>

> diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c

> index 9e99262a2b9d..ee27ecb17560 100644

> --- a/drivers/scsi/pm8001/pm8001_init.c

> +++ b/drivers/scsi/pm8001/pm8001_init.c

> @@ -1248,7 +1248,6 @@ static int pm8001_pci_resume(struct pci_dev *pdev)

>                 "operating state [D%d]\n", pdev, pm8001_ha->name, device_state);

>

>         pci_set_power_state(pdev, PCI_D0);

> -       pci_enable_wake(pdev, PCI_D0, 0);

>         pci_restore_state(pdev);

>         rc = pci_enable_device(pdev);

>         if (rc) {

> --

> 2.28.0

>
diff mbox series

Patch

diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
index 9e99262a2b9d..ee27ecb17560 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -1248,7 +1248,6 @@  static int pm8001_pci_resume(struct pci_dev *pdev)
 		"operating state [D%d]\n", pdev, pm8001_ha->name, device_state);
 
 	pci_set_power_state(pdev, PCI_D0);
-	pci_enable_wake(pdev, PCI_D0, 0);
 	pci_restore_state(pdev);
 	rc = pci_enable_device(pdev);
 	if (rc) {