Commit ff97c0a4 authored by David S. Miller's avatar David S. Miller Committed by David S. Miller

Merge cheetah:src/BK/sparc-2.5

into nuts.ninka.net:/home/davem/src/BK/sparc-2.5
parents 892e6ce5 b07700d4
...@@ -804,25 +804,20 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, ...@@ -804,25 +804,20 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
/* Return the domain nuber for this pci bus */ /* Return the domain nuber for this pci bus */
int pci_domain_nr(struct pci_bus *bus) int pci_domain_nr(struct pci_bus *pbus)
{ {
struct pcidev_cookie *cookie = bus->sysdata; struct pci_pbm_info *pbm = pbus->sysdata;
int ret; int ret;
if (cookie != NULL) { if (pbm == NULL || pbm->parent == NULL) {
struct pci_pbm_info *pbm = cookie->pbm;
if (pbm == NULL || pbm->parent == NULL) {
ret = -ENXIO;
} else {
struct pci_controller_info *p = pbm->parent;
ret = p->index;
if (p->pbms_same_domain == 0)
ret = ((ret << 1) +
((pbm == &pbm->parent->pbm_B) ? 1 : 0));
}
} else {
ret = -ENXIO; ret = -ENXIO;
} else {
struct pci_controller_info *p = pbm->parent;
ret = p->index;
if (p->pbms_same_domain == 0)
ret = ((ret << 1) +
((pbm == &pbm->parent->pbm_B) ? 1 : 0));
} }
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment