X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fnet%2Fisa-skeleton.c;h=d6ff26af37b3e5c1dc5a60d5c979819855389e1b;hb=96b0317906690997c16c7efffbc4c0fafcd6f7f2;hp=88ae8a04fabc0532cd8e883eb9b6781b117f9839;hpb=c2d9b8387bce8b4a0fd402fab7dc1319d11a418d;p=linux-2.6-omap-h63xx.git diff --git a/drivers/net/isa-skeleton.c b/drivers/net/isa-skeleton.c index 88ae8a04fab..d6ff26af37b 100644 --- a/drivers/net/isa-skeleton.c +++ b/drivers/net/isa-skeleton.c @@ -107,7 +107,7 @@ struct net_local { static int netcard_probe1(struct net_device *dev, int ioaddr); static int net_open(struct net_device *dev); static int net_send_packet(struct sk_buff *skb, struct net_device *dev); -static irqreturn_t net_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t net_interrupt(int irq, void *dev_id); static void net_rx(struct net_device *dev); static int net_close(struct net_device *dev); static struct net_device_stats *net_get_stats(struct net_device *dev); @@ -133,8 +133,6 @@ static int __init do_netcard_probe(struct net_device *dev) int base_addr = dev->base_addr; int irq = dev->irq; - SET_MODULE_OWNER(dev); - if (base_addr > 0x1ff) /* Check a single specified location. */ return netcard_probe1(dev, base_addr); else if (base_addr != 0) /* Don't probe at all. */ @@ -149,7 +147,7 @@ static int __init do_netcard_probe(struct net_device *dev) return -ENODEV; } - + static void cleanup_card(struct net_device *dev) { #ifdef jumpered_dma @@ -194,16 +192,17 @@ static int __init netcard_probe1(struct net_device *dev, int ioaddr) static unsigned version_printed; int i; int err = -ENODEV; + DECLARE_MAC_BUF(mac); /* Grab the region so that no one else tries to probe our ioports. */ if (!request_region(ioaddr, NETCARD_IO_EXTENT, cardname)) return -EBUSY; /* - * For ethernet adaptors the first three octets of the station address + * For ethernet adaptors the first three octets of the station address * contains the manufacturer's unique code. That might be a good probe * method. Ideally you would add additional checks. - */ + */ if (inb(ioaddr + 0) != SA_ADDR0 || inb(ioaddr + 1) != SA_ADDR1 || inb(ioaddr + 2) != SA_ADDR2) @@ -219,7 +218,9 @@ static int __init netcard_probe1(struct net_device *dev, int ioaddr) /* Retrieve and print the ethernet address. */ for (i = 0; i < 6; i++) - printk(" %2.2x", dev->dev_addr[i] = inb(ioaddr + i)); + dev->dev_addr[i] = inb(ioaddr + i); + + printk("%s", print_mac(mac, dev->dev_addr)); err = -EAGAIN; #ifdef jumpered_interrupts @@ -292,7 +293,7 @@ static int __init netcard_probe1(struct net_device *dev, int ioaddr) if (i <= 0) { printk("DMA probe failed.\n"); goto out1; - } + } if (request_dma(dev->dma, cardname)) { printk("probed DMA %d allocation failed.\n", dev->dma); goto out1; @@ -310,7 +311,7 @@ static int __init netcard_probe1(struct net_device *dev, int ioaddr) dev->set_multicast_list = &set_multicast_list; dev->tx_timeout = &net_tx_timeout; - dev->watchdog_timeo = MY_TX_TIMEOUT; + dev->watchdog_timeo = MY_TX_TIMEOUT; err = register_netdev(dev); if (err) @@ -504,7 +505,7 @@ void net_tx(struct net_device *dev) * The typical workload of the driver: * Handle the network interface interrupts. */ -static irqreturn_t net_interrupt(int irq, void *dev_id, struct pt_regs * regs) +static irqreturn_t net_interrupt(int irq, void *dev_id) { struct net_device *dev = dev_id; struct net_local *np; @@ -551,7 +552,7 @@ net_rx(struct net_device *dev) do { int status = inw(ioaddr); int pkt_len = inw(ioaddr); - + if (pkt_len == 0) /* Read all the frames? */ break; /* Done for now */ @@ -566,7 +567,7 @@ net_rx(struct net_device *dev) struct sk_buff *skb; lp->stats.rx_bytes+=pkt_len; - + skb = dev_alloc_skb(pkt_len); if (skb == NULL) { printk(KERN_NOTICE "%s: Memory squeeze, dropping packet.\n", @@ -663,7 +664,7 @@ set_multicast_list(struct net_device *dev) outw(MULTICAST, ioaddr); } - else + else outw(0, ioaddr); }