From: Linda Xie <lxiep@us.ibm.com>
To: Greg KH <greg@kroah.com>,
Hotplug List <pcihpd-discuss@lists.sourceforge.net>
Cc: John Rose <johnrose@austin.ibm.com>,
Mike Wortman <wortman@us.ibm.com>,
External List <linuxppc64-dev@lists.linuxppc.org>,
linux-kernel@vger.kernel.org
Subject: [PATH] rpaphp_add_slot.patch
Date: Fri, 02 Jul 2004 17:45:53 -0500 [thread overview]
Message-ID: <40E5E5A1.4080003@us.ibm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 318 bytes --]
Hi Greg,
I found a bug in rpaphp code during DLPAR I/O testing. When DLPAR ADD
a non-empty I/O slot to a partition, an adapter in the slot didn't
get configured. The attached patch fixes that. Please review and apply
if there are no objections.
Signed-off-by: Linda Xie <lxie@us.ibm.com>
Thanks,
Linda
[-- Attachment #2: rpaphp_add_slot.patch --]
[-- Type: text/plain, Size: 1227 bytes --]
diff -Nru a/drivers/pci/hotplug/rpaphp_pci.c b/drivers/pci/hotplug/rpaphp_pci.c
--- a/drivers/pci/hotplug/rpaphp_pci.c Fri Jul 2 15:59:36 2004
+++ b/drivers/pci/hotplug/rpaphp_pci.c Fri Jul 2 15:59:36 2004
@@ -340,7 +340,6 @@
return rc;
}
-
static void rpaphp_eeh_remove_bus_device(struct pci_dev *dev)
{
eeh_remove_device(dev);
@@ -429,10 +428,26 @@
__FUNCTION__, slot->name);
goto exit_rc;
}
- if (init_slot_pci_funcs(slot)) {
- err("%s: init_slot_pci_funcs failed\n", __FUNCTION__);
+
+ if (slot->hotplug_slot->info->adapter_status == NOT_CONFIGURED) {
+ dbg("%s CONFIGURING pci adapter in slot[%s]\n",
+ __FUNCTION__, slot->name);
+ if (rpaphp_config_pci_adapter(slot)) {
+ err("%s: CONFIG pci adapter failed\n", __FUNCTION__);
+ goto exit_rc;
+ }
+ } else if (slot->hotplug_slot->info->adapter_status == CONFIGURED) {
+ if (init_slot_pci_funcs(slot)) {
+ err("%s: init_slot_pci_funcs failed\n", __FUNCTION__);
+ goto exit_rc;
+ }
+
+ } else {
+ err("%s: slot[%s]'s adapter_status is NOT_VALID.\n",
+ __FUNCTION__, slot->name);
goto exit_rc;
}
+
print_slot_pci_funcs(slot);
if (!list_empty(&slot->dev.pci_funcs)) {
slot->state = CONFIGURED;
next reply other threads:[~2004-07-02 21:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-02 22:45 Linda Xie [this message]
2004-07-14 22:53 ` [PATH] rpaphp_add_slot.patch Greg KH
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=40E5E5A1.4080003@us.ibm.com \
--to=lxiep@us.ibm.com \
--cc=greg@kroah.com \
--cc=johnrose@austin.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc64-dev@lists.linuxppc.org \
--cc=pcihpd-discuss@lists.sourceforge.net \
--cc=wortman@us.ibm.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.