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 6eb5dd81e0..57631bb264 100644 --- a/c/src/lib/libbsp/sparc/shared/pci/grpci.c +++ b/c/src/lib/libbsp/sparc/shared/pci/grpci.c @@ -191,7 +191,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); @@ -264,7 +264,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 ee643773e1..7203833cbf 100644 --- a/c/src/lib/libbsp/sparc/shared/pci/grpci2.c +++ b/c/src/lib/libbsp/sparc/shared/pci/grpci2.c @@ -409,7 +409,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 d2b1bdaa59..74f3d72cc4 100644 --- a/c/src/lib/libbsp/sparc/shared/pci/pcif.c +++ b/c/src/lib/libbsp/sparc/shared/pci/pcif.c @@ -178,7 +178,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); @@ -245,7 +245,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); |