ixgbe/base: move phy sfp detection in a function