device: refactor by adding set_unmanaged_external_down() function