]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: tsec - handle user interrupt while waiting for PHY auto negotiation to complete
authorKim Phillips <kim.phillips@freescale.com>
Mon, 24 Aug 2009 19:32:26 +0000 (14:32 -0500)
committerBen Warren <biggerbadderben@gmail.com>
Tue, 25 Aug 2009 20:35:55 +0000 (13:35 -0700)
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>
drivers/net/tsec.c

index 9c9fd377c94798624b46d7b74c5c47db95848835..5c3d261ecdae06687fc5f14c7c7c8d30f084b912 100644 (file)
@@ -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('.');
                        }