summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorKim Phillips <kim.phillips@freescale.com>2009-08-24 14:32:26 -0500
committerBen Warren <biggerbadderben@gmail.com>2009-08-25 13:35:55 -0700
commit0d071cdd782e917b43e04869843df31670231ffd (patch)
tree077b0aa463af88875c69db7903a85129e945d495 /drivers/net
parent4fccb818e7ee1190602e79aa5729a23bc349bf0c (diff)
downloadu-boot-imx-0d071cdd782e917b43e04869843df31670231ffd.zip
u-boot-imx-0d071cdd782e917b43e04869843df31670231ffd.tar.gz
u-boot-imx-0d071cdd782e917b43e04869843df31670231ffd.tar.bz2
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 <kim.phillips@freescale.com> Acked-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/tsec.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c
index 9c9fd37..5c3d261 100644
--- a/drivers/net/tsec.c
+++ b/drivers/net/tsec.c
@@ -17,6 +17,7 @@
#include <net.h>
#include <command.h>
#include <tsec.h>
+#include <asm/errno.h>
#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('.');
}