From: Kim Phillips Date: Mon, 24 Aug 2009 19:32:26 +0000 (-0500) Subject: net: tsec - handle user interrupt while waiting for PHY auto negotiation to complete X-Git-Tag: v2009.11-rc1~225^2~33^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0d071cdd782e917b43e04869843df31670231ffd;p=u-boot net: tsec - handle user interrupt while waiting for PHY auto negotiation to complete if you don't have firmware installed for the PHY to come to life, this wait can be painful - let's give the option to avoid it if we want. Signed-off-by: Kim Phillips Acked-by: Andy Fleming Signed-off-by: Ben Warren --- diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c index 9c9fd377c9..5c3d261ecd 100644 --- a/drivers/net/tsec.c +++ b/drivers/net/tsec.c @@ -17,6 +17,7 @@ #include #include #include +#include #include "miiphy.h" @@ -380,6 +381,12 @@ uint mii_parse_sr(uint mii_reg, struct tsec_private * priv) return 0; } + if (ctrlc()) { + puts("user interrupt!\n"); + priv->link = 0; + return -EINTR; + } + if ((i++ % 1000) == 0) { putc('.'); }