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
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/dev/neta/if_mvneta.c | ||
---|---|---|
1193 | Please replace the for loop with mvneta_clear_mib() |
sys/dev/neta/if_mvneta.c | ||
---|---|---|
3540 | 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 | ||
---|---|---|
3540 | 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 | ||
---|---|---|
3540 | You are right. |