patch-1.3.41 linux/drivers/net/3c505.c
Next file: linux/drivers/net/arcnet.c
Previous file: linux/drivers/char/cyclades.c
Back to the patch index
Back to the overall index
- Lines: 86
- Date:
Mon Nov 13 08:10:57 1995
- Orig file:
v1.3.40/linux/drivers/net/3c505.c
- Orig date:
Thu Nov 9 11:23:49 1995
diff -u --recursive --new-file v1.3.40/linux/drivers/net/3c505.c linux/drivers/net/3c505.c
@@ -10,7 +10,7 @@
* be here without 3C505 technical reference provided by
* 3Com.
*
- * Version: @(#)3c505.c 0.8.1 26-Jun-95
+ * Version: @(#)3c505.c 0.8.3 12-Nov-95
*
* Authors: Linux 3c505 device driver by
* Craig Southeren, <craigs@ineluki.apana.org.au>
@@ -103,7 +103,7 @@
* 3 = messages when interrupts received
*/
-#define ELP_VERSION "0.8.1"
+#define ELP_VERSION "0.8.3"
/*****************************************************************
*
@@ -473,9 +473,13 @@
adapter_hard_reset (struct device * dev)
{
int timeout;
+ long flags;
CHECK_NULL(dev);
+ save_flags(flags);
+ sti();
+
if (elp_debug > 0)
printk("%s: Resetting the adapter, please wait (approx 20 s)\n",
dev->name);
@@ -507,6 +511,7 @@
for (timeout = jiffies + (100 * 15); jiffies <= timeout; )
if (GET_ASF(dev->base_addr) != ASF_PCB_END)
break;
+ restore_flags(flags);
}
/******************************************************
@@ -1272,6 +1277,7 @@
int timeout;
int addr=dev->base_addr;
const char *name=dev->name;
+ long flags;
byte orig_HCR=inb_control(addr),
orig_HSR=inb_status(addr);
@@ -1286,6 +1292,10 @@
return -1; /* It can't be 3c505 if HCR.DIR != HSR.DIR */
}
+ /* Enable interrupts - we need timers! */
+ save_flags(flags);
+ sti();
+
/* Wait for a while; the adapter may still be booting up */
if (elp_debug > 0)
printk(stilllooking_msg);
@@ -1299,6 +1309,7 @@
timeout = jiffies+30;
while (jiffies < timeout)
;
+ restore_flags(flags);
if (inb_status(addr) & DIR) {
outb_control(orig_HCR,addr);
if (elp_debug > 0)
@@ -1311,6 +1322,7 @@
timeout = jiffies+300;
while (jiffies < timeout)
;
+ restore_flags(flags);
if (!(inb_status(addr) & DIR)) {
outb_control(orig_HCR,addr);
if (elp_debug > 0)
@@ -1462,8 +1474,8 @@
0, 0,
0, 0, 0, NULL, elplus_probe };
-static int io = 0x300;
-static int irq = 0;
+int io = 0x300;
+int irq = 0;
int init_module(void)
{
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