diff options
author | marcel <marcel@FreeBSD.org> | 2005-12-13 06:14:14 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2005-12-13 06:14:14 +0000 |
commit | 97acc24830d83fc3b09a8cf246b54ccb44f0940e (patch) | |
tree | 1c39375e069dd0bff55a8b8ffee9a93a791b37d1 /sys/dev/bge | |
parent | b4c9d04a7a9c929c7edada49a3980669d94e0bd5 (diff) | |
download | FreeBSD-src-97acc24830d83fc3b09a8cf246b54ccb44f0940e.zip FreeBSD-src-97acc24830d83fc3b09a8cf246b54ccb44f0940e.tar.gz |
In bge_link_upd(), rewrite the logic so that status is assigned
on the code path it is used in a way that GCC understands. This
avoids breakage due to higher optimization levels.
Diffstat (limited to 'sys/dev/bge')
-rw-r--r-- | sys/dev/bge/if_bge.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c index 8073305..81085d2 100644 --- a/sys/dev/bge/if_bge.c +++ b/sys/dev/bge/if_bge.c @@ -3750,10 +3750,8 @@ bge_link_upd(sc) * periods of heavy traffic. (There should be no * effect on copper NICs.) */ - if (sc->bge_tbi) status = CSR_READ_4(sc, BGE_MAC_STS); - - if (!sc->bge_tbi || !(status & (BGE_MACSTAT_PORT_DECODE_ERROR | - BGE_MACSTAT_MI_COMPLETE))) { + if (!sc->bge_tbi || ((status = CSR_READ_4(sc, BGE_MAC_STS)) & + (BGE_MACSTAT_PORT_DECODE_ERROR | BGE_MACSTAT_MI_COMPLETE)) == 0) { sc->bge_link = 0; callout_stop(&sc->bge_stat_ch); bge_tick_locked(sc); |