From: kettenis Date: Fri, 19 Aug 2016 18:25:53 +0000 (+0000) Subject: Seems we need to hold the PHY into reset a little bit longer. Without it X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=d98ac4b2d46acc4049a63bda48319aa3097d857d;p=openbsd Seems we need to hold the PHY into reset a little bit longer. Without it Theo's Cubox-i comes up without working Ethernet after a warm boot. ok deraadt@ --- diff --git a/sys/arch/armv7/imx/if_fec.c b/sys/arch/armv7/imx/if_fec.c index d15b789dade..a20ab89f4c4 100644 --- a/sys/arch/armv7/imx/if_fec.c +++ b/sys/arch/armv7/imx/if_fec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_fec.c,v 1.15 2016/08/06 17:18:38 kettenis Exp $ */ +/* $OpenBSD: if_fec.c,v 1.16 2016/08/19 18:25:53 kettenis Exp $ */ /* * Copyright (c) 2012-2013 Patrick Wildt * @@ -320,10 +320,14 @@ fec_attach(struct device *parent, struct device *self, void *aux) * active-high. */ phy_reset_gpio[2] = GPIO_ACTIVE_LOW; - gpio_controller_config_pin(phy_reset_gpio, GPIO_CONFIG_OUTPUT); + + /* + * On some Cubox-i machines we need to hold the PHY in + * reset a little bit longer than specified. + */ gpio_controller_set_pin(phy_reset_gpio, 1); - delay(phy_reset_duration * 1000); + delay((phy_reset_duration + 1) * 1000); gpio_controller_set_pin(phy_reset_gpio, 0); delay(1000); }