git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git]
/
drivers
/
net
/
ni5010.c
diff --git
a/drivers/net/ni5010.c
b/drivers/net/ni5010.c
index
d4be207
..
a68bf47
100644
(file)
--- a/
drivers/net/ni5010.c
+++ b/
drivers/net/ni5010.c
@@
-1,12
+1,17
@@
/* ni5010.c: A network driver for the MiCom-Interlan NI5010 ethercard.
*
/* ni5010.c: A network driver for the MiCom-Interlan NI5010 ethercard.
*
- * Copyright 1996,1997
,2006
Jan-Pascal van Best and Andreas Mohr.
+ * Copyright 1996,1997 Jan-Pascal van Best and Andreas Mohr.
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
*
* The authors may be reached as:
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
*
* The authors may be reached as:
- * janpascal@vanbest.org andi@lisas.de
+ * jvbest@wi.leidenuniv.nl a.mohr@mailto.de
+ * or by snail mail as
+ * Jan-Pascal van Best Andreas Mohr
+ * Klikspaanweg 58-4 Stauferstr. 6
+ * 2324 LZ Leiden D-71272 Renningen
+ * The Netherlands Germany
*
* Sources:
* Donald Becker's "skeleton.c"
*
* Sources:
* Donald Becker's "skeleton.c"
@@
-22,9
+27,8
@@
* 970503 v0.93: Fixed auto-irq failure on warm reboot (JB)
* 970623 v1.00: First kernel version (AM)
* 970814 v1.01: Added detection of onboard receive buffer size (AM)
* 970503 v0.93: Fixed auto-irq failure on warm reboot (JB)
* 970623 v1.00: First kernel version (AM)
* 970814 v1.01: Added detection of onboard receive buffer size (AM)
- * 060611 v1.02: slight cleanup: email addresses, driver modernization.
* Bugs:
* Bugs:
- * -
not SMP-safe (no locking of I/O accesses)
+ * -
None known...
* - Note that you have to patch ifconfig for the new /proc/net/dev
* format. It gives incorrect stats otherwise.
*
* - Note that you have to patch ifconfig for the new /proc/net/dev
* format. It gives incorrect stats otherwise.
*
@@
-35,7
+39,7
@@
* Complete merge with Andreas' driver
* Implement ring buffers (Is this useful? You can't squeeze
* too many packet in a 2k buffer!)
* Complete merge with Andreas' driver
* Implement ring buffers (Is this useful? You can't squeeze
* too many packet in a 2k buffer!)
- * Implement DMA (Again, is this useful? Some docs say DMA is
+ * Implement DMA (Again, is this useful? Some docs say
s
DMA is
* slower than programmed I/O)
*
* Compile with:
* slower than programmed I/O)
*
* Compile with:
@@
-43,7
+47,7
@@
* -DMODULE -c ni5010.c
*
* Insert with e.g.:
* -DMODULE -c ni5010.c
*
* Insert with e.g.:
- * insmod ni5010.
ko io=0x300 irq=5
+ * insmod ni5010.
o io=0x300 irq=5
*/
#include <linux/module.h>
*/
#include <linux/module.h>
@@
-65,15
+69,15
@@
#include "ni5010.h"
#include "ni5010.h"
-static const char
boardname[]
= "NI5010";
-static char
version[] __initdata
=
- "ni5010.c: v1.0
2 20060611
Jan-Pascal van Best and Andreas Mohr\n";
+static const char
*boardname
= "NI5010";
+static char
*version
=
+ "ni5010.c: v1.0
0 06/23/97
Jan-Pascal van Best and Andreas Mohr\n";
/* bufsize_rcv == 0 means autoprobing */
static unsigned int bufsize_rcv;
/* bufsize_rcv == 0 means autoprobing */
static unsigned int bufsize_rcv;
-#define
JUMPERED_INTERRUPTS
/* IRQ line jumpered on board */
-#undef
JUMPERED_DMA
/* No DMA used */
+#define
jumpered_interrupts
/* IRQ line jumpered on board */
+#undef
jumpered_dma
/* No DMA used */
#undef FULL_IODETECT /* Only detect in portlist */
#ifndef FULL_IODETECT
#undef FULL_IODETECT /* Only detect in portlist */
#ifndef FULL_IODETECT
@@
-277,7
+281,7
@@
static int __init ni5010_probe1(struct net_device *dev, int ioaddr)
PRINTK2((KERN_DEBUG "%s: I/O #4 passed!\n", dev->name));
PRINTK2((KERN_DEBUG "%s: I/O #4 passed!\n", dev->name));
-#ifdef
JUMPERED_INTERRUPTS
+#ifdef
jumpered_interrupts
if (dev->irq == 0xff)
;
else if (dev->irq < 2) {
if (dev->irq == 0xff)
;
else if (dev->irq < 2) {
@@
-301,7
+305,7
@@
static int __init ni5010_probe1(struct net_device *dev, int ioaddr)
} else if (dev->irq == 2) {
dev->irq = 9;
}
} else if (dev->irq == 2) {
dev->irq = 9;
}
-#endif /*
JUMPERED_INTERRUPTS
*/
+#endif /*
jumpered_irq
*/
PRINTK2((KERN_DEBUG "%s: I/O #9 passed!\n", dev->name));
/* DMA is not supported (yet?), so no use detecting it */
PRINTK2((KERN_DEBUG "%s: I/O #9 passed!\n", dev->name));
/* DMA is not supported (yet?), so no use detecting it */
@@
-330,7
+334,7
@@
static int __init ni5010_probe1(struct net_device *dev, int ioaddr)
outw(0, IE_GP); /* Point GP at start of packet */
outb(0, IE_RBUF); /* set buffer byte 0 to 0 again */
}
outw(0, IE_GP); /* Point GP at start of packet */
outb(0, IE_RBUF); /* set buffer byte 0 to 0 again */
}
- printk("
->
bufsize rcv/xmt=%d/%d\n", bufsize_rcv, NI5010_BUFSIZE);
+ printk("
//
bufsize rcv/xmt=%d/%d\n", bufsize_rcv, NI5010_BUFSIZE);
memset(dev->priv, 0, sizeof(struct ni5010_local));
dev->open = ni5010_open;
memset(dev->priv, 0, sizeof(struct ni5010_local));
dev->open = ni5010_open;
@@
-350,9
+354,11
@@
static int __init ni5010_probe1(struct net_device *dev, int ioaddr)
outb(0xff, EDLC_XCLR); /* Kill all pending xmt interrupts */
printk(KERN_INFO "%s: NI5010 found at 0x%x, using IRQ %d", dev->name, ioaddr, dev->irq);
outb(0xff, EDLC_XCLR); /* Kill all pending xmt interrupts */
printk(KERN_INFO "%s: NI5010 found at 0x%x, using IRQ %d", dev->name, ioaddr, dev->irq);
- if (dev->dma)
- printk(" & DMA %d", dev->dma);
+ if (dev->dma) printk(" & DMA %d", dev->dma);
printk(".\n");
printk(".\n");
+
+ printk(KERN_INFO "Join the NI5010 driver development team!\n");
+ printk(KERN_INFO "Mail to a.mohr@mailto.de or jvbest@wi.leidenuniv.nl\n");
return 0;
out:
release_region(dev->base_addr, NI5010_IO_EXTENT);
return 0;
out:
release_region(dev->base_addr, NI5010_IO_EXTENT);
@@
-365,7
+371,7
@@
out:
*
* This routine should set everything up anew at each open, even
* registers that "should" only need to be set once at boot, so that
*
* This routine should set everything up anew at each open, even
* registers that "should" only need to be set once at boot, so that
- * there is
a
non-reboot way to recover if something goes wrong.
+ * there is non-reboot way to recover if something goes wrong.
*/
static int ni5010_open(struct net_device *dev)
*/
static int ni5010_open(struct net_device *dev)
@@
-384,13
+390,13
@@
static int ni5010_open(struct net_device *dev)
* Always allocate the DMA channel after the IRQ,
* and clean up on failure.
*/
* Always allocate the DMA channel after the IRQ,
* and clean up on failure.
*/
-#ifdef
JUMPERED_DMA
+#ifdef
jumpered_dma
if (request_dma(dev->dma, cardname)) {
printk(KERN_WARNING "%s: Cannot get dma %#2x\n", dev->name, dev->dma);
free_irq(dev->irq, NULL);
return -EAGAIN;
}
if (request_dma(dev->dma, cardname)) {
printk(KERN_WARNING "%s: Cannot get dma %#2x\n", dev->name, dev->dma);
free_irq(dev->irq, NULL);
return -EAGAIN;
}
-#endif /*
JUMPERED_DMA
*/
+#endif /*
jumpered_dma
*/
PRINTK3((KERN_DEBUG "%s: passed open() #2\n", dev->name));
/* Reset the hardware here. Don't forget to set the station address. */
PRINTK3((KERN_DEBUG "%s: passed open() #2\n", dev->name));
/* Reset the hardware here. Don't forget to set the station address. */
@@
-627,7
+633,7
@@
static int ni5010_close(struct net_device *dev)
int ioaddr = dev->base_addr;
PRINTK2((KERN_DEBUG "%s: entering ni5010_close\n", dev->name));
int ioaddr = dev->base_addr;
PRINTK2((KERN_DEBUG "%s: entering ni5010_close\n", dev->name));
-#ifdef
JUMPERED_INTERRUPTS
+#ifdef
jumpered_interrupts
free_irq(dev->irq, NULL);
#endif
/* Put card in held-RESET state */
free_irq(dev->irq, NULL);
#endif
/* Put card in held-RESET state */
@@
-765,7
+771,7
@@
module_param(irq, int, 0);
MODULE_PARM_DESC(io, "ni5010 I/O base address");
MODULE_PARM_DESC(irq, "ni5010 IRQ number");
MODULE_PARM_DESC(io, "ni5010 I/O base address");
MODULE_PARM_DESC(irq, "ni5010 IRQ number");
-
static int __init ni5010_
init_module(void)
+
int
init_module(void)
{
PRINTK2((KERN_DEBUG "%s: entering init_module\n", boardname));
/*
{
PRINTK2((KERN_DEBUG "%s: entering init_module\n", boardname));
/*
@@
-786,15
+792,13
@@
static int __init ni5010_init_module(void)
return 0;
}
return 0;
}
-
static void __exit ni5010_
cleanup_module(void)
+
void
cleanup_module(void)
{
PRINTK2((KERN_DEBUG "%s: entering cleanup_module\n", boardname));
unregister_netdev(dev_ni5010);
release_region(dev_ni5010->base_addr, NI5010_IO_EXTENT);
free_netdev(dev_ni5010);
}
{
PRINTK2((KERN_DEBUG "%s: entering cleanup_module\n", boardname));
unregister_netdev(dev_ni5010);
release_region(dev_ni5010->base_addr, NI5010_IO_EXTENT);
free_netdev(dev_ni5010);
}
-module_init(ni5010_init_module);
-module_exit(ni5010_cleanup_module);
#endif /* MODULE */
MODULE_LICENSE("GPL");
#endif /* MODULE */
MODULE_LICENSE("GPL");