From: Brian King <brking@linux.vnet.ibm.com>
To: greg@kroah.com
Cc: James.Bottomley@steeleye.com, linux-scsi@vger.kernel.org,
linuxppc-dev@ozlabs.org, paulus@samba.org,
brking@linux.vnet.ibm.com, linux-pci@atrey.karlin.mff.cuni.cz
Subject: [PATCH 2/3] powerpc: Add powerpc PCI-E reset API implementation
Date: Mon, 19 Feb 2007 08:47:21 -0600 [thread overview]
Message-ID: <200702191447.l1JElNTw027077@d03av04.boulder.ibm.com> (raw)
In-Reply-To: <11718964333825-patch-mail.ibm.com>
Adds the pSeries platform implementation for a new PCI API
which can be used to issue various types of PCI-E reset,
including PCI-E warm reset and PCI-E hot reset. This is needed
for an ipr PCI-E adapter which does not properly implement BIST.
Running BIST on this adapter results in PCI-E errors. The only
reliable reset mechanism that exists on this hardware is PCI
Fundamental reset (warm reset).
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
---
linux-2.6-bjking1/arch/powerpc/platforms/pseries/eeh.c | 30 +++++++++++++++++
1 files changed, 30 insertions(+)
diff -puN arch/powerpc/platforms/pseries/eeh.c~powerpc_slot_reset_api3 arch/powerpc/platforms/pseries/eeh.c
--- linux-2.6/arch/powerpc/platforms/pseries/eeh.c~powerpc_slot_reset_api3 2007-02-01 10:29:21.000000000 -0600
+++ linux-2.6-bjking1/arch/powerpc/platforms/pseries/eeh.c 2007-02-01 10:30:59.000000000 -0600
@@ -561,6 +561,36 @@ rtas_pci_slot_reset(struct pci_dn *pdn,
}
/**
+ * pcibios_set_pcie_slot_reset - Set PCI-E reset state
+ * @dev: pci device struct
+ * @state: reset state to enter
+ *
+ * Return value:
+ * 0 if success
+ **/
+int pcibios_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state)
+{
+ struct device_node *dn = pci_device_to_OF_node(dev);
+ struct pci_dn *pdn = PCI_DN(dn);
+
+ switch (state) {
+ case pci_reset_normal:
+ rtas_pci_slot_reset(pdn, 0);
+ break;
+ case pci_reset_pcie_hot_reset:
+ rtas_pci_slot_reset(pdn, 1);
+ break;
+ case pci_reset_pcie_warm_reset:
+ rtas_pci_slot_reset(pdn, 3);
+ break;
+ default:
+ return -EINVAL;
+ };
+
+ return 0;
+}
+
+/**
* rtas_set_slot_reset -- assert the pci #RST line for 1/4 second
* @pdn: pci device node to be reset.
*
_
next prev parent reply other threads:[~2007-02-19 14:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-19 14:47 [PATCH 1/3] pci: New PCI-E reset API Brian King
2007-02-19 14:47 ` Brian King [this message]
2007-02-19 14:47 ` [PATCH 3/3] ipr: Use PCI-E reset API for new ipr adapter Brian King
2007-03-08 20:44 ` [PATCH 1/3] pci: New PCI-E reset API Brian King
2007-03-09 0:32 ` Greg KH
2007-03-09 14:53 ` Brian King
-- strict thread matches above, loose matches on Subject: below --
2007-02-01 17:30 Brian King
2007-02-01 17:30 ` [PATCH 2/3] powerpc: Add powerpc PCI-E reset API implementation Brian King
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=200702191447.l1JElNTw027077@d03av04.boulder.ibm.com \
--to=brking@linux.vnet.ibm.com \
--cc=James.Bottomley@steeleye.com \
--cc=greg@kroah.com \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
--cc=linux-scsi@vger.kernel.org \
--cc=linuxppc-dev@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).