When we decode the latency and the max_latency, u16 value may not fit
the required size and could lead to the wrong LTR representation.
Scaling is represented as:
scale 0 - 1 (2^(5*0)) = 2^0
scale 1 - 32 (2^(5 *1))= 2^5
scale 2 - 1024 (2^(5 *2)) =2^10
scale 3 - 32768 (2^(5 *3)) =2^15
scale 4 - 1048576 (2^(5 *4)) = 2^20
scale 5 - 33554432 (2^(5 *4)) = 2^25
scale 4 and scale 5 required 20 and 25 bits respectively.
scale 6 reserved.
Replace the u16 type with the u32 type and allow corrected LTR
representation.
Cc: stable@vger.kernel.org
Fixes:
|
||
|---|---|---|
| .. | ||
| 80003es2lan.c | ||
| 80003es2lan.h | ||
| 82571.c | ||
| 82571.h | ||
| defines.h | ||
| e1000.h | ||
| ethtool.c | ||
| hw.h | ||
| ich8lan.c | ||
| ich8lan.h | ||
| mac.c | ||
| mac.h | ||
| Makefile | ||
| manage.c | ||
| manage.h | ||
| netdev.c | ||
| nvm.c | ||
| nvm.h | ||
| param.c | ||
| phy.c | ||
| phy.h | ||
| ptp.c | ||
| regs.h | ||