From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Warren Date: Tue, 25 Aug 2009 13:34:23 -0700 Subject: [U-Boot] [PATCH] net: tsec - handle user interrupt while waiting for PHY auto negotiation to complete In-Reply-To: <20090824143226.e563ae9e.kim.phillips@freescale.com> References: <20090824143226.e563ae9e.kim.phillips@freescale.com> Message-ID: <4A944ACF.5010009@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Kim Phillips wrote: > 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 > --- > drivers/net/tsec.c | 7 +++++++ > 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 > #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('.'); > } > Applied to net/next regards, Ben