Skip to contentSkip to conversation

sil3531: has no PM capability, remove support.

PATCH In review philby john 2 participants 3 messages Apr 9, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sil3531: has no PM capability, remove support.

From: Philby John <[email protected]>
Date: Mon, 9 Apr 2012 19:09:51 +0530
Subject: [PATCH] sil3531: has no PM capability, remove support.

SATA sil3531 does not support Power Management Capability and as per the manual Bit [31:27] is hardwired to 00h. Otherwise, when the device goes into suspend/resume the Power Management Control + Status registers are accessed and the arch specific readl()/__raw_readl() calls block indefinitely.

This patch sets the PCI_DEV_FLAGS_NO_D3 flag by which the if condition in pci_set_power_state() evaluates to true and pci_raw_set_power_state() functions are not executed.

---
 drivers/pci/pci.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/pci/pci.c +1 -0
index 8156744..129120d 100644
@@ -1863,6 +1863,7 @@ void pci_pm_init(struct pci_dev *dev)
 		pci_pme_active(dev, false);
 	} else {
 		dev->pme_support = 0;
+		dev->dev_flags |= PCI_DEV_FLAGS_NO_D3;
 	}
 }
 
Signature · 1 line
1.6.3.3.340.g77d18
#1 lore raw
Quoted 25 lines · philby john

From: Philby John<[email protected]>
Date: Mon, 9 Apr 2012 19:09:51 +0530
Subject: [PATCH] sil3531: has no PM capability, remove support.

SATA sil3531 does not support Power Management Capability and as per the manual Bit [31:27] is hardwired to 00h. Otherwise, when the device goes into suspend/resume the Power Management Control + Status registers are accessed and the arch specific readl()/__raw_readl() calls block indefinitely.

This patch sets the PCI_DEV_FLAGS_NO_D3 flag by which the if condition in pci_set_power_state() evaluates to true and pci_raw_set_power_state() functions are not executed.

---
  drivers/pci/pci.c |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
drivers/pci/pci.c +0 -0
index 8156744..129120d 100644

drivers/pci/pci.c void pci_pm_init(struct pci_dev *dev) · line 1866

Quoted 4 lines
drivers/pci/pci.c +1 -0
@@ -1863,6 +1863,7 @@ void pci_pm_init(struct pci_dev *dev)
  		pci_pme_active(dev, false);
  	} else {
  		dev->pme_support = 0;
+		dev->dev_flags |= PCI_DEV_FLAGS_NO_D3;

This patch applies to -every- piece of PCI hardware out there, not just the sil3531...

Jeff

#2 lore raw
Quoted 21 lines · Jeff Garzik
Quoted 20 lines · philby john

From: Philby John<[email protected]>
Date: Mon, 9 Apr 2012 19:09:51 +0530
Subject: [PATCH] sil3531: has no PM capability, remove support.

SATA sil3531 does not support Power Management Capability and as per the manual Bit [31:27] is hardwired to 00h. Otherwise, when the device goes into suspend/resume the Power Management Control + Status registers are accessed and the arch specific readl()/__raw_readl() calls block indefinitely.

This patch sets the PCI_DEV_FLAGS_NO_D3 flag by which the if condition in pci_set_power_state() evaluates to true and pci_raw_set_power_state() functions are not executed.

---
  drivers/pci/pci.c |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
Quoted 13 lines

drivers/pci/pci.c void pci_pm_init(struct pci_dev *dev) · line 1866

Quoted 9 lines
drivers/pci/pci.c +1 -0
index 8156744..129120d 100644
@@ -1863,6 +1863,7 @@ void pci_pm_init(struct pci_dev *dev)
  		pci_pme_active(dev, false);
  	} else {
  		dev->pme_support = 0;
+		dev->dev_flags |= PCI_DEV_FLAGS_NO_D3;

This patch applies to -every- piece of PCI hardware out there, not just the sil3531...

But if pme_support is zero, isn't it ok to set dev_flags to PCI_DEV_FLAGS_NO_D3 ?

Regards,
Philby