From ff301e1b9b52519731ec7a9f8f755b43b30c45dc Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Thu, 28 Nov 1996 09:54:38 +0000 Subject: [PATCH] Add a timeout here, just like in if_ed.c Reviewed by: phk Submitted by: Luigi Rizzo --- sys/i386/boot/netboot/ns8390.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/i386/boot/netboot/ns8390.c b/sys/i386/boot/netboot/ns8390.c index be476d6d6efc..4019bd22d91c 100644 --- a/sys/i386/boot/netboot/ns8390.c +++ b/sys/i386/boot/netboot/ns8390.c @@ -644,8 +644,9 @@ eth_pio_write(src, dst, cnt, init) while (cnt--) outb(eth_asic_base + NE_DATA, *(src++)); } + cnt = 200; while((inb(eth_nic_base + D8390_P0_ISR) & D8390_ISR_RDC) - != D8390_ISR_RDC); + != D8390_ISR_RDC && --cnt); } #else /**************************************************************************