patch-pre2.0.14-final2.0 linux/drivers/net/arcnet.c

Next file: linux/drivers/net/eexpress.c
Previous file: linux/drivers/isdn/teles/q931.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file pre2.0.14/linux/drivers/net/arcnet.c linux/drivers/net/arcnet.c
@@ -17,6 +17,10 @@
          
 	**********************
 	
+	v2.53 (96/06/06)
+	  - arc0e and arc0s wouldn't initialize in newer kernels, which
+	    don't like dev->open==NULL or dev->stop==NULL.
+	
 	v2.52 (96/04/20)
 	  - Replaced more decimal node ID's with hex, for consistency.
 	  - Changed a couple of printk debug levels.
@@ -180,7 +184,7 @@
 */
 
 static const char *version =
- "arcnet.c: v2.52 96/04/20 Avery Pennarun <apenwarr@foxnet.net>\n";
+ "arcnet.c: v2.53 96/06/06 Avery Pennarun <apenwarr@foxnet.net>\n";
 
  
 
@@ -635,6 +639,7 @@
 #ifdef CONFIG_ARCNET_ETH
 	/* functions specific to Ethernet-Encap */
 static int arcnetE_init(struct device *dev);
+static int arcnetE_open_close(struct device *dev);
 static int arcnetE_send_packet(struct sk_buff *skb, struct device *dev);
 static void arcnetE_rx(struct device *dev,u_char *arcsoft,
 	int length,u_char saddr, u_char daddr);
@@ -643,6 +648,7 @@
 #ifdef CONFIG_ARCNET_1051
 	/* functions specific to RFC1051 */
 static int arcnetS_init(struct device *dev);
+static int arcnetS_open_close(struct device *dev);
 static int arcnetS_send_packet(struct sk_buff *skb, struct device *dev);
 static void arcnetS_rx(struct device *dev,u_char *buf,
 	int length,u_char saddr, u_char daddr);
@@ -2755,8 +2761,8 @@
 	dev->dev_addr[0]=0;
 	dev->dev_addr[5]=lp->stationid;
 	dev->mtu=512-sizeof(struct HardHeader)-dev->hard_header_len-1;
-	dev->open=NULL;
-	dev->stop=NULL;
+	dev->open=arcnetE_open_close;
+	dev->stop=arcnetE_open_close;
 	dev->hard_start_xmit=arcnetE_send_packet;
 
 	BUGMSG(D_EXTRA,"ARCnet Ethernet-Encap protocol initialized.\n");
@@ -2765,6 +2771,15 @@
 }
 
 
+/* Bring up/down the arc0e device - we don't actually have to do anything,
+ * since our parent arc0 handles the card I/O itself.
+ */
+static int arcnetE_open_close(struct device *dev)
+{
+	return 0;
+}
+
+
 /* Called by the kernel in order to transmit an ethernet-type packet.
  */
 static int
@@ -2925,13 +2940,22 @@
 	dev->hard_header_len=sizeof(struct S_ClientData);
 	dev->mtu=512-sizeof(struct HardHeader)-dev->hard_header_len
 		+ S_EXTRA_CLIENTDATA;
-	dev->open=NULL;
-	dev->stop=NULL;
+	dev->open=arcnetS_open_close;
+	dev->stop=arcnetS_open_close;
 	dev->hard_start_xmit=arcnetS_send_packet;
 	dev->hard_header=arcnetS_header;
 	dev->rebuild_header=arcnetS_rebuild_header;
 	BUGMSG(D_EXTRA,"ARCnet RFC1051 (NetBSD, AmiTCP) protocol initialized.\n");
 
+	return 0;
+}
+
+
+/* Bring up/down the arc0s device - we don't actually have to do anything,
+ * since our parent arc0 handles the card I/O itself.
+ */
+static int arcnetS_open_close(struct device *dev)
+{
 	return 0;
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this