diff -urN /mnt/disk/linux/drivers/net/es3210.c /linux/drivers/net/es3210.c --- /mnt/disk/linux/drivers/net/es3210.c Thu Nov 16 22:57:24 2000 +++ /linux/drivers/net/es3210.c Sun Nov 19 22:48:57 2000 @@ -135,7 +135,7 @@ if (!EISA_bus) { #if ES_DEBUG & ES_D_PROBE - printk("es3210.c: Not EISA bus. Not probing high ports.\n"); + printk(KERN_DEBUG "es3210.c: Not EISA bus. Not probing high ports.\n"); #endif return -ENXIO; } @@ -153,12 +153,13 @@ int i, retval; unsigned long eisa_id; - if (!request_region(ioaddr + ES_SA_PROM, ES_IO_EXTENT, "es3210")) - return -ENODEV; + if (!request_region(ioaddr + ES_SA_PROM, ES_IO_EXTENT, dev->name)) + return -EBUSY; #if ES_DEBUG & ES_D_PROBE - printk("es3210.c: probe at %#x, ID %#8x\n", ioaddr, inl(ioaddr + ES_ID_PORT)); - printk("es3210.c: config regs: %#x %#x %#x %#x %#x %#x\n", + printk(KERN_DEBUG "es3210.c: probe at %#x, ID %#8x\n", + ioaddr, inl(ioaddr + ES_ID_PORT)); + printk(KERN_DEBUG "es3210.c: config regs: %#x %#x %#x %#x %#x %#x\n", inb(ioaddr + ES_CFG1), inb(ioaddr + ES_CFG2), inb(ioaddr + ES_CFG3), inb(ioaddr + ES_CFG4), inb(ioaddr + ES_CFG5), inb(ioaddr + ES_CFG6)); #endif @@ -168,22 +169,22 @@ eisa_id = inl(ioaddr + ES_ID_PORT); if ((eisa_id != ES_EISA_ID1) && (eisa_id != ES_EISA_ID2)) { retval = -ENODEV; - goto out; + goto err_out; } /* Check the Racal vendor ID as well. */ if (inb(ioaddr + ES_SA_PROM + 0) != ES_ADDR0 || inb(ioaddr + ES_SA_PROM + 1) != ES_ADDR1 || inb(ioaddr + ES_SA_PROM + 2) != ES_ADDR2 ) { - printk("es3210.c: card not found"); + printk(KERN_WARNING "es3210.c: card not found"); for(i = 0; i < ETHER_ADDR_LEN; i++) printk(" %02x", inb(ioaddr + ES_SA_PROM + i)); printk(" (invalid prefix).\n"); retval = -ENODEV; - goto out; + goto err_out; } - printk("es3210.c: ES3210 rev. %ld at %#x, node", eisa_id>>24, ioaddr); + printk(KERN_INFO "es3210.c: ES3210 rev. %ld at %#x, node", eisa_id>>24, ioaddr); for(i = 0; i < ETHER_ADDR_LEN; i++) printk(" %02x", (dev->dev_addr[i] = inb(ioaddr + ES_SA_PROM + i))); @@ -201,7 +202,7 @@ } printk(" using IRQ %d", dev->irq); #if ES_DEBUG & ES_D_PROBE - printk("es3210.c: hi_irq %#x, lo_irq %#x, dev->irq = %d\n", + printk(KERN_DEBUG "es3210.c: hi_irq %#x, lo_irq %#x, dev->irq = %d\n", hi_irq, lo_irq, dev->irq); #endif } else { @@ -210,10 +211,10 @@ printk(" assigning IRQ %d", dev->irq); } - if (request_irq(dev->irq, ei_interrupt, 0, "es3210", dev)) { + if (request_irq(dev->irq, ei_interrupt, 0, dev->name, dev)) { printk (" unable to get IRQ %d.\n", dev->irq); retval = -EAGAIN; - goto out; + goto err_out; } if (dev->mem_start == 0) { @@ -223,7 +224,7 @@ if (mem_enabled != 0x80) { printk(" shared mem disabled - giving up\n"); retval = -ENXIO; - goto out1; + goto err_out_free_irq; } dev->mem_start = 0xC0000 + mem_bits*0x4000; printk(" using "); @@ -241,12 +242,12 @@ if (ethdev_init(dev)) { printk (" unable to allocate memory for dev->priv.\n"); retval = -ENOMEM; - goto out1; + goto err_out_free_irq; } #if ES_DEBUG & ES_D_PROBE if (inb(ioaddr + ES_CFG5)) - printk("es3210: Warning - DMA channel enabled, but not used here.\n"); + printk(KERN_DEBUG "es3210: Warning - DMA channel enabled, but not used here.\n"); #endif /* Note, point at the 8390, and not the card... */ dev->base_addr = ioaddr + ES_NIC_OFFSET; @@ -258,7 +259,7 @@ ei_status.word16 = 1; if (ei_debug > 0) - printk(version); + printk(KERN_INFO "%s", version); ei_status.reset_8390 = &es_reset_8390; ei_status.block_input = &es_block_input; @@ -269,9 +270,10 @@ dev->stop = &es_close; NS8390_init(dev, 0); return 0; -out1: + +err_out_free_irq: free_irq(dev->irq, dev); -out: +err_out: release_region(ioaddr + ES_SA_PROM, ES_IO_EXTENT); return retval; } @@ -287,7 +289,8 @@ unsigned long end; outb(0x04, ioaddr + ES_RESET_PORT); - if (ei_debug > 1) printk("%s: resetting the ES3210...", dev->name); + if (ei_debug > 1) + printk(KERN_DEBUG "%s: resetting the ES3210...", dev->name); end = jiffies + 2*HZ/100; while ((signed)(end - jiffies) > 0) continue; @@ -367,7 +370,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);