X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fnet%2Fatarilance.c;h=7e37ac86a69ab9660f44ddc7ab1687d5d0d478a1;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=e01b6a78ec6330115ce08a104498aeb3dbf91194;hpb=76828883507a47dae78837ab5dec5a5b4513c667;p=linux-2.6.git diff --git a/drivers/net/atarilance.c b/drivers/net/atarilance.c index e01b6a78e..7e37ac86a 100644 --- a/drivers/net/atarilance.c +++ b/drivers/net/atarilance.c @@ -78,7 +78,7 @@ static int lance_debug = LANCE_DEBUG; #else static int lance_debug = 1; #endif -MODULE_PARM(lance_debug, "i"); +module_param(lance_debug, int, 0); MODULE_PARM_DESC(lance_debug, "atarilance debug level (0-3)"); MODULE_LICENSE("GPL"); @@ -344,7 +344,7 @@ static unsigned long lance_probe1( struct net_device *dev, struct lance_addr static int lance_open( struct net_device *dev ); static void lance_init_ring( struct net_device *dev ); static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev ); -static irqreturn_t lance_interrupt( int irq, void *dev_id, struct pt_regs *fp ); +static irqreturn_t lance_interrupt( int irq, void *dev_id ); static int lance_rx( struct net_device *dev ); static int lance_close( struct net_device *dev ); static struct net_device_stats *lance_get_stats( struct net_device *dev ); @@ -356,7 +356,7 @@ static void lance_tx_timeout (struct net_device *dev); - + static void *slow_memcpy( void *dst, const void *src, size_t len ) @@ -549,7 +549,7 @@ static unsigned long __init lance_probe1( struct net_device *dev, memaddr == (unsigned short *)0xffe00000) { /* PAMs card and Riebl on ST use level 5 autovector */ if (request_irq(IRQ_AUTO_5, lance_interrupt, IRQ_TYPE_PRIO, - "PAM/Riebl-ST Ethernet", dev)) { + "PAM/Riebl-ST Ethernet", dev)) { printk( "Lance: request for irq %d failed\n", IRQ_AUTO_5 ); return( 0 ); } @@ -639,7 +639,7 @@ static unsigned long __init lance_probe1( struct net_device *dev, /* XXX MSch */ dev->tx_timeout = lance_tx_timeout; dev->watchdog_timeo = TX_TIMEOUT; - + #if 0 dev->start = 0; @@ -650,7 +650,7 @@ static unsigned long __init lance_probe1( struct net_device *dev, return( 1 ); } - + static int lance_open( struct net_device *dev ) { struct lance_private *lp = (struct lance_private *)dev->priv; @@ -744,7 +744,7 @@ static void lance_tx_timeout (struct net_device *dev) { struct lance_private *lp = (struct lance_private *) dev->priv; struct lance_ioreg *IO = lp->iobase; - + AREG = CSR0; DPRINTK( 1, ( "%s: transmit timed out, status %04x, resetting.\n", dev->name, DREG )); @@ -772,7 +772,7 @@ static void lance_tx_timeout (struct net_device *dev) -MEM->tx_head[i].length, MEM->tx_head[i].misc )); } -#endif +#endif /* XXX MSch: maybe purge/reinit ring here */ /* lance_restart, essentially */ lance_init_ring(dev); @@ -802,13 +802,12 @@ static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev ) /* PAM-Card has a bug: Can only send packets with even number of bytes! */ else if (lp->cardtype == PAM_CARD && (len & 1)) ++len; - + if (len > skb->len) { - skb = skb_padto(skb, len); - if (skb == NULL) + if (skb_padto(skb, len)) return 0; } - + netif_stop_queue (dev); /* Fill in a Tx ring entry */ @@ -867,7 +866,7 @@ static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev ) /* The LANCE interrupt handler. */ -static irqreturn_t lance_interrupt( int irq, void *dev_id, struct pt_regs *fp) +static irqreturn_t lance_interrupt( int irq, void *dev_id ) { struct net_device *dev = dev_id; struct lance_private *lp; @@ -1122,7 +1121,7 @@ static void set_multicast_list( struct net_device *dev ) if (dev->flags & IFF_PROMISC) { /* Log any net taps. */ - DPRINTK( 1, ( "%s: Promiscuous mode enabled.\n", dev->name )); + DPRINTK( 2, ( "%s: Promiscuous mode enabled.\n", dev->name )); REGA( CSR15 ) = 0x8000; /* Set promiscuous mode */ } else { short multicast_table[4]; @@ -1176,11 +1175,11 @@ static int lance_set_mac_address( struct net_device *dev, void *addr ) return( 0 ); } - + #ifdef MODULE static struct net_device *atarilance_dev; -int init_module(void) +int __init init_module(void) { atarilance_dev = atarilance_probe(-1); if (IS_ERR(atarilance_dev)) @@ -1188,7 +1187,7 @@ int init_module(void) return 0; } -void cleanup_module(void) +void __exit cleanup_module(void) { unregister_netdev(atarilance_dev); free_irq(atarilance_dev->irq, atarilance_dev); @@ -1196,7 +1195,7 @@ void cleanup_module(void) } #endif /* MODULE */ - + /* * Local variables: