diff -urN /mnt/disk/linux/drivers/net/ne3210.c /linux/drivers/net/ne3210.c --- /mnt/disk/linux/drivers/net/ne3210.c Thu Nov 16 22:57:26 2000 +++ /linux/drivers/net/ne3210.c Sun Nov 19 22:21:49 2000 @@ -106,7 +106,7 @@ if (!EISA_bus) { #if NE3210_DEBUG & NE3210_D_PROBE - printk("ne3210-debug: Not an EISA bus. Not probing high ports.\n"); + printk(KERN_DEBUG "ne3210-debug: Not an EISA bus. Not probing high ports.\n"); #endif return -ENXIO; } @@ -130,12 +130,13 @@ if (inb_p(ioaddr + NE3210_ID_PORT) == 0xff) { retval = -ENODEV; - goto out; + goto err_out; } #if NE3210_DEBUG & NE3210_D_PROBE - printk("ne3210-debug: probe at %#x, ID %#8x\n", ioaddr, inl(ioaddr + NE3210_ID_PORT)); - printk("ne3210-debug: config regs: %#x %#x\n", + printk(KERN_DEBUG "ne3210-debug: probe at %#x, ID %#8x\n", + ioaddr, inl(ioaddr + NE3210_ID_PORT)); + printk(KERN_DEBUG "ne3210-debug: config regs: %#x %#x\n", inb(ioaddr + NE3210_CFG1), inb(ioaddr + NE3210_CFG2)); #endif @@ -144,7 +145,7 @@ eisa_id = inl(ioaddr + NE3210_ID_PORT); if (eisa_id != NE3210_ID) { retval = -ENODEV; - goto out; + goto err_out; } @@ -153,23 +154,23 @@ if (inb(ioaddr + NE3210_SA_PROM + 0) != NE3210_ADDR0 || inb(ioaddr + NE3210_SA_PROM + 1) != NE3210_ADDR1 || inb(ioaddr + NE3210_SA_PROM + 2) != NE3210_ADDR2 ) { - printk("ne3210.c: card not found"); + printk(KERN_WARNING "ne3210.c: card not found"); for(i = 0; i < ETHER_ADDR_LEN; i++) printk(" %02x", inb(ioaddr + NE3210_SA_PROM + i)); printk(" (invalid prefix).\n"); retval = -ENODEV; - goto out; + goto err_out; } #endif /* Allocate dev->priv and fill in 8390 specific dev fields. */ if (ethdev_init(dev)) { - printk ("ne3210.c: unable to allocate memory for dev->priv!\n"); + printk (KERN_ERR "ne3210.c: unable to allocate memory for dev->priv!\n"); retval = -ENOMEM; - goto out; + goto err_out; } - printk("ne3210.c: NE3210 in EISA slot %d, media: %s, addr:", + printk(KERN_INFO "ne3210.c: NE3210 in EISA slot %d, media: %s, addr:", ioaddr/0x1000, ifmap[inb(ioaddr + NE3210_CFG2) >> 6]); for(i = 0; i < ETHER_ADDR_LEN; i++) printk(" %02x", (dev->dev_addr[i] = inb(ioaddr + NE3210_SA_PROM + i))); @@ -190,7 +191,7 @@ retval = request_irq(dev->irq, ei_interrupt, 0, dev->name, dev); if (retval) { printk (" unable to get IRQ %d.\n", dev->irq); - goto out1; + goto err_out_kfree; } if (dev->mem_start == 0) { @@ -217,7 +218,7 @@ printk(KERN_CRIT "ne3210.c: or to an address above 0x%lx.\n", virt_to_bus(high_memory)); printk(KERN_CRIT "ne3210.c: Driver NOT installed.\n"); retval = -EINVAL; - goto out2; + goto err_out_free_irq; } dev->mem_start = (unsigned long)ioremap(dev->mem_start, NE3210_STOP_PG*0x100); if (dev->mem_start == 0) { @@ -225,10 +226,10 @@ printk(KERN_ERR "ne3210.c: Try using EISA SCU to set memory below 1MB.\n"); printk(KERN_ERR "ne3210.c: Driver NOT installed.\n"); retval = -EAGAIN; - goto out2; + goto err_out_free_irq; } ei_status.reg0 = 1; /* Use as remap flag */ - printk("ne3210.c: remapped %dkB card memory to virtual address %#lx\n", + printk(KERN_INFO "ne3210.c: remapped %dkB card memory to virtual address %#lx\n", NE3210_STOP_PG/4, dev->mem_start); } @@ -246,7 +247,7 @@ ei_status.word16 = 1; if (ei_debug > 0) - printk(version); + printk(KERN_INFO "%s", version); ei_status.reset_8390 = &ne3210_reset_8390; ei_status.block_input = &ne3210_block_input; @@ -257,12 +258,13 @@ dev->stop = &ne3210_close; NS8390_init(dev, 0); return 0; -out2: + +err_out_free_irq: free_irq(dev->irq, dev); -out1: +err_out_kfree: kfree(dev->priv); dev->priv = NULL; -out: +err_out: release_region(ioaddr, NE3210_IO_EXTENT); return retval; } @@ -276,7 +278,7 @@ unsigned short ioaddr = dev->base_addr; outb(0x04, ioaddr + NE3210_RESET_PORT); - if (ei_debug > 1) printk("%s: resetting the NE3210...", dev->name); + if (ei_debug > 1) printk(KERN_DEBUG "%s: resetting the NE3210...", dev->name); mdelay(2); @@ -353,7 +355,7 @@ { if (ei_debug > 1) - printk("%s: Shutting down ethercard.\n", dev->name); + printk(KERN_DEBUG "%s: Shutting down ethercard.\n", dev->name); ei_close(dev); MOD_DEC_USE_COUNT;