ALPHA-pl14w
diff --git a/Makefile b/Makefile
index 504d696..564ea92 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 VERSION = 0.99
 PATCHLEVEL = 14
-ALPHA = v
+ALPHA = w
 
 all:	Version zImage
 
diff --git a/drivers/net/atp.c b/drivers/net/atp.c
index f753c79..e99d024 100644
--- a/drivers/net/atp.c
+++ b/drivers/net/atp.c
@@ -12,7 +12,7 @@
 */
 
 static char *version =
-	"atp.c:v0.02 12/22/93 Donald Becker (becker@super.org)\n";
+	"atp.c:v0.03 1/19/94 Donald Becker (becker@super.org)\n";
 
 /*
 	This file is a device driver for the RealTek (aka AT-Lan-Tec) pocket
@@ -623,6 +623,12 @@
 			break;
     }
 
+	{
+		int i;
+		for (i = 0; i < 6; i++)
+			write_reg_byte(ioaddr, PAR0 + i, dev->dev_addr[i]);
+	}
+
 	/* Tell the adaptor that it can go back to using the output line as IRQ. */
     write_reg(ioaddr, CMR2, CMR2_IRQOUT);
 	/* Enable the physical interrupt line, which is sure to be low until.. */
diff --git a/drivers/net/ne.c b/drivers/net/ne.c
index e198d55..9ad85fd 100644
--- a/drivers/net/ne.c
+++ b/drivers/net/ne.c
@@ -17,7 +17,7 @@
 /* Routines for the NatSemi-based designs (NE[12]000). */
 
 static char *version =
-    "ne.c:v0.99-14a 12/3/93 Donald Becker (becker@super.org)\n";
+    "ne.c:v0.99-15 1/19/93 Donald Becker (becker@super.org)\n";
 
 #include <linux/config.h>
 #include <linux/kernel.h>
@@ -123,6 +123,10 @@
 
     printk("NE*000 ethercard probe at %#3x:", ioaddr);
 
+    /* First hard-reset the ethercard. */
+    i = inb_p(ioaddr + NE_RESET);
+    outb_p(i, ioaddr + NE_RESET);
+
     /* Read the 16 bytes of station address prom, returning 1 for
        an eight-bit interface and 2 for a 16-bit interface.
        We must first initialize registers, similar to NS8390_init(eifdev, 0).
@@ -158,8 +162,8 @@
 	/* We must set the 8390 for word mode, AND RESET IT. */
 	int tmp;
 	outb_p(0x49, ioaddr + EN0_DCFG);
-	tmp = inb_p(NE_BASE + NE_RESET);
-	outb(tmp, NE_BASE + NE_RESET);
+	tmp = inb_p(ioaddr + NE_RESET);
+	outb(tmp, ioaddr + NE_RESET);
 	/* Un-double the SA_prom values. */
 	for (i = 0; i < 16; i++)
 	    SA_prom[i] = SA_prom[i+i];
diff --git a/drivers/net/slip.c b/drivers/net/slip.c
index fb722fd..f19a226 100644
--- a/drivers/net/slip.c
+++ b/drivers/net/slip.c
@@ -583,57 +583,8 @@
 {
 #ifdef CONFIG_AX25
   struct slip *sl=&sl_ctrl[dev->base_addr];
-  unsigned long flags;
   if((sl->mode&SL_MODE_AX25) && type!=NET16(ETH_P_AX25))
-  {
-  	/* header is an AX.25 UI frame from us to them */
-  	if(chk_addr(daddr) == IS_BROADCAST)
-  	{
-  		*buff++=0;
-	  	memcpy(buff,dev->broadcast,dev->addr_len);	/* QST-0 */
-	}
-	else
-	{
-		if(type!=ETH_P_IP)
-			printk("AX25 Encap: Non IP frame to encapsulate directed\n");
-		save_flags(flags);
-		cli();
-		*buff++=0;	/* KISS DATA */
-		memcpy(buff,&daddr,4);	/* In case arp fails */
-		if(arp_find(buff,daddr,dev, saddr))
-		{
-			memcpy(buff+7,&saddr,4);
-			buff+=14;
-		  	*buff++=LAPB_UI;	/* UI */
-  			/* Append a suitable AX.25 PID */
-  			*buff++=PID_IP;	/* AX25 IP */
-			restore_flags(flags);
-			return ( -dev->hard_header_len);
-		}
-	}
-  	buff[6]&=~LAPB_C;
-  	buff[6]&=~LAPB_E;
-  	buff+=7;
-  	memcpy(buff,dev->dev_addr,dev->addr_len);
-  	buff[6]&=~LAPB_C;
-  	buff[6]|=LAPB_E;
-  	buff+=7;
-  	*buff++=LAPB_UI;	/* UI */
-  	/* Append a suitable AX.25 PID */
-  	switch(type)
-  	{
-  		case ETH_P_IP:
-  			*buff++=PID_IP;	/* AX25 IP */
- 			break;
-  		case ETH_P_ARP:
-  			*buff++=PID_ARP;
-  			break;
-  		default:
-  			*buff++=0;
- 	}
-  	
-  	return (17);
-  }
+  	return ax25_encapsulate_ip(buff,dev,type,daddr,saddr,len);
 #endif  
 
   return(0);
@@ -661,19 +612,7 @@
   struct slip *sl=&sl_ctrl[dev->base_addr];
   
   if(sl->mode&SL_MODE_AX25)
-  {
-  	unsigned char *bp=(unsigned char *)buff;
-  	long dest=*(long *)(bp+1);
-  	long src=*(long *)(bp+8);
-  	if(arp_find(bp+1,dest,dev,src))
-  		return 1;
-  	memcpy(bp+8,dev->dev_addr,7);
-  	bp[7]&=~LAPB_C;
-  	bp[7]&=~LAPB_E;
-  	bp[14]&=~LAPB_C;
-  	bp[14]|=LAPB_E;
-  	return(0);
-  }
+  	return ax25_rebuild_header(buff,dev);
 #endif  
   return(0);
 }
diff --git a/drivers/scsi/wd7000.c b/drivers/scsi/wd7000.c
index e0654ac..b64f56f 100644
--- a/drivers/scsi/wd7000.c
+++ b/drivers/scsi/wd7000.c
@@ -508,7 +508,7 @@
 }
 
 
-static const char *wd_bases[] = {(char *)0xce000,(char *)d8000};
+static const char *wd_bases[] = {(char *)0xce000,(char *)0xd8000};
 
 typedef struct {
     char * signature;
diff --git a/net/inet/packet.c b/net/inet/packet.c
index 98b3713..e85edec 100644
--- a/net/inet/packet.c
+++ b/net/inet/packet.c
@@ -134,6 +134,7 @@
   memcpy_fromfs(skb->data, from, len);
   skb->len = len;
   skb->next = NULL;
+  skb->arp = 1;
   if (dev->flags & IFF_UP) dev->queue_xmit(skb, dev, sk->priority);
     else kfree_skb(skb, FREE_WRITE);
   return(len);
diff --git a/net/inet/sock.c b/net/inet/sock.c
index 70a9f28..8001bae 100644
--- a/net/inet/sock.c
+++ b/net/inet/sock.c
@@ -1157,7 +1157,7 @@
 	sock->state = SS_UNCONNECTED;
 	err=sk->err;
 	sk->err=0;
-	return(err);
+	return(-err);
   }
   return(0);
 }
diff --git a/net/inet/tcp.c b/net/inet/tcp.c
index 4de3e1e..41a3262 100644
--- a/net/inet/tcp.c
+++ b/net/inet/tcp.c
@@ -2926,6 +2926,10 @@
 	return(-ENETUNREACH);
   }
   
+  /* Connect back to the same socket: Blows up so disallow it */
+  if(sk->saddr == sin.sin_addr.s_addr && sk->num==ntohs(sin.sin_port))
+	return -EBUSY;
+
   sk->inuse = 1;
   sk->daddr = sin.sin_addr.s_addr;
   sk->send_seq = jiffies * SEQ_TICK - seq_offset;