ide: factor out code for tuning devices from ide_probe_port()