From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org, pcihpd-discuss@lists.sourceforge.net
Subject: Re: [PATCH] PCI hotplug changes for 2.5.69
Date: Tue, 6 May 2003 16:06:53 -0700 [thread overview]
Message-ID: <10522624133520@kroah.com> (raw)
In-Reply-To: <10522624132703@kroah.com>
ChangeSet 1.1082, 2003/05/06 15:35:23-07:00, greg@kroah.com
[PATCH] PCI Hotplug: fix up the ibm driver to work properly again.
drivers/hotplug/ibmphp_core.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff -Nru a/drivers/hotplug/ibmphp_core.c b/drivers/hotplug/ibmphp_core.c
--- a/drivers/hotplug/ibmphp_core.c Tue May 6 15:55:58 2003
+++ b/drivers/hotplug/ibmphp_core.c Tue May 6 15:55:58 2003
@@ -846,22 +846,24 @@
{
unsigned char bus;
struct pci_bus *child;
- int rc = 0;
+ int num;
int flag = 0; /* this is to make sure we don't double scan the bus, for bridged devices primarily */
if (!(bus_structure_fixup (func->busno)))
flag = 1;
if (func->dev == NULL)
- func->dev = pci_find_slot (func->busno, (func->device << 3) | (func->function & 0x7));
+ func->dev = pci_find_slot (func->busno, PCI_DEVFN(func->device, func->function));
if (func->dev == NULL) {
struct pci_bus *bus = ibmphp_find_bus (func->busno);
if (!bus)
return 0;
- func->dev = pci_scan_slot(bus,
- (func->device << 3) + (func->function & 0x7));
+ num = pci_scan_slot(bus, PCI_DEVFN(func->device, func->function));
+ if (num)
+ pci_bus_add_devices(bus);
+ func->dev = pci_find_slot(func->busno, PCI_DEVFN(func->device, func->function));
if (func->dev == NULL) {
err ("ERROR... : pci_dev still NULL \n");
return 0;
@@ -873,7 +875,7 @@
pci_do_scan_bus (child);
}
- return rc;
+ return 0;
}
/*******************************************************
next prev parent reply other threads:[~2003-05-06 22:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-06 23:05 [BK PATCH] PCI hotplug changes for 2.5.69 Greg KH
2003-05-06 23:06 ` [PATCH] " Greg KH
2003-05-06 23:06 ` Greg KH
2003-05-06 23:06 ` Greg KH
2003-05-06 23:06 ` Greg KH
2003-05-06 23:06 ` Greg KH [this message]
2003-05-06 23:06 ` Greg KH
2003-05-06 23:06 ` Greg KH
2003-05-06 23:06 ` Greg KH
2003-05-06 23:06 ` 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=10522624133520@kroah.com \
--to=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pcihpd-discuss@lists.sourceforge.net \
/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