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
Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git]
/
drivers
/
net
/
3c527.c
diff --git
a/drivers/net/3c527.c
b/drivers/net/3c527.c
index
a3b67ae
..
03c0f71
100644
(file)
--- a/
drivers/net/3c527.c
+++ b/
drivers/net/3c527.c
@@
-102,11
+102,11
@@
DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " Richard Procter <rnp@paradise.net.
#include <linux/wait.h>
#include <linux/ethtool.h>
#include <linux/completion.h>
#include <linux/wait.h>
#include <linux/ethtool.h>
#include <linux/completion.h>
+#include <linux/bitops.h>
#include <asm/semaphore.h>
#include <asm/uaccess.h>
#include <asm/system.h>
#include <asm/semaphore.h>
#include <asm/uaccess.h>
#include <asm/system.h>
-#include <asm/bitops.h>
#include <asm/io.h>
#include <asm/dma.h>
#include <asm/io.h>
#include <asm/dma.h>
@@
-197,7
+197,7
@@
struct mca_adapters_t {
char *name;
};
char *name;
};
-const struct mca_adapters_t mc32_adapters[] = {
+
static
const struct mca_adapters_t mc32_adapters[] = {
{ 0x0041, "3COM EtherLink MC/32" },
{ 0x8EF5, "IBM High Performance Lan Adapter" },
{ 0x0000, NULL }
{ 0x0041, "3COM EtherLink MC/32" },
{ 0x8EF5, "IBM High Performance Lan Adapter" },
{ 0x0000, NULL }
@@
-435,10
+435,10
@@
static int __init mc32_probe1(struct net_device *dev, int slot)
* Grab the IRQ
*/
* Grab the IRQ
*/
- err = request_irq(dev->irq, &mc32_interrupt,
SA_SHIRQ | SA_SAMPLE_RANDOM, dev->name
, dev);
+ err = request_irq(dev->irq, &mc32_interrupt,
IRQF_SHARED | IRQF_SAMPLE_RANDOM, DRV_NAME
, dev);
if (err) {
release_region(dev->base_addr, MC32_IO_EXTENT);
if (err) {
release_region(dev->base_addr, MC32_IO_EXTENT);
- printk(KERN_ERR "%s: unable to get IRQ %d.\n",
dev->name
, dev->irq);
+ printk(KERN_ERR "%s: unable to get IRQ %d.\n",
DRV_NAME
, dev->irq);
goto err_exit_ports;
}
goto err_exit_ports;
}
@@
-751,18
+751,15
@@
static int mc32_load_rx_ring(struct net_device *dev)
rx_base=lp->rx_chain;
rx_base=lp->rx_chain;
- for(i=0; i<RX_RING_LEN; i++)
- {
+ for(i=0; i<RX_RING_LEN; i++) {
lp->rx_ring[i].skb=alloc_skb(1532, GFP_KERNEL);
lp->rx_ring[i].skb=alloc_skb(1532, GFP_KERNEL);
- skb_reserve(lp->rx_ring[i].skb, 18);
-
- if(lp->rx_ring[i].skb==NULL)
- {
- for(;i>=0;i--)
+ if (lp->rx_ring[i].skb==NULL) {
+ for (;i>=0;i--)
kfree_skb(lp->rx_ring[i].skb);
return -ENOBUFS;
}
kfree_skb(lp->rx_ring[i].skb);
return -ENOBUFS;
}
-
+ skb_reserve(lp->rx_ring[i].skb, 18);
+
p=isa_bus_to_virt(lp->base+rx_base);
p->control=0;
p=isa_bus_to_virt(lp->base+rx_base);
p->control=0;
@@
-1034,8
+1031,7
@@
static int mc32_send_packet(struct sk_buff *skb, struct net_device *dev)
return 1;
}
return 1;
}
- skb = skb_padto(skb, ETH_ZLEN);
- if (skb == NULL) {
+ if (skb_padto(skb, ETH_ZLEN)) {
netif_wake_queue(dev);
return 0;
}
netif_wake_queue(dev);
return 0;
}
@@
-1649,7
+1645,7
@@
static struct net_device *this_device;
* insmod multiple modules for now but it's a hack.
*/
* insmod multiple modules for now but it's a hack.
*/
-int init_module(void)
+int
__init
init_module(void)
{
this_device = mc32_probe(-1);
if (IS_ERR(this_device))
{
this_device = mc32_probe(-1);
if (IS_ERR(this_device))