summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/3c501.c2
-rw-r--r--drivers/net/3c505.c2
-rw-r--r--drivers/net/3c507.c2
-rw-r--r--drivers/net/3c509.c3
-rw-r--r--drivers/net/8390.c2
-rw-r--r--drivers/net/apricot.c2
-rw-r--r--drivers/net/at1700.c2
-rw-r--r--drivers/net/atp.c2
-rw-r--r--drivers/net/de600.c2
-rw-r--r--drivers/net/de620.c2
-rw-r--r--drivers/net/depca.c2
-rw-r--r--drivers/net/eexpress.c2
-rw-r--r--drivers/net/loopback.c9
-rw-r--r--drivers/net/ni52.c5
-rw-r--r--drivers/net/ni65.c2
-rw-r--r--drivers/net/plip.c2
-rw-r--r--drivers/net/sk_g16.c2
-rw-r--r--drivers/net/skeleton.c2
-rw-r--r--drivers/net/znet.c2
19 files changed, 30 insertions, 19 deletions
diff --git a/drivers/net/3c501.c b/drivers/net/3c501.c
index c2a0b4962..5643c2d5e 100644
--- a/drivers/net/3c501.c
+++ b/drivers/net/3c501.c
@@ -329,7 +329,7 @@ el_start_xmit(struct sk_buff *skb, struct device *dev)
static void
el_interrupt(int reg_ptr)
{
- int irq = -(((struct pt_regs *)reg_ptr)->orig_eax+2);
+ int irq = pt_regs2irq(reg_ptr);
struct device *dev = (struct device *)(irq2dev_map[irq]);
struct net_local *lp;
int ioaddr;
diff --git a/drivers/net/3c505.c b/drivers/net/3c505.c
index 657e2ac04..a980373c5 100644
--- a/drivers/net/3c505.c
+++ b/drivers/net/3c505.c
@@ -671,7 +671,7 @@ static void elp_interrupt(int reg_ptr)
{
int len;
int dlen;
- int irq = -(((struct pt_regs *)reg_ptr)->orig_eax+2);
+ int irq = pt_regs2irq(reg_ptr);
struct device *dev;
elp_device * adapter;
int timeout;
diff --git a/drivers/net/3c507.c b/drivers/net/3c507.c
index e8a8ae673..5cc261c51 100644
--- a/drivers/net/3c507.c
+++ b/drivers/net/3c507.c
@@ -511,7 +511,7 @@ el16_send_packet(struct sk_buff *skb, struct device *dev)
static void
el16_interrupt(int reg_ptr)
{
- int irq = -(((struct pt_regs *)reg_ptr)->orig_eax+2);
+ int irq = pt_regs2irq(reg_ptr);
struct device *dev = (struct device *)(irq2dev_map[irq]);
struct net_local *lp;
int ioaddr, status, boguscount = 0;
diff --git a/drivers/net/3c509.c b/drivers/net/3c509.c
index f8f363c68..395a096c6 100644
--- a/drivers/net/3c509.c
+++ b/drivers/net/3c509.c
@@ -462,7 +462,8 @@ el3_start_xmit(struct sk_buff *skb, struct device *dev)
static void
el3_interrupt(int reg_ptr)
{
- int irq = -(((struct pt_regs *)reg_ptr)->orig_eax+2);
+ int irq = pt_regs2irq(reg_ptr);
+
struct device *dev = (struct device *)(irq2dev_map[irq]);
int ioaddr, status;
int i = 0;
diff --git a/drivers/net/8390.c b/drivers/net/8390.c
index e05081be5..ebed123a7 100644
--- a/drivers/net/8390.c
+++ b/drivers/net/8390.c
@@ -238,7 +238,7 @@ static int ei_start_xmit(struct sk_buff *skb, struct device *dev)
Handle the ether interface interrupts. */
void ei_interrupt(int reg_ptr)
{
- int irq = -(((struct pt_regs *)reg_ptr)->orig_eax+2);
+ int irq = pt_regs2irq(reg_ptr);
struct device *dev = (struct device *)(irq2dev_map[irq]);
int e8390_base;
int interrupts, boguscount = 0;
diff --git a/drivers/net/apricot.c b/drivers/net/apricot.c
index fcf3386e4..f3da8c8e9 100644
--- a/drivers/net/apricot.c
+++ b/drivers/net/apricot.c
@@ -712,7 +712,7 @@ unsigned long apricot_init(unsigned long mem_start, unsigned long mem_end)
static void
i596_interrupt(int reg_ptr)
{
- int irq = -(((struct pt_regs *)reg_ptr)->orig_eax+2);
+ int irq = pt_regs2irq(reg_ptr);
struct device *dev = (struct device *)(irq2dev_map[irq]);
struct i596_private *lp;
short ioaddr;
diff --git a/drivers/net/at1700.c b/drivers/net/at1700.c
index 974f98d1e..be2bf7ed3 100644
--- a/drivers/net/at1700.c
+++ b/drivers/net/at1700.c
@@ -437,7 +437,7 @@ net_send_packet(struct sk_buff *skb, struct device *dev)
static void
net_interrupt(int reg_ptr)
{
- int irq = -(((struct pt_regs *)reg_ptr)->orig_eax+2);
+ int irq = pt_regs2irq(reg_ptr);
struct device *dev = (struct device *)(irq2dev_map[irq]);
struct net_local *lp;
int ioaddr, status;
diff --git a/drivers/net/atp.c b/drivers/net/atp.c
index 3f860b99b..19520abf2 100644
--- a/drivers/net/atp.c
+++ b/drivers/net/atp.c
@@ -481,7 +481,7 @@ net_send_packet(struct sk_buff *skb, struct device *dev)
static void
net_interrupt(int reg_ptr)
{
- int irq = -(((struct pt_regs *)reg_ptr)->orig_eax+2);
+ int irq = pt_regs2irq(reg_ptr);
struct device *dev = (struct device *)(irq2dev_map[irq]);
struct net_local *lp;
int ioaddr, status, boguscount = 20;
diff --git a/drivers/net/de600.c b/drivers/net/de600.c
index 4cd21582d..a8867c2d9 100644
--- a/drivers/net/de600.c
+++ b/drivers/net/de600.c
@@ -498,7 +498,7 @@ de600_start_xmit(struct sk_buff *skb, struct device *dev)
static void
de600_interrupt(int reg_ptr)
{
- int irq = -(((struct pt_regs *)reg_ptr)->orig_eax+2);
+ int irq = pt_regs2irq(reg_ptr);
struct device *dev = irq2dev_map[irq];
byte irq_status;
int retrig = 0;
diff --git a/drivers/net/de620.c b/drivers/net/de620.c
index e3cb9a307..28124eb3c 100644
--- a/drivers/net/de620.c
+++ b/drivers/net/de620.c
@@ -568,7 +568,7 @@ de620_start_xmit(struct sk_buff *skb, struct device *dev)
static void
de620_interrupt(int reg_ptr)
{
- int irq = -(((struct pt_regs *)reg_ptr)->orig_eax+2);
+ int irq = pt_regs2irq(reg_ptr);
struct device *dev = irq2dev_map[irq];
byte irq_status;
int bogus_count = 0;
diff --git a/drivers/net/depca.c b/drivers/net/depca.c
index fcb8f86af..c3fdccaf6 100644
--- a/drivers/net/depca.c
+++ b/drivers/net/depca.c
@@ -948,7 +948,7 @@ depca_start_xmit(struct sk_buff *skb, struct device *dev)
static void
depca_interrupt(int reg_ptr)
{
- int irq = -(((struct pt_regs *)reg_ptr)->orig_eax+2);
+ int irq = pt_regs2irq(reg_ptr);
struct device *dev = (struct device *)(irq2dev_map[irq]);
struct depca_private *lp;
int csr0, ioaddr, nicsr;
diff --git a/drivers/net/eexpress.c b/drivers/net/eexpress.c
index ace82ca4e..f1e041fd5 100644
--- a/drivers/net/eexpress.c
+++ b/drivers/net/eexpress.c
@@ -516,7 +516,7 @@ eexp_send_packet(struct sk_buff *skb, struct device *dev)
static void
eexp_interrupt(int reg_ptr)
{
- int irq = -(((struct pt_regs *)reg_ptr)->orig_eax+2);
+ int irq = pt_regs2irq(reg_ptr);
struct device *dev = (struct device *)(irq2dev_map[irq]);
struct net_local *lp;
int ioaddr, status, boguscount = 0;
diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c
index 4927dfedb..b1ec43b23 100644
--- a/drivers/net/loopback.c
+++ b/drivers/net/loopback.c
@@ -21,6 +21,7 @@
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/sched.h>
+#include <linux/interrupt.h>
#include <linux/fs.h>
#include <linux/types.h>
#include <linux/string.h>
@@ -71,6 +72,7 @@ loopback_xmit(struct sk_buff *skb, struct device *dev)
dev->tbusy = 0;
#if 1
+#if defined (__i386__)
__asm__("cmpl $0,_intr_count\n\t"
"jne 1f\n\t"
"movl _bh_active,%%eax\n\t"
@@ -83,6 +85,13 @@ loopback_xmit(struct sk_buff *skb, struct device *dev)
:
:
: "ax", "dx", "cx");
+#elif defined (__mips__)
+ if(intr_count == 0 && (bh_active & bh_mask) != 0) {
+ intr_count++;
+ do_bottom_half();
+ intr_count--;
+ }
+#endif
#endif
return(0);
diff --git a/drivers/net/ni52.c b/drivers/net/ni52.c
index aa7673dfd..12ad62caf 100644
--- a/drivers/net/ni52.c
+++ b/drivers/net/ni52.c
@@ -716,7 +716,8 @@ static void *alloc_rfa(struct device *dev,void *ptr)
static void ni52_interrupt(int reg_ptr)
{
- struct device *dev = (struct device *) irq2dev_map[-((struct pt_regs *)reg_ptr)->orig_eax-2];
+ int irq = -(((struct pt_regs *)reg_ptr)->orig_eax+2);
+ struct device *dev = (struct device *)(irq2dev_map[irq]);
unsigned short stat;
int pd = 0;
struct priv *p;
@@ -726,7 +727,7 @@ static void ni52_interrupt(int reg_ptr)
#endif
if (dev == NULL) {
- printk ("ni52-interrupt: irq %d for unknown device.\n",(int) -(((struct pt_regs *)reg_ptr)->orig_eax+2));
+ printk ("ni52-interrupt: irq %d for unknown device.\n", irq);
return;
}
p = (struct priv *) dev->priv;
diff --git a/drivers/net/ni65.c b/drivers/net/ni65.c
index 126b41a06..e17f71908 100644
--- a/drivers/net/ni65.c
+++ b/drivers/net/ni65.c
@@ -400,7 +400,7 @@ static int am7990_reinit(struct device *dev)
static void ni65_interrupt(int reg_ptr)
{
- int irq = -(((struct pt_regs *)reg_ptr)->orig_eax+2);
+ int irq = pt_regs2irq(reg_ptr);
int csr0;
struct device *dev = (struct device *) irq2dev_map[irq];
diff --git a/drivers/net/plip.c b/drivers/net/plip.c
index f54135a47..e0c6a10b1 100644
--- a/drivers/net/plip.c
+++ b/drivers/net/plip.c
@@ -681,7 +681,7 @@ plip_receive_packet(struct device *dev)
static void
plip_interrupt(int reg_ptr)
{
- int irq = -(((struct pt_regs *)reg_ptr)->orig_eax+2);
+ int irq = pt_regs2irq(reg_ptr);
struct device *dev = (struct device *) irq2dev_map[irq];
struct net_local *nl = (struct net_local *)dev->priv;
struct plip_local *rcv = &nl->rcv_data;
diff --git a/drivers/net/sk_g16.c b/drivers/net/sk_g16.c
index f6f427525..acdce289f 100644
--- a/drivers/net/sk_g16.c
+++ b/drivers/net/sk_g16.c
@@ -1312,7 +1312,7 @@ static int SK_send_packet(struct sk_buff *skb, struct device *dev)
static void SK_interrupt(int reg_ptr)
{
- int irq = - (((struct pt_regs *)reg_ptr)->orig_eax+2);
+ int irq = pt_regs2irq(reg_ptr);
int csr0;
struct device *dev = (struct device *) irq2dev_map[irq];
struct priv *p = (struct priv *) dev->priv;
diff --git a/drivers/net/skeleton.c b/drivers/net/skeleton.c
index 37ea0d125..f98250c85 100644
--- a/drivers/net/skeleton.c
+++ b/drivers/net/skeleton.c
@@ -357,7 +357,7 @@ net_send_packet(struct sk_buff *skb, struct device *dev)
static void
net_interrupt(int reg_ptr)
{
- int irq = -(((struct pt_regs *)reg_ptr)->orig_eax+2);
+ int irq = pt_regs2irq(reg_ptr);
struct device *dev = (struct device *)(irq2dev_map[irq]);
struct net_local *lp;
int ioaddr, status, boguscount = 0;
diff --git a/drivers/net/znet.c b/drivers/net/znet.c
index 21df8831f..1111f41b1 100644
--- a/drivers/net/znet.c
+++ b/drivers/net/znet.c
@@ -405,7 +405,7 @@ static int znet_send_packet(struct sk_buff *skb, struct device *dev)
/* The ZNET interrupt handler. */
static void znet_interrupt(int reg_ptr)
{
- int irq = -(((struct pt_regs *)reg_ptr)->orig_eax+2);
+ int irq = pt_regs2irq(reg_ptr);
struct device *dev = irq2dev_map[irq];
int ioaddr;
int boguscnt = 20;