*****************************************************************************/
static const char version[] =
"de620.c: $Revision: 1.40 $, Bjorn Ekwall <bj0rn@blox.se>\n";
-\f
+
/***********************************************************************
*
* "Tuning" section.
#define COUNT_LOOPS
*/
#endif
-\f
+
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/types.h>
static int de620_start_xmit(struct sk_buff *, struct net_device *);
/* Dispatch from interrupts. */
-static irqreturn_t de620_interrupt(int, void *, struct pt_regs *);
+static irqreturn_t de620_interrupt(int, void *);
static int de620_rx_intr(struct net_device *);
/* Initialization */
byte Media;
byte SCR;
} nic_data;
-\f
+
/**********************************************************
* *
* Convenience macros/functions for D-Link DE-620 adapter *
return value;
}
-\f
+
/*********************************************************************
*
* Open/initialize the board.
}
/*******************************************************
- *
+ *
* Handle timeouts on transmit
*/
-
+
static void de620_timeout(struct net_device *dev)
{
printk(KERN_WARNING "%s: transmit timed out, %s?\n", dev->name, "network cable problem");
byte using_txbuf;
using_txbuf = de620_tx_buffs(dev); /* Peek at the adapter */
-
+
netif_stop_queue(dev);
-
+
if ((len = skb->len) < RUNT)
len = RUNT;
dev_kfree_skb (skb);
return 0;
}
-\f
+
/*****************************************************
*
* Handle the network interface interrupts.
*
*/
static irqreturn_t
-de620_interrupt(int irq_in, void *dev_id, struct pt_regs *regs)
+de620_interrupt(int irq_in, void *dev_id)
{
struct net_device *dev = dev_id;
byte irq_status;
int again = 0;
spin_lock(&de620_lock);
-
+
/* Read the status register (_not_ the status port) */
irq_status = de620_get_register(dev, R_STS);
if(de620_tx_buffs(dev) != (TXBF0 | TXBF1))
netif_wake_queue(dev);
-
+
spin_unlock(&de620_lock);
return IRQ_HANDLED;
}
return (next_rx_page != curr_page); /* That was slightly tricky... */
}
-\f
+
/*********************************************
*
* Reset the adapter to a known state
return 0; /* all ok */
}
-\f
+
/******************************************************************************
*
* Only start-up code below
SET_MODULE_OWNER(dev);
spin_lock_init(&de620_lock);
-
+
/*
* This is where the base_addr and irq gets set.
* Tunable at compile-time and insmod-time
sprintf(dev->name, "eth%d", unit);
netdev_boot_setup_check(dev);
}
-
+
if (de620_debug)
printk(version);
dev->tx_timeout = de620_timeout;
dev->watchdog_timeo = HZ*2;
dev->set_multicast_list = de620_set_multicast_list;
-
+
/* base_addr and irq are already set, see above! */
/* dump eeprom */
out:
return ERR_PTR(err);
}
-\f
+
/**********************************
*
* Read info from on-board EEPROM
return 0; /* no errors */
}
-\f
+
/******************************************************************************
*
* Loadable module skeleton
#endif /* MODULE */
MODULE_LICENSE("GPL");
-\f
+
/*
* (add '-DMODULE' when compiling as loadable module)
*