From: ojab <ojab@ojab.ru>
To: Sathya Prakash <sathya.prakash@broadcom.com>,
Chaitra P B <chaitra.basappa@broadcom.com>,
Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com>,
"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, ojab <ojab@ojab.ru>
Subject: [PATCH V2] mpt3sas: disable ASPM for MPI2 controllers
Date: Wed, 28 Dec 2016 11:05:24 +0000 [thread overview]
Message-ID: <20161228110524.7516-1-ojab@ojab.ru> (raw)
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
next reply other threads:[~2016-12-28 11:05 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-28 11:05 ojab [this message]
2017-01-06 1:54 ` [PATCH V2] mpt3sas: disable ASPM for MPI2 controllers 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
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=20161228110524.7516-1-ojab@ojab.ru \
--to=ojab@ojab.ru \
--cc=chaitra.basappa@broadcom.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=sathya.prakash@broadcom.com \
--cc=suganath-prabu.subramani@broadcom.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.