projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[powerpc.git]
/
drivers
/
net
/
wd.c
diff --git
a/drivers/net/wd.c
b/drivers/net/wd.c
index
b03feae
..
41f1d67
100644
(file)
--- a/
drivers/net/wd.c
+++ b/
drivers/net/wd.c
@@
-61,7
+61,7
@@
static void wd_block_output(struct net_device *dev, int count,
const unsigned char *buf, int start_page);
static int wd_close(struct net_device *dev);
const unsigned char *buf, int start_page);
static int wd_close(struct net_device *dev);
-
\f
+
#define WD_START_PG 0x00 /* First page of TX buffer */
#define WD03_STOP_PG 0x20 /* Last page +1 of RX ring */
#define WD13_STOP_PG 0x40 /* Last page +1 of RX ring */
#define WD_START_PG 0x00 /* First page of TX buffer */
#define WD03_STOP_PG 0x20 /* Last page +1 of RX ring */
#define WD13_STOP_PG 0x40 /* Last page +1 of RX ring */
@@
-75,7
+75,7
@@
static int wd_close(struct net_device *dev);
#define WD_NIC_OFFSET 16 /* Offset to the 8390 from the base_addr. */
#define WD_IO_EXTENT 32
#define WD_NIC_OFFSET 16 /* Offset to the 8390 from the base_addr. */
#define WD_IO_EXTENT 32
-
\f
+
/* Probe for the WD8003 and WD8013. These cards have the station
address PROM at I/O ports <base>+8 to <base>+13, with a checksum
following. A Soundblaster can have the same checksum as an WDethercard,
/* Probe for the WD8003 and WD8013. These cards have the station
address PROM at I/O ports <base>+8 to <base>+13, with a checksum
following. A Soundblaster can have the same checksum as an WDethercard,
@@
-100,7
+100,7
@@
static int __init do_wd_probe(struct net_device *dev)
if ( r == NULL)
return -EBUSY;
i = wd_probe1(dev, base_addr);
if ( r == NULL)
return -EBUSY;
i = wd_probe1(dev, base_addr);
- if (i != 0)
+ if (i != 0)
release_region(base_addr, WD_IO_EXTENT);
else
r->name = dev->name;
release_region(base_addr, WD_IO_EXTENT);
else
r->name = dev->name;
@@
-127,13
+127,6
@@
static int __init do_wd_probe(struct net_device *dev)
return -ENODEV;
}
return -ENODEV;
}
-static void cleanup_card(struct net_device *dev)
-{
- free_irq(dev->irq, dev);
- release_region(dev->base_addr - WD_NIC_OFFSET, WD_IO_EXTENT);
- iounmap(ei_status.mem);
-}
-
#ifndef MODULE
struct net_device * __init wd_probe(int unit)
{
#ifndef MODULE
struct net_device * __init wd_probe(int unit)
{
@@
-279,7
+272,7
@@
static int __init wd_probe1(struct net_device *dev, int ioaddr)
a reliable way to trigger an interrupt. */
outb_p(E8390_NODMA + E8390_STOP, nic_addr);
outb(0x00, nic_addr+EN0_IMR); /* Disable all intrs. */
a reliable way to trigger an interrupt. */
outb_p(E8390_NODMA + E8390_STOP, nic_addr);
outb(0x00, nic_addr+EN0_IMR); /* Disable all intrs. */
-
+
irq_mask = probe_irq_on();
outb_p(0xff, nic_addr + EN0_IMR); /* Enable all interrupts. */
outb_p(0x00, nic_addr + EN0_RCNTLO);
irq_mask = probe_irq_on();
outb_p(0xff, nic_addr + EN0_IMR); /* Enable all interrupts. */
outb_p(0x00, nic_addr + EN0_RCNTLO);
@@
-287,7
+280,7
@@
static int __init wd_probe1(struct net_device *dev, int ioaddr)
outb(E8390_RREAD+E8390_START, nic_addr); /* Trigger it... */
mdelay(20);
dev->irq = probe_irq_off(irq_mask);
outb(E8390_RREAD+E8390_START, nic_addr); /* Trigger it... */
mdelay(20);
dev->irq = probe_irq_off(irq_mask);
-
+
outb_p(0x00, nic_addr+EN0_IMR); /* Mask all intrs. again. */
if (ei_debug > 2)
outb_p(0x00, nic_addr+EN0_IMR); /* Mask all intrs. again. */
if (ei_debug > 2)
@@
-485,7
+478,7
@@
wd_close(struct net_device *dev)
return 0;
}
return 0;
}
-
\f
+
#ifdef MODULE
#define MAX_WD_CARDS 4 /* Max number of wd cards per module */
static struct net_device *dev_wd[MAX_WD_CARDS];
#ifdef MODULE
#define MAX_WD_CARDS 4 /* Max number of wd cards per module */
static struct net_device *dev_wd[MAX_WD_CARDS];
@@
-507,8
+500,8
@@
MODULE_LICENSE("GPL");
/* This is set up so that only a single autoprobe takes place per call.
ISA device autoprobes on a running machine are not recommended. */
/* This is set up so that only a single autoprobe takes place per call.
ISA device autoprobes on a running machine are not recommended. */
-int
-init_module(void)
+
+in
t __init in
it_module(void)
{
struct net_device *dev;
int this_dev, found = 0;
{
struct net_device *dev;
int this_dev, found = 0;
@@
-538,6
+531,13
@@
init_module(void)
return -ENXIO;
}
return -ENXIO;
}
+static void cleanup_card(struct net_device *dev)
+{
+ free_irq(dev->irq, dev);
+ release_region(dev->base_addr - WD_NIC_OFFSET, WD_IO_EXTENT);
+ iounmap(ei_status.mem);
+}
+
void
cleanup_module(void)
{
void
cleanup_module(void)
{