[PATCH 03/32] leon, greth: 10/100 modes should be assigned in fastest priority
Daniel Hellstrom
daniel at gaisler.com
Thu May 11 14:25:48 UTC 2017
---
c/src/lib/libbsp/sparc/shared/net/greth.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/c/src/lib/libbsp/sparc/shared/net/greth.c b/c/src/lib/libbsp/sparc/shared/net/greth.c
index 9f41a51..2e479ed 100644
--- a/c/src/lib/libbsp/sparc/shared/net/greth.c
+++ b/c/src/lib/libbsp/sparc/shared/net/greth.c
@@ -485,14 +485,12 @@ greth_initialize_hardware (struct greth_softc *sc)
(sc->phydev.part & GRETH_MII_100TXFD)) {
sc->sp = 1;
sc->fd = 1;
- }
- if ( (sc->phydev.adv & GRETH_MII_100TXHD) &&
- (sc->phydev.part & GRETH_MII_100TXHD)) {
+ } else if ( (sc->phydev.adv & GRETH_MII_100TXHD) &&
+ (sc->phydev.part & GRETH_MII_100TXHD)) {
sc->sp = 1;
sc->fd = 0;
- }
- if ( (sc->phydev.adv & GRETH_MII_10FD) &&
- (sc->phydev.part & GRETH_MII_10FD)) {
+ } else if ( (sc->phydev.adv & GRETH_MII_10FD) &&
+ (sc->phydev.part & GRETH_MII_10FD)) {
sc->fd = 1;
}
}
--
2.7.4
More information about the devel
mailing list