Closed mrnuke closed 2 years ago
From https://github.com/Hurricos/realtek-poe/pull/6#issuecomment-1166650607:
The gpio-hogdefinition looks fine to me. I wonder if u-boot is forcing the GPIO low.
I can watch the line. I'm worried that OpenWrt is setting it low. Let me attempt to invoke a reboot from the OEM FW.
There's a difference between a system reboot and a daemon restart. This issue is focused on shutting down and restarting realtek poe. For example:
/etc/init.d/poe restart
On a system reboot we really don't have that much control. If the bootloader decides to reset the PoE MCU, or disable the poe-enable line, there is little we can do to prevent that. Only in the event that the bootloader, and gpio-restart hardware do not touch the PSEs, do we have the power to not cut power.
With #6 I will be removing the call to poe_cmd_global_power_budget{}
. That only leaves poe_cmd_global_port_enable(0);
which I think should just be removed as well.
This seems to be fixed for the CI22 realtek-poe package release, as in no interruption for a currently PoE powered device while changing /etc/config/poe and doing a /etc/init.d/poe reload
or ubus call poe reload
and powering on a other PoE device. Have to test extensive "disabling" and "enabling" in /etc/config/poe yet though.
/etc/init.d/poe reload
Does not stop the daemon, but /etc/init.d/poe restart
does.
Issue fixed by b1e21d6c1e6bebd07321ce9045f8865f2c338a80.
Besides the non-interupted PoE ubus call poe reload
or /etc/init.d/poe reload
I can also confirm that even /etc/init.d/poe restart
won't interupt PoE power anymore on already powered on PoE devices with package CI29.
Summarry
It has been reported in this OpenWRT forum post that realtek-poe behavior is really annoying. PoE devices lose power whenever realtek-poe is started or restarted.
This is undesireable for two reasons:
Technical details
The following two lines in poe_initial_setup() cause the power to PoE ports to be cut off when realtek-poe is started:
https://github.com/Hurricos/realtek-poe/blob/db485c85b2c6c997049b81c44a3c0d6d57d1728c/src/main.c#L712-L713
Course of action
On my engenius-ews2910p with 22.10 firmware, the MCU does not care about the state of the ports. It will happily accept a "set global power budget" command and apply it dynamically.
If so, then we could simply remove the calls in question, and everything should work,