public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2] mpt3sas: disable ASPM for MPI2 controllers
@ 2016-12-28 11:05 ojab
  2017-01-06  1:54 ` Martin K. Petersen
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: ojab @ 2016-12-28 11:05 UTC (permalink / raw)
  To: Sathya Prakash, Chaitra P B, Suganath Prabu Subramani,
	James E.J. Bottomley, Martin K. Petersen
  Cc: linux-scsi, ojab

MPI2 controllers sometimes got lost (i. e. disappears from
/sys/bus/pci/devices) if ASMP is enabled.

Signed-off-by: Slava Kardakov <ojab@ojab.ru>
Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=60644
---
V2: use name in Signed-off-by

Not sure if it's a complete fix, but at least I can't reproduce the issue
locally with it applied.

Also it's my first patch, so I've surely screwed up some formatting etc.

 drivers/scsi/mpt3sas/mpt3sas_scsih.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index b5c966e..203651a 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
@@ -51,6 +51,7 @@
 #include <linux/workqueue.h>
 #include <linux/delay.h>
 #include <linux/pci.h>
+#include <linux/pci-aspm.h>
 #include <linux/interrupt.h>
 #include <linux/aer.h>
 #include <linux/raid_class.h>
@@ -8734,6 +8735,8 @@ _scsih_probe(struct pci_dev *pdev, const struct pci_device_id *id)

 	switch (hba_mpi_version) {
 	case MPI2_VERSION:
+		pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S |
+			PCIE_LINK_STATE_L1 | PCIE_LINK_STATE_CLKPM);
 		/* Use mpt2sas driver host template for SAS 2.0 HBA's */
 		shost = scsi_host_alloc(&mpt2sas_driver_template,
 		  sizeof(struct MPT3SAS_ADAPTER));
--
2.10.0

^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2017-02-09 23:56 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-28 11:05 [PATCH V2] mpt3sas: disable ASPM for MPI2 controllers ojab
2017-01-06  1:54 ` Martin K. Petersen
2017-01-06 15:48   ` Sreekanth Reddy
2017-01-16 12:07     ` ojab
2017-01-16 12:36       ` Sreekanth Reddy
2017-01-16 12:45         ` ojab
2017-01-16 13:31           ` Sreekanth Reddy
2017-01-16 14:03             ` ojab
2017-01-16 22:43               ` ojab
2017-01-17 14:15                 ` Sreekanth Reddy
2017-01-17 19:19                   ` ojab
2017-01-23 15:59 ` ojab
2017-01-30 10:58   ` ojab
2017-02-06  8:52     ` ojab
2017-02-06 12:02       ` Sreekanth Reddy
2017-02-06 12:55         ` ojab
2017-02-09  5:09 ` Sreekanth Reddy
2017-02-09  9:52   ` ojab
2017-02-09 23:55     ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox