merge upstream fixes on mdio loop