All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2] net: gem: Enable CTRL+C in wait_for_bit
@ 2015-12-01 10:37 Michal Simek
  2015-12-01 21:06 ` Joe Hershberger
  0 siblings, 1 reply; 2+ messages in thread
From: Michal Simek @ 2015-12-01 10:37 UTC (permalink / raw)
  To: u-boot

Enable to break waiting loop at any time.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

Changes in v2:
- Change return value to EINTR
- Add missing header for ctrlc

 drivers/net/zynq_gem.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 858093f0d7e2..81bd8b94901b 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -13,6 +13,7 @@
 #include <net.h>
 #include <netdev.h>
 #include <config.h>
+#include <console.h>
 #include <fdtdec.h>
 #include <libfdt.h>
 #include <malloc.h>
@@ -447,6 +448,11 @@ static int wait_for_bit(const char *func, u32 *reg, const u32 mask,
 		if (get_timer(start) > timeout)
 			break;
 
+		if (ctrlc()) {
+			puts("Abort\n");
+			return -EINTR;
+		}
+
 		udelay(1);
 	}
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH v2] net: gem: Enable CTRL+C in wait_for_bit
  2015-12-01 10:37 [U-Boot] [PATCH v2] net: gem: Enable CTRL+C in wait_for_bit Michal Simek
@ 2015-12-01 21:06 ` Joe Hershberger
  0 siblings, 0 replies; 2+ messages in thread
From: Joe Hershberger @ 2015-12-01 21:06 UTC (permalink / raw)
  To: u-boot

On Tue, Dec 1, 2015 at 4:37 AM, Michal Simek <michal.simek@xilinx.com> wrote:
> Enable to break waiting loop at any time.
>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>

Acked-by: Joe Hershberger <joe.hershberger@ni.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-01 21:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-01 10:37 [U-Boot] [PATCH v2] net: gem: Enable CTRL+C in wait_for_bit Michal Simek
2015-12-01 21:06 ` Joe Hershberger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.