Skip to contentSkip to conversation

hpsa: Disable ASPM

PATCH In review Matthew Garrett 3 participants 4 messages Feb 9, 2011

Subsystems (3)
lore
Share & tools
lore
#1 lore raw

PATCH 2/2 cciss: Disable ASPM

In reply to Matthew Garrett

https://bugzilla.redhat.com/show_bug.cgi?id=618612 indicates that current hpsa hardware has problems if ASPM is enabled. Disable it to avoid crashes.

---
 drivers/block/cciss.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/block/cciss.c +4 -0
index 516d5bb..bb77666 100644
@@ -24,6 +24,7 @@
 #include <linux/interrupt.h>
 #include <linux/types.h>
 #include <linux/pci.h>
+#include <linux/pci-aspm.h>
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
@@ -4561,6 +4562,9 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
 	InquiryData_struct *inq_buff;
 	ctlr_info_t *h;
 
+	pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1 |
+			       PCIE_LINK_STATE_CLKPM);
+
 	rc = cciss_init_reset_devices(pdev);
 	if (rc)
 		return rc;
Signature · 1 line
1.7.4
#0 lore raw

PATCH 1/2 hpsa: Disable ASPM

https://bugzilla.redhat.com/show_bug.cgi?id=618612 indicates that current hpsa hardware has problems if ASPM is enabled. Disable it to avoid crashes.

---
 drivers/scsi/hpsa.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/scsi/hpsa.c +4 -0
index 12deffc..30fb46a 100644
@@ -23,6 +23,7 @@
 #include <linux/interrupt.h>
 #include <linux/types.h>
 #include <linux/pci.h>
+#include <linux/pci-aspm.h>
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
@@ -3733,6 +3734,9 @@ static int __devinit hpsa_init_one(struct pci_dev *pdev,
 	if (number_of_controllers == 0)
 		printk(KERN_INFO DRIVER_NAME "\n");
 
+	pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1 |
+			       PCIE_LINK_STATE_CLKPM);
+
 	rc = hpsa_init_reset_devices(pdev);
 	if (rc)
 		return rc;
Signature · 1 line
1.7.4
#2 lore raw

RE: [PATCH 2/2] cciss: Disable ASPM

In reply to Matthew Garrett
Quoted 9 lines

-----Original Message-----
From: Matthew Garrett [mailto:[email protected]]
Sent: Wednesday, February 09, 2011 12:07 PM
To: [email protected]
Cc: Miller, Mike (OS Dev); ISS StorageDev; [email protected]
Subject: [PATCH 2/2] cciss: Disable ASPM

Quoted 4 lines

https://bugzilla.redhat.com/show_bug.cgi?id=618612 indicates that current
hpsa hardware has problems if ASPM is enabled. Disable it to avoid crashes.

ASPM is supposed to be fixed on both Proliant and Smart Array by the next generation of hardware. If that comes to fruition I suppose we could make this patch conditional based on whether the underlying hw really supports ASPM. Other than that this looks good.

Matthew, if Proliant BIOS tells the OS that ASPM is not supported does the OS honor that and not attempt to use ASPM? I know there was a time (maybe still is) when that bit in the ACPI table was not being set so rhel6 tried to use ASPM and hence the BZ you mention. Sorry, but I can't recall the proper terminology for the ACPI table related stuff.

-- mikem

Quoted 35 lines
---
 drivers/block/cciss.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/block/cciss.c +2 -0
index 516d5bb..bb77666 100644
@@ -24,6 +24,7 @@
 #include <linux/interrupt.h>
 #include <linux/types.h>
 #include <linux/pci.h>
+#include <linux/pci-aspm.h>
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
@@ -4561,6 +4562,9 @@ static int __devinit cciss_init_one(struct pci_dev
 *pdev,
 	InquiryData_struct *inq_buff;
 	ctlr_info_t *h;
 
+	pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S |

PCIE_LINK_STATE_L1 |

drivers/block/cciss.c +2 -1
+			       PCIE_LINK_STATE_CLKPM);
+
 	rc = cciss_init_reset_devices(pdev);
 	if (rc)
 		return rc;
--

1.7.4

#3 lore raw

Re: [PATCH 2/2] cciss: Disable ASPM

Quoted 4 lines · Mike (OS Dev)

ASPM is supposed to be fixed on both Proliant and Smart Array by the next generation of hardware. If that comes to fruition I suppose we could make this patch conditional based on whether the underlying hw really supports ASPM. Other than that this looks good.

Yes, ideally we'd make this conditional on the ID.

Quoted 5 lines

Matthew, if Proliant BIOS tells the OS that ASPM is not supported does the OS honor that and not attempt to use ASPM? I know there was a time (maybe still is) when that bit in the ACPI table was not being set so rhel6 tried to use ASPM and hence the BZ you mention. Sorry, but I can't recall the proper terminology for the ACPI table related stuff.

We ended up identifying the heuristic that HP were using to disable ASPM on Windows and that's now implemented upstream, but if this hardware's available on cards then there's the possibility that someone might try it on a machine where ASPM isn't explicitly disabled.

Signature · 1 line
Matthew Garrett | [email protected]