patch-1.3.19 linux/drivers/net/eexpress.c
Next file: linux/drivers/net/eql.c
Previous file: linux/drivers/net/eepro.c
Back to the patch index
Back to the overall index
- Lines: 73
- Date:
Tue Aug 15 18:08:33 1995
- Orig file:
v1.3.18/linux/drivers/net/eexpress.c
- Orig date:
Sun Aug 13 14:45:31 1995
diff -u --recursive --new-file v1.3.18/linux/drivers/net/eexpress.c linux/drivers/net/eexpress.c
@@ -1,4 +1,3 @@
-
/* eexpress.c: Intel EtherExpress device driver for Linux. */
/*
Written 1993 by Donald Becker.
@@ -146,6 +145,8 @@
#define EEPROM_Ctrl 14
#define ID_PORT 15
+#define EEXPRESS_IO_EXTENT 16
+
/* EEPROM_Ctrl bits. */
#define EE_SHIFT_CLK 0x01 /* EEPROM shift clock. */
@@ -363,7 +364,7 @@
}
/* We've committed to using the board, and can start filling in *dev. */
- request_region(ioaddr, 16,"eexpress");
+ request_region(ioaddr, EEXPRESS_IO_EXTENT, "eexpress");
dev->base_addr = ioaddr;
for (i = 0; i < 6; i++) {
@@ -654,9 +655,6 @@
irq2dev_map[dev->irq] = 0;
- /* release the ioport-region */
- release_region(ioaddr, 16);
-
/* Update the statistics here. */
#ifdef MODULE
@@ -1002,8 +1000,12 @@
#ifdef MODULE
char kernel_version[] = UTS_RELEASE;
+static char devicename[9] = { 0, };
static struct device dev_eexpress = {
- " " /*"eexpress"*/, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, express_probe };
+ devicename, /* device name is inserted by linux/drivers/net/net_init.c */
+ 0, 0, 0, 0,
+ 0, 0,
+ 0, 0, 0, NULL, express_probe };
int irq=0x300;
@@ -1013,7 +1015,7 @@
init_module(void)
{
if (io == 0)
- printk("eexpress: You should not use auto-probing with insmod!\n");
+ printk("eexpress: You should not use auto-probing with insmod!\n");
dev_eexpress.base_addr=io;
dev_eexpress.irq=irq;
if (register_netdev(&dev_eexpress) != 0)
@@ -1025,12 +1027,15 @@
cleanup_module(void)
{
if (MOD_IN_USE)
- printk("express: device busy, remove delayed\n");
+ printk("eexpress: device busy, remove delayed\n");
else
{
unregister_netdev(&dev_eexpress);
kfree_s(dev_eexpress.priv,sizeof(struct net_local));
dev_eexpress.priv=NULL;
+
+ /* If we don't do this, we can't re-insmod it later. */
+ release_region(dev_eexpress.base_addr, EEXPRESS_IO_EXTENT);
}
}
#endif /* MODULE */
FUNET's LINUX-ADM group, [email protected]
TCL-scripts by Sam Shen, [email protected]
with Sam's (original) version of this