Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 91513
b: refs/heads/master
c: c6d4d5a
h: refs/heads/master
i:
  91511: f874108
v: v3
  • Loading branch information
Nathan Lynch authored and Paul Mackerras committed Apr 7, 2008
1 parent d82be47 commit 4e13f86
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 834d97d452208279edf11c57eca150360d2dd1d6
refs/heads/master: c6d4d5a8a83e4a564bcf233fdd565183c33df5d1
19 changes: 2 additions & 17 deletions trunk/arch/powerpc/kernel/rtas_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,6 @@ static inline int config_access_valid(struct pci_dn *dn, int where)
return 0;
}

static int of_device_available(struct device_node * dn)
{
const char *status;

status = of_get_property(dn, "status", NULL);

if (!status)
return 1;

if (!strcmp(status, "okay"))
return 1;

return 0;
}

int rtas_read_config(struct pci_dn *pdn, int where, int size, u32 *val)
{
int returnval = -1;
Expand Down Expand Up @@ -117,7 +102,7 @@ static int rtas_pci_read_config(struct pci_bus *bus,
for (dn = busdn->child; dn; dn = dn->sibling) {
struct pci_dn *pdn = PCI_DN(dn);
if (pdn && pdn->devfn == devfn
&& of_device_available(dn))
&& of_device_is_available(dn))
return rtas_read_config(pdn, where, size, val);
}

Expand Down Expand Up @@ -164,7 +149,7 @@ static int rtas_pci_write_config(struct pci_bus *bus,
for (dn = busdn->child; dn; dn = dn->sibling) {
struct pci_dn *pdn = PCI_DN(dn);
if (pdn && pdn->devfn == devfn
&& of_device_available(dn))
&& of_device_is_available(dn))
return rtas_write_config(pdn, where, size, val);
}
return PCIBIOS_DEVICE_NOT_FOUND;
Expand Down
5 changes: 2 additions & 3 deletions trunk/arch/powerpc/platforms/pseries/eeh.c
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,6 @@ static void *early_enable_eeh(struct device_node *dn, void *data)
unsigned int rets[3];
struct eeh_early_enable_info *info = data;
int ret;
const char *status = of_get_property(dn, "status", NULL);
const u32 *class_code = of_get_property(dn, "class-code", NULL);
const u32 *vendor_id = of_get_property(dn, "vendor-id", NULL);
const u32 *device_id = of_get_property(dn, "device-id", NULL);
Expand All @@ -959,8 +958,8 @@ static void *early_enable_eeh(struct device_node *dn, void *data)
pdn->eeh_freeze_count = 0;
pdn->eeh_false_positives = 0;

if (status && strncmp(status, "ok", 2) != 0)
return NULL; /* ignore devices with bad status */
if (!of_device_is_available(dn))
return NULL;

/* Ignore bad nodes. */
if (!class_code || !vendor_id || !device_id)
Expand Down

0 comments on commit 4e13f86

Please sign in to comment.