From: John Rose <johnrose@austin.ibm.com>
To: David Woodhouse <dwmw2@infradead.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
greg@kroah.com, akpm@osdl.org, torvalds@osdl.org,
Mike Wortman <wortman@us.ibm.com>
Subject: Re: [PATCH] PCI Hotplug: remove incorrect rpaphp firmware dependency
Date: Mon, 07 Feb 2005 18:21:50 -0600 [thread overview]
Message-ID: <1107822110.31219.51.camel@sinatra.austin.ibm.com> (raw)
In-Reply-To: <1107795637.19262.426.camel@hades.cambridge.redhat.com>
> Er, use the result of the get_children_props() call only if it _failed_?
> I suspect that wasn't your intention. This makes my G5 boot again:
Here's an alternate fix for the ppc64 crash during boot. This corrects
the offending function to use more conventional error codes. I'll
follow up with return code cleanups for the entire module, and for RTAS
code, since these are probably too big for 2.6.11.
Please apply, if appropriate.
Thanks-
John
Signed-off-by: John Rose <johnrose@austin.ibm.com>
diff -puN drivers/pci/hotplug/rpaphp_core.c~01_rpaphp_is_php_fix drivers/pci/hotplug/rpaphp_core.c
--- 2_6_linus/drivers/pci/hotplug/rpaphp_core.c~01_rpaphp_is_php_fix 2005-02-07 18:06:29.000000000 -0600
+++ 2_6_linus-johnrose/drivers/pci/hotplug/rpaphp_core.c 2005-02-07 18:10:15.000000000 -0600
@@ -224,7 +224,7 @@ static int get_children_props(struct dev
if (!indexes || !names || !types || !domains) {
/* Slot does not have dynamically-removable children */
- return 1;
+ return -EINVAL;
}
if (drc_indexes)
*drc_indexes = indexes;
@@ -260,7 +260,7 @@ int rpaphp_get_drc_props(struct device_n
}
rc = get_children_props(dn->parent, &indexes, &names, &types, &domains);
- if (rc) {
+ if (rc < 0) {
return 1;
}
@@ -307,7 +307,7 @@ static int is_php_dn(struct device_node
int rc;
rc = get_children_props(dn, indexes, names, &drc_types, power_domains);
- if (rc) {
+ if (rc >= 0) {
if (is_php_type((char *) &drc_types[1])) {
*types = drc_types;
return 1;
@@ -331,7 +331,7 @@ static int is_dr_dn(struct device_node *
rc = get_children_props(dn->parent, indexes, names, types,
power_domains);
- return (rc == 0);
+ return (rc >= 0);
}
static inline int is_vdevice_root(struct device_node *dn)
_
next prev parent reply other threads:[~2005-02-08 0:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200502031908.j13J8ggb031915@hera.kernel.org>
2005-02-07 17:00 ` David Woodhouse
2005-02-07 17:41 ` John Rose
2005-02-07 17:45 ` John Rose
2005-02-07 19:13 ` Andrew Morton
2005-02-07 19:28 ` David Woodhouse
2005-02-08 0:21 ` John Rose [this message]
2005-02-03 17:40 [PATCH] PCI: memset rom attribute before using it Greg KH
2005-02-03 17:40 ` [PATCH] PCI Hotplug: remove incorrect rpaphp firmware dependency 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=1107822110.31219.51.camel@sinatra.austin.ibm.com \
--to=johnrose@austin.ibm.com \
--cc=akpm@osdl.org \
--cc=dwmw2@infradead.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®