Closed halmartin closed 2 years ago
pd690xx
also doesn't list the port status of port 24 on the MS220-24P, or port 48 on the MS220-48LP
MS220-24P:
~ # pd690xx -l
Port Status Type Priority Power
1 Enabled at Critical 0.0
(...)
23 Enabled at Critical 0.0
The port status output on the MS220-24P is also incorrect for ports > 12:
~ # pd690xx -l
Port Status Type Priority Power
1 Enabled at Critical 0.0
2 Enabled at Critical 0.0
3 Enabled at Critical 0.0
4 Enabled at Critical 0.0
5 Enabled at Critical 0.0
6 Enabled at Critical 0.0
7 Enabled at Critical 0.0
8 Enabled at Critical 0.0
9 Enabled at Critical 0.0
10 Enabled at Critical 0.0
11 Enabled at Critical 0.0
12 Enabled at Critical 0.0
13 Disabled af Critical 0.0
14 Disabled af Unknown 0.0
15 Disabled af Unknown 0.0
16 Disabled af Unknown 0.0
17 Disabled af Unknown 0.0
18 Disabled af Unknown 0.0
19 Disabled af Unknown 0.0
20 Disabled af Unknown 0.0
21 Disabled af Unknown 0.0
22 Disabled af Unknown 0.0
23 Disabled af Unknown 0.0
There were several bugs in pd690xx
The simple one: missing the last port on the switch. This was a logic error, ending the port status loop one port early with <
instead of <=
:
for (int i=1; i<total_ports; i++)
The invalid output for ports > 12 was a more serious error, but was only applicable to the MS220-24P and MS220-48LP/FP as the MS220-8P only has 1 pd690xx
and 8 PoE ports.
The function get_pd690xx_addr
did not properly return the per port control register address for ports > 12. With the incorrect control register address from get_pd690xx_addr
, pd690xx
was reading from the per port power limit (Port*_PPL
) register instead of the per port control register (Port*_CR
).
The Port*_PPL
register by default returns 0x140
which leads to the port status being reported as Disabled
, af
, and Unknown
:
Detected 2 pd690xx
Port Status Type Priority Power
I2C data: 0014
Port 1: disabled
I2C data: 0014
Port 1: 802.3at
I2C data: 0014
Port 1: Critical
I2C data: 0000
1 Disabled at Critical 0.0
(...)
I2C data: 0140
Port 23: disabled
I2C data: 0140
Port 23: 802.3af
I2C data: 0140
Port 23: unknown
I2C data: 0000
23 Disabled af Unknown 0.0
Not only was reporting the status of ports > 12 broken, but all other operations for ports > 12 would have been directed to the incorrect register and would not have the intended effect.
pd690xx
v0.4 fixes the above issues.
Users should update their switch firmware to 20221115.
Thanks to @acjohnson for providing access to MS220-24/48 hardware to diagnose and resolve this issue.
The port status output from
pd690xx
is nonsensical on the MS220-48 switch:The switch has no PoE devices attached, so absent a serious hardware fault, there should be no power consumption on any ports (especially on ports which are supposedly disabled).