diff options
-rw-r--r-- | c/src/lib/libbsp/sparc/shared/pci/grpci.c | 4 | ||||
-rw-r--r-- | c/src/lib/libbsp/sparc/shared/pci/grpci2.c | 2 | ||||
-rw-r--r-- | c/src/lib/libbsp/sparc/shared/pci/pcif.c | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/c/src/lib/libbsp/sparc/shared/pci/grpci.c b/c/src/lib/libbsp/sparc/shared/pci/grpci.c index 63e08ad92a..08720f0925 100644 --- a/c/src/lib/libbsp/sparc/shared/pci/grpci.c +++ b/c/src/lib/libbsp/sparc/shared/pci/grpci.c @@ -187,7 +187,7 @@ int grpci_cfg_r32(pci_dev_t dev, int ofs, uint32_t *val) */ if (dev == HOST_TGT) bus = devfn = 0; - if (bus == 0) + else if (bus == 0) devfn = PCI_DEV_DEVFUNC(dev) + PCI_DEV(0, 6, 0); else devfn = PCI_DEV_DEVFUNC(dev); @@ -260,7 +260,7 @@ int grpci_cfg_w32(pci_dev_t dev, int ofs, uint32_t val) */ if (dev == HOST_TGT) bus = devfn = 0; - if (bus == 0) + else if (bus == 0) devfn = PCI_DEV_DEVFUNC(dev) + PCI_DEV(0, 6, 0); else devfn = PCI_DEV_DEVFUNC(dev); diff --git a/c/src/lib/libbsp/sparc/shared/pci/grpci2.c b/c/src/lib/libbsp/sparc/shared/pci/grpci2.c index 29af4ab756..eacd2288b1 100644 --- a/c/src/lib/libbsp/sparc/shared/pci/grpci2.c +++ b/c/src/lib/libbsp/sparc/shared/pci/grpci2.c @@ -405,7 +405,7 @@ int grpci2_cfg_w32(pci_dev_t dev, int ofs, uint32_t val) */ if (dev == HOST_TGT) bus = devfn = 0; - if (bus == 0) + else if (bus == 0) devfn = PCI_DEV_DEVFUNC(dev) + PCI_DEV(0, 6, 0); else devfn = PCI_DEV_DEVFUNC(dev); diff --git a/c/src/lib/libbsp/sparc/shared/pci/pcif.c b/c/src/lib/libbsp/sparc/shared/pci/pcif.c index 2dc46a8ad1..bc435b5a80 100644 --- a/c/src/lib/libbsp/sparc/shared/pci/pcif.c +++ b/c/src/lib/libbsp/sparc/shared/pci/pcif.c @@ -174,7 +174,7 @@ int pcif_cfg_r32(pci_dev_t dev, int ofs, uint32_t *val) */ if (dev == HOST_TGT) bus = devfn = 0; - if (bus == 0) + else if (bus == 0) devfn = PCI_DEV_DEVFUNC(dev) + PCI_DEV(0, 6, 0); else devfn = PCI_DEV_DEVFUNC(dev); @@ -241,7 +241,7 @@ int pcif_cfg_w32(pci_dev_t dev, int ofs, uint32_t val) */ if (dev == HOST_TGT) bus = devfn = 0; - if (bus == 0) + else if (bus == 0) devfn = PCI_DEV_DEVFUNC(dev) + PCI_DEV(0, 6, 0); else devfn = PCI_DEV_DEVFUNC(dev); |