linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: linuxppc-dev@lists.ozlabs.org
Cc: aik@ozlabs.ru, Paul Mackerras <paulus@samba.org>,
	Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Subject: [PATCH 1/3] pci: add "fundamental reset" quirk
Date: Fri, 17 Jan 2014 16:08:46 +1100	[thread overview]
Message-ID: <1389935328-22588-2-git-send-email-aik@ozlabs.ru> (raw)
In-Reply-To: <1389935328-22588-1-git-send-email-aik@ozlabs.ru>

From: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
---
 drivers/pci/quirks.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index f6c31fa..f3eedbf 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -3271,6 +3271,19 @@ static int reset_chelsio_generic_dev(struct pci_dev *dev, int probe)
 	return 0;
 }
 
+static int reset_fundamental(struct pci_dev *dev, int probe)
+{
+	if (probe)
+		return 0;
+
+	pci_set_pcie_reset_state(dev, pcie_hot_reset);
+	msleep(250);
+	pci_set_pcie_reset_state(dev, pcie_deassert_reset);
+	msleep(1800);
+
+	return 0;
+}
+
 #define PCI_DEVICE_ID_INTEL_82599_SFP_VF   0x10ed
 #define PCI_DEVICE_ID_INTEL_IVB_M_VGA      0x0156
 #define PCI_DEVICE_ID_INTEL_IVB_M2_VGA     0x0166
@@ -3286,6 +3299,14 @@ static const struct pci_dev_reset_methods pci_dev_reset_methods[] = {
 		reset_intel_generic_dev },
 	{ PCI_VENDOR_ID_CHELSIO, PCI_ANY_ID,
 		reset_chelsio_generic_dev },
+
+	{ PCI_VENDOR_ID_IBM, PCI_ANY_ID,
+		reset_fundamental },
+	{ PCI_VENDOR_ID_MELLANOX, PCI_ANY_ID,
+		reset_fundamental },
+	{ PCI_VENDOR_ID_TI, PCI_ANY_ID,
+		reset_fundamental },
+
 	{ 0 }
 };
 
-- 
1.8.4.rc4

       reply	other threads:[~2014-01-17  5:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1389935328-22588-1-git-send-email-aik@ozlabs.ru>
2014-01-17  5:08 ` Alexey Kardashevskiy [this message]
2014-01-17  5:09   ` [PATCH 1/3] pci: add "fundamental reset" quirk Alexey Kardashevskiy
2014-01-17  5:08 ` [PATCH 2/3] PPC: KVM: fix to compile without VFIO Alexey Kardashevskiy

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=1389935328-22588-2-git-send-email-aik@ozlabs.ru \
    --to=aik@ozlabs.ru \
    --cc=cascardo@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulus@samba.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).