linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] need check for devices with bad status status property in __of_scan_bus()
@ 2010-05-11  1:13 Sonny Rao
  2010-05-19  8:47 ` Sonny Rao
  0 siblings, 1 reply; 2+ messages in thread
From: Sonny Rao @ 2010-05-11  1:13 UTC (permalink / raw)
  To: benh; +Cc: sonnyrao, linuxppc-dev, anton

Hi Ben, we ran into an issue where it looks like we're not
properly ignoring a pci device with a non-good status property
when we walk the device tree and create our device nodes.

However, the EEH init code does look for the property and 
disables EEH on these devices.   This leaves us in an
inconsistent where we are poking at a supposedly bad
piece of hardware and RTAS will block our config cycles 
because EEH isn't enabled anyway.

This has only been compile tested.

Signed-of-by: Sonny Rao <sonnyrao@linux.vnet.ibm.com>

Index: common/arch/powerpc/kernel/pci_of_scan.c
===================================================================
--- common/arch/powerpc/kernel.orig/pci_of_scan.c	2010-05-10 20:00:40.000000000 -0500
+++ common/arch/powerpc/kernel/pci_of_scan.c	2010-05-10 20:03:04.000000000 -0500
@@ -310,6 +310,8 @@ static void __devinit __of_scan_bus(stru
 	/* Scan direct children */
 	for_each_child_of_node(node, child) {
 		pr_debug("  * %s\n", child->full_name);
+		if (!of_device_is_available(child))
+			continue;
 		reg = of_get_property(child, "reg", &reglen);
 		if (reg == NULL || reglen < 20)
 			continue;


-- 
Sonny Rao, LTC OzLabs, BML team

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] need check for devices with bad status status property in __of_scan_bus()
  2010-05-11  1:13 [PATCH] need check for devices with bad status status property in __of_scan_bus() Sonny Rao
@ 2010-05-19  8:47 ` Sonny Rao
  0 siblings, 0 replies; 2+ messages in thread
From: Sonny Rao @ 2010-05-19  8:47 UTC (permalink / raw)
  To: benh; +Cc: linuxppc-dev, anton

On Mon, May 10, 2010 at 08:13:41PM -0500, Sonny Rao wrote:
> Hi Ben, we ran into an issue where it looks like we're not
> properly ignoring a pci device with a non-good status property
> when we walk the device tree and create our device nodes.
> 
> However, the EEH init code does look for the property and 
> disables EEH on these devices.   This leaves us in an
> inconsistent where we are poking at a supposedly bad
> piece of hardware and RTAS will block our config cycles 
> because EEH isn't enabled anyway.
> 
> This has only been compile tested.
> 
> Signed-of-by: Sonny Rao <sonnyrao@linux.vnet.ibm.com>
> 
> Index: common/arch/powerpc/kernel/pci_of_scan.c
> ===================================================================
> --- common/arch/powerpc/kernel.orig/pci_of_scan.c	2010-05-10 20:00:40.000000000 -0500
> +++ common/arch/powerpc/kernel/pci_of_scan.c	2010-05-10 20:03:04.000000000 -0500
> @@ -310,6 +310,8 @@ static void __devinit __of_scan_bus(stru
>  	/* Scan direct children */
>  	for_each_child_of_node(node, child) {
>  		pr_debug("  * %s\n", child->full_name);
> +		if (!of_device_is_available(child))
> +			continue;
>  		reg = of_get_property(child, "reg", &reglen);
>  		if (reg == NULL || reglen < 20)
>  			continue;


Ok, it's now been actually tested with firmware
that marks some devices as failed and appears to work.


-- 
Sonny Rao, LTC OzLabs, BML team

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-05-19  8:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-11  1:13 [PATCH] need check for devices with bad status status property in __of_scan_bus() Sonny Rao
2010-05-19  8:47 ` Sonny Rao

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).