patch-1.3.42 linux/drivers/net/8390.c
Next file: linux/drivers/net/8390.h
Previous file: linux/drivers/net/3c503.c
Back to the patch index
Back to the overall index
- Lines: 50
- Date:
Tue Nov 14 07:48:52 1995
- Orig file:
v1.3.41/linux/drivers/net/8390.c
- Orig date:
Thu Nov 9 11:23:49 1995
diff -u --recursive --new-file v1.3.41/linux/drivers/net/8390.c linux/drivers/net/8390.c
@@ -55,7 +55,6 @@
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
-#include <linux/skbuff.h>
#include "8390.h"
@@ -118,10 +117,11 @@
int ei_open(struct device *dev)
{
struct ei_device *ei_local = (struct ei_device *) dev->priv;
-
- if ( ! ei_local) {
- printk("%s: Opening a non-existent physical device\n", dev->name);
- return ENXIO;
+
+ /* This can't happen unless somebody forgot to call ethdev_init(). */
+ if (ei_local == NULL) {
+ printk(KERN_EMERG "%s: ei_open passed a non-existent device!\n", dev->name);
+ return -ENXIO;
}
irq2dev_map[dev->irq] = dev;
@@ -131,6 +131,14 @@
return 0;
}
+/* Opposite of above. Only used when "ifconfig <devname> down" is done. */
+int ei_close(struct device *dev)
+{
+ NS8390_init(dev, 0);
+ dev->start = 0;
+ return 0;
+}
+
static int ei_start_xmit(struct sk_buff *skb, struct device *dev)
{
int e8390_base = dev->base_addr;
@@ -603,10 +611,6 @@
ei_local->pingpong = ei_pingpong;
}
- /* The open call may be overridden by the card-specific code. */
- if (dev->open == NULL)
- dev->open = &ei_open;
- /* We should have a dev->stop entry also. */
dev->hard_start_xmit = &ei_start_xmit;
dev->get_stats = get_stats;
#ifdef HAVE_MULTICAST
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