Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci CID 1245802: Result always 0.
details: https://anonhg.NetBSD.org/src/rev/8ea5ea65558b
branches: trunk
changeset: 335657:8ea5ea65558b
user: christos <christos%NetBSD.org@localhost>
date: Mon Jan 19 15:07:25 2015 +0000
description:
CID 1245802: Result always 0.
diffstat:
sys/dev/pci/if_alc.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (15 lines):
diff -r 46cebdeb0330 -r 8ea5ea65558b sys/dev/pci/if_alc.c
--- a/sys/dev/pci/if_alc.c Mon Jan 19 14:32:08 2015 +0000
+++ b/sys/dev/pci/if_alc.c Mon Jan 19 15:07:25 2015 +0000
@@ -468,8 +468,9 @@
len = alc_miiext_readreg(sc, MII_EXT_PCS, MII_EXT_CLDCTL6);
len = (len >> EXT_CLDCTL6_CAB_LEN_SHIFT) &
EXT_CLDCTL6_CAB_LEN_MASK;
- agc = alc_miidbg_readreg(sc, MII_DBG_AGC);
- agc = (agc >> DBG_AGC_2_VGA_SHIFT) & DBG_AGC_2_VGA_MASK;
+ /* XXX: used to be (alc >> shift) & mask which is 0 */
+ agc = alc_miidbg_readreg(sc, MII_DBG_AGC) & DBG_AGC_2_VGA_MASK;
+ agc >>= DBG_AGC_2_VGA_SHIFT;
if ((media == IFM_1000_T && len > EXT_CLDCTL6_CAB_LEN_SHORT1G &&
agc > DBG_AGC_LONG1G_LIMT) ||
(media == IFM_100_TX && len > DBG_AGC_LONG100M_LIMT &&
Home |
Main Index |
Thread Index |
Old Index