Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc64: Fix missing devices due to PCI bridge test in of_create_pci_dev().
  sparc64: Fix disappearing PCI devices on e3500.
  • Loading branch information
Linus Torvalds committed Sep 23, 2008
2 parents 74c7a09 + 44b50e5 commit 1910e02
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions arch/sparc64/kernel/of_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ static unsigned long of_bus_default_get_flags(const u32 *addr, unsigned long fla

static int of_bus_pci_match(struct device_node *np)
{
if (!strcmp(np->type, "pci") || !strcmp(np->type, "pciex")) {
if (!strcmp(np->name, "pci")) {
const char *model = of_get_property(np, "model", NULL);

if (model && !strcmp(model, "SUNW,simba"))
Expand Down Expand Up @@ -200,7 +200,7 @@ static int of_bus_simba_match(struct device_node *np)
/* Treat PCI busses lacking ranges property just like
* simba.
*/
if (!strcmp(np->type, "pci") || !strcmp(np->type, "pciex")) {
if (!strcmp(np->name, "pci")) {
if (!of_find_property(np, "ranges", NULL))
return 1;
}
Expand Down Expand Up @@ -429,7 +429,7 @@ static int __init use_1to1_mapping(struct device_node *pp)
* it lacks a ranges property, and this will include
* cases like Simba.
*/
if (!strcmp(pp->type, "pci") || !strcmp(pp->type, "pciex"))
if (!strcmp(pp->name, "pci"))
return 0;

return 1;
Expand Down Expand Up @@ -714,8 +714,7 @@ static unsigned int __init build_one_device_irq(struct of_device *op,
break;
}
} else {
if (!strcmp(pp->type, "pci") ||
!strcmp(pp->type, "pciex")) {
if (!strcmp(pp->name, "pci")) {
unsigned int this_orig_irq = irq;

irq = pci_irq_swizzle(dp, pp, irq);
Expand Down
2 changes: 1 addition & 1 deletion arch/sparc64/kernel/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
dev->current_state = 4; /* unknown power state */
dev->error_state = pci_channel_io_normal;

if (!strcmp(type, "pci") || !strcmp(type, "pciex")) {
if (!strcmp(node->name, "pci")) {
/* a PCI-PCI bridge */
dev->hdr_type = PCI_HEADER_TYPE_BRIDGE;
dev->rom_base_reg = PCI_ROM_ADDRESS1;
Expand Down

0 comments on commit 1910e02

Please sign in to comment.