diff --git a/drivers/i82365.c b/drivers/i82365.c
index 5f44eac..1ac50d7 100644
--- a/drivers/i82365.c
+++ b/drivers/i82365.c
@@ -429,7 +429,8 @@
 	u_char map, ioctl;
 
 	map = io->map;
-	if ((map > 1) || (io->start > 0xffff) || (io->stop > 0xffff) ||
+	/* comment out: comparison is always false due to limited range of data type */
+	if ((map > 1) || /* (io->start > 0xffff) || (io->stop > 0xffff) || */
 		(io->stop < io->start))
 		return -1;
 	/* Turn off the window before changing anything */
diff --git a/drivers/netconsole.c b/drivers/netconsole.c
index 7e19161..6c27c08 100644
--- a/drivers/netconsole.c
+++ b/drivers/netconsole.c
@@ -33,10 +33,17 @@
 #error define CONFIG_NET_MULTI to use netconsole
 #endif
 
-static uchar nc_buf = 0;	/* input buffer */
+static char input_buffer[512];
+static int input_size = 0;		/* char count in input buffer */
+static int input_offset = 0;		/* offset to valid chars in input buffer */
 static int input_recursion = 0;
 static int output_recursion = 0;
 static int net_timeout;
+static uchar nc_ether[6];		/* server enet address */
+static IPaddr_t nc_ip;			/* server ip */
+static short nc_port;			/* source/target port */
+static const char *output_packet;	/* used by first send udp */
+static int output_packet_len = 0;
 
 static void nc_wait_arp_handler (uchar * pkt, unsigned dest, unsigned src,
 				 unsigned len)
@@ -47,7 +54,7 @@
 static void nc_handler (uchar * pkt, unsigned dest, unsigned src,
 			unsigned len)
 {
-	if (nc_buf)
+	if (input_size)
 		NetState = NETLOOP_SUCCESS;	/* got input - quit net loop */
 }
 
@@ -58,23 +65,45 @@
 
 void NcStart (void)
 {
-	if (memcmp (NetServerEther, NetEtherNullAddr, 6)) {
+	if (!output_packet_len || memcmp (nc_ether, NetEtherNullAddr, 6)) {
 		/* going to check for input packet */
 		NetSetHandler (nc_handler);
 		NetSetTimeout (net_timeout, nc_timeout);
 	} else {
 		/* send arp request */
+		uchar *pkt;
 		NetSetHandler (nc_wait_arp_handler);
-		NetSendUDPPacket (NetServerEther, NetServerIP, 6665, 6666, 0);
+		pkt = (uchar *) NetTxPacket + NetEthHdrSize () + IP_HDR_SIZE;
+		memcpy (pkt, output_packet, output_packet_len);
+		NetSendUDPPacket (nc_ether, nc_ip, nc_port, nc_port, output_packet_len);
 	}
 }
 
 int nc_input_packet (uchar * pkt, unsigned dest, unsigned src, unsigned len)
 {
-	if (dest != 6666 || !len)
+	int end, chunk;
+
+	if (dest != nc_port || !len)
 		return 0;		/* not for us */
 
+	if (input_size == sizeof input_buffer)
+		return 1;		/* no space */
+	if (len > sizeof input_buffer - input_size)
+		len = sizeof input_buffer - input_size;
+
-	nc_buf = *pkt;
+	end = input_offset + input_size;
+	if (end > sizeof input_buffer)
+		end -= sizeof input_buffer;
+
+	chunk = len;
+	if (end + len > sizeof input_buffer) {
+		chunk = sizeof input_buffer - end;
+		memcpy(input_buffer, pkt + chunk, len - chunk);
+	}
+	memcpy (input_buffer + end, pkt, chunk);
+
+	input_size += len;
+
 	return 1;
 }
 
@@ -85,11 +114,20 @@
 	struct eth_device *eth;
 	int inited = 0;
 	uchar *pkt;
+	uchar *ether;
+	IPaddr_t ip;
 
-	if (!memcmp (NetServerEther, NetEtherNullAddr, 6))
+	if ((eth = eth_get_dev ()) == NULL) {
 		return;
+	}
 
-	if ((eth = eth_get_dev ()) == NULL) {
+	if (!memcmp (nc_ether, NetEtherNullAddr, 6)) {
+		if (eth->state == ETH_STATE_ACTIVE)
+			return;	/* inside net loop */
+		output_packet = buf;
+		output_packet_len = len;
+		NetLoop (NETCONS);	/* wait for arp reply and send packet */
+		output_packet_len = 0;
 		return;
 	}
 
@@ -100,7 +138,9 @@
 	}
 	pkt = (uchar *) NetTxPacket + NetEthHdrSize () + IP_HDR_SIZE;
 	memcpy (pkt, buf, len);
-	NetSendUDPPacket (NetServerEther, NetServerIP, 6666, 6665, len);
+	ether = nc_ether;
+	ip = nc_ip;
+	NetSendUDPPacket (ether, ip, nc_port, nc_port, len);
 
 	if (inited)
 		eth_halt ();
@@ -108,10 +148,31 @@
 
 int nc_start (void)
 {
-	if (memcmp (NetServerEther, NetEtherNullAddr, 6))
-		return 0;
+	int netmask, our_ip;
+
+	nc_port = 6666;		/* default port */
 
-	return NetLoop (NETCONS);	/* wait for arp reply */
+	if (getenv ("ncip")) {
+		nc_ip = getenv_IPaddr ("ncip");
+		if (!nc_ip)
+			return -1;	/* ncip is 0.0.0.0 */
+		char *p = strchr (getenv ("ncip"), ':');
+		if (p)
+			nc_port = simple_strtoul (p + 1, NULL, 10);
+	} else
+		nc_ip = ~0;		/* ncip is not set */
+
+	our_ip = getenv_IPaddr ("ipaddr");
+	netmask = getenv_IPaddr ("netmask");
+
+	if (nc_ip == ~0 ||				/* 255.255.255.255 */
+	    ((netmask & our_ip) == (netmask & nc_ip) &&	/* on the same net */
+	    (netmask | nc_ip) == ~0))			/* broadcast to our net */
+		memset (nc_ether, 0xff, sizeof nc_ether);
+	else
+		memset (nc_ether, 0, sizeof nc_ether);	/* force arp request */
+
+	return 0;
 }
 
 void nc_putc (char c)
@@ -146,15 +207,18 @@
 	input_recursion = 1;
 
 	net_timeout = 0;	/* no timeout */
-	while (!nc_buf)
+	while (!input_size)
 		NetLoop (NETCONS);
 
 	input_recursion = 0;
 
-	uchar tmp = nc_buf;
+	uchar c = input_buffer[input_offset];
+	input_offset++;
+	if (input_offset >= sizeof input_buffer)
+		input_offset -= sizeof input_buffer;
+	input_size--;
 
-	nc_buf = 0;
-	return tmp;
+	return c;
 }
 
 int nc_tstc (void)
@@ -164,7 +228,7 @@
 	if (input_recursion)
 		return 0;
 
-	if (nc_buf)
+	if (input_size)
 		return 1;
 
 	eth = eth_get_dev ();
@@ -174,11 +238,11 @@
 	input_recursion = 1;
 
 	net_timeout = 1;
-	NetLoop (NETCONS);		/* kind of poll */
+	NetLoop (NETCONS);	/* kind of poll */
 
 	input_recursion = 0;
 
-	return nc_buf != 0;
+	return input_size != 0;
 }
 
 int drv_nc_init (void)
diff --git a/drivers/smiLynxEM.c b/drivers/smiLynxEM.c
index 26469e2..94092a3 100644
--- a/drivers/smiLynxEM.c
+++ b/drivers/smiLynxEM.c
@@ -550,7 +550,7 @@
 	smiWrite (SMI_INDX_C4, 0x6b, 0x15);
 
 	/* VCLK */
-	freq = 1000000000000L / var -> pixclock;
+	freq = 1000000000000LL / var -> pixclock;
 
 	FindPQ ((unsigned int)freq, &p, &q);
 
