It appears we must read them as 2 4-byte words, lower address first.
Otherwise both reads return the same value, resulting in bogus byte
counter values.
Details
Details
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 35827 Build 32716: arc lint + arc unit
Event Timeline
sys/dev/neta/if_mvneta.c | ||
---|---|---|
1194 | Please replace the for loop with mvneta_clear_mib() |
sys/dev/neta/if_mvneta.c | ||
---|---|---|
3543 | Sorry for not spotting this before - val is unitialized, so we need to make sure, the upper half of it is not a random data. Please add: val = 0; Otherwise LGTM. |
sys/dev/neta/if_mvneta.c | ||
---|---|---|
3543 | I don't follow. We assign val = MVNETA_READ_MIB(sc, mib->regnum) a couple of lines below. The right-hand side of that statement will be promoted to a 64-bit value before the assignment. |
sys/dev/neta/if_mvneta.c | ||
---|---|---|
3543 | You are right. |