diff -urN /mnt/disk/linux/drivers/net/cs89x0.c /linux/drivers/net/cs89x0.c --- /mnt/disk/linux/drivers/net/cs89x0.c Thu Nov 16 22:57:20 2000 +++ /linux/drivers/net/cs89x0.c Sun Nov 19 22:39:18 2000 @@ -260,7 +260,7 @@ SET_MODULE_OWNER(dev); if (net_debug) - printk("cs89x0:cs89x0_probe()\n"); + printk(KERN_DEBUG "cs89x0:cs89x0_probe()\n"); if (base_addr > 0x1ff) /* Check a single specified location. */ return cs89x0_probe1(dev, base_addr); @@ -319,7 +319,8 @@ { int i; - if (net_debug > 3) printk("EEPROM data from %x for %x:\n",off,len); + if (net_debug > 3) + printk(KERN_DEBUG "EEPROM data from %x for %x:\n",off,len); for (i = 0; i < len; i++) { if (wait_eeprom_ready(dev) < 0) return -1; /* Now send the EEPROM read command and EEPROM location to read */ @@ -367,7 +368,7 @@ dev->priv = kmalloc(sizeof(struct net_local), GFP_KERNEL); if (dev->priv == 0) { retval = -ENOMEM; - goto out; + goto err_out; } lp = (struct net_local *)dev->priv; memset(lp, 0, sizeof(*lp)); @@ -385,7 +386,7 @@ /* Grab the region so we can find another board if autoIRQ fails. */ if (!request_region(ioaddr, NETCARD_IO_EXTENT, dev->name)) { retval = -EBUSY; - goto out1; + goto err_out_kfree; } /* if they give us an odd I/O address, then do ONE write to @@ -396,7 +397,7 @@ if ((ioaddr & 2) != 2) if ((inw((ioaddr & ~3)+ ADD_PORT) & ADD_MASK) != ADD_SIG) { retval = -ENODEV; - goto out2; + goto err_out_release_region; } ioaddr &= ~3; outw(PP_ChipID, ioaddr + ADD_PORT); @@ -404,7 +405,7 @@ if (inw(ioaddr + DATA_PORT) != CHIP_EISA_ID_SIG) { retval = -ENODEV; - goto out2; + goto err_out_release_region; } /* Fill in the 'dev' fields. */ @@ -424,7 +425,7 @@ lp->send_cmd = TX_NOW; if (net_debug && version_printed++ == 0) - printk(version); + printk(KERN_INFO "%s", version); printk(KERN_INFO "%s: cs89%c0%s rev %c found at %#3lx ", dev->name, @@ -612,14 +613,15 @@ printk("\n"); if (net_debug) - printk("cs89x0_probe1() successful\n"); + printk(KERN_DEBUG "cs89x0_probe1() successful\n"); return 0; -out2: + +err_out_release_region: release_region(ioaddr, NETCARD_IO_EXTENT); -out1: +err_out_kfree: kfree(dev->priv); dev->priv = 0; -out: +err_out: return retval; } @@ -675,17 +677,17 @@ if (lp->use_dma) { if ((lp->isa_config & ANY_ISA_DMA) == 0) { if (net_debug > 3) - printk("set_dma_cfg(): no DMA\n"); + printk(KERN_DEBUG "set_dma_cfg(): no DMA\n"); return; } if (lp->isa_config & ISA_RxDMA) { lp->curr_rx_cfg |= RX_DMA_ONLY; if (net_debug > 3) - printk("set_dma_cfg(): RX_DMA_ONLY\n"); + printk(KERN_DEBUG "set_dma_cfg(): RX_DMA_ONLY\n"); } else { lp->curr_rx_cfg |= AUTO_RX_DMA; /* not that we support it... */ if (net_debug > 3) - printk("set_dma_cfg(): AUTO_RX_DMA\n"); + printk(KERN_DEBUG "set_dma_cfg(): AUTO_RX_DMA\n"); } } } @@ -729,7 +731,7 @@ length = bp[2] + (bp[3]<<8); bp += 4; if (net_debug > 5) { - printk( "%s: receiving DMA packet at %lx, status %x, length %x\n", + printk( KERN_DEBUG "%s: receiving DMA packet at %lx, status %x, length %x\n", dev->name, (unsigned long)bp, status, length); } if ((status & RX_OK) == 0) { @@ -741,7 +743,7 @@ skb = dev_alloc_skb(length + 2); if (skb == NULL) { if (net_debug) /* I don't think we want to do this to a stressed system */ - printk("%s: Memory squeeze, dropping packet.\n", dev->name); + printk(KERN_DEBUG "%s: Memory squeeze, dropping packet.\n", dev->name); lp->stats.rx_dropped++; /* AKPM: advance bp to the next frame */ @@ -767,7 +769,7 @@ lp->rx_dma_ptr = bp; if (net_debug > 3) { - printk( "%s: received %d byte DMA packet of type %x\n", + printk( KERN_DEBUG "%s: received %d byte DMA packet of type %x\n", dev->name, length, (skb->data[ETH_ALEN+ETH_ALEN] << 8) | skb->data[ETH_ALEN+ETH_ALEN+1]); } @@ -843,7 +845,7 @@ int timenow = jiffies; int fdx; - if (net_debug > 1) printk("%s: Attempting TP\n", dev->name); + if (net_debug > 1) printk(KERN_DEBUG "%s: Attempting TP\n", dev->name); /* If connected to another full duplex capable 10-Base-T card the link pulses seem to be lost when the auto detect bit in the LineCTL is set. @@ -938,7 +940,7 @@ /* Write the contents of the packet */ outsw(dev->base_addr + TX_FRAME_PORT,test_packet,(ETH_ZLEN+1) >>1); - if (net_debug > 1) printk("Sending test packet "); + if (net_debug > 1) printk(KERN_DEBUG "Sending test packet "); /* wait a couple of jiffies for packet to be received */ for (timenow = jiffies; jiffies - timenow < 3; ) ; @@ -956,7 +958,8 @@ { struct net_local *lp = (struct net_local *)dev->priv; - if (net_debug > 1) printk("%s: Attempting AUI\n", dev->name); + if (net_debug > 1) + printk(KERN_DEBUG "%s: Attempting AUI\n", dev->name); control_dc_dc(dev, 0); writereg(dev, PP_LineCTL, (lp->linectl &~ AUTO_AUI_10BASET) | AUI_ONLY); @@ -972,7 +975,8 @@ { struct net_local *lp = (struct net_local *)dev->priv; - if (net_debug > 1) printk("%s: Attempting BNC\n", dev->name); + if (net_debug > 1) + printk(KERN_DEBUG "%s: Attempting BNC\n", dev->name); control_dc_dc(dev, 1); writereg(dev, PP_LineCTL, (lp->linectl &~ AUTO_AUI_10BASET) | AUI_ONLY); @@ -1081,7 +1085,7 @@ goto release_irq; } if (net_debug > 1) { - printk( "%s: dma %lx %lx\n", + printk( KERN_DEBUG "%s: dma %lx %lx\n", dev->name, (unsigned long)lp->dma_buff, (unsigned long)virt_to_bus(lp->dma_buff)); @@ -1235,7 +1239,7 @@ ); netif_start_queue(dev); if (net_debug > 1) - printk("cs89x0: net_open() succeeded\n"); + printk(KERN_DEBUG "cs89x0: net_open() succeeded\n"); return 0; bad_out: return ret; @@ -1245,7 +1249,7 @@ { /* If we get here, some higher level has decided we are broken. There should really be a "kick me" function call instead. */ - if (net_debug > 0) printk("%s: transmit timed out, %s?\n", dev->name, + if (net_debug > 0) printk(KERN_DEBUG "%s: transmit timed out, %s?\n", dev->name, tx_done(dev) ? "IRQ conflict ?" : "network cable problem"); /* Try to restart the adaptor. */ netif_wake_queue(dev); @@ -1256,7 +1260,7 @@ struct net_local *lp = (struct net_local *)dev->priv; if (net_debug > 3) { - printk("%s: sent %d byte packet of type %x\n", + printk( KERN_DEBUG "%s: sent %d byte packet of type %x\n", dev->name, skb->len, (skb->data[ETH_ALEN+ETH_ALEN] << 8) | skb->data[ETH_ALEN+ETH_ALEN+1]); } @@ -1280,7 +1284,8 @@ */ spin_unlock_irq(&lp->lock); - if (net_debug) printk("cs89x0: Tx buffer not free!\n"); + if (net_debug) + printk(KERN_DEBUG "cs89x0: Tx buffer not free!\n"); return 1; } /* Write the contents of the packet */ @@ -1323,7 +1328,8 @@ faster than you can read them off, you're screwed. Hasta la vista, baby! */ while ((status = readword(dev, ISQ_PORT))) { - if (net_debug > 4)printk("%s: event=%04x\n", dev->name, status); + if (net_debug > 4) + printk(KERN_DEBUG "%s: event=%04x\n", dev->name, status); switch(status & ISQ_EVENT_MASK) { case ISQ_RECEIVER_EVENT: /* Got a packet(s). */ @@ -1354,7 +1360,8 @@ netif_wake_queue(dev); /* Inform upper layers. */ } if (status & TX_UNDERRUN) { - if (net_debug > 0) printk("%s: transmit underrun\n", dev->name); + if (net_debug > 0) + printk(KERN_DEBUG "%s: transmit underrun\n", dev->name); lp->send_underrun++; if (lp->send_underrun == 3) lp->send_cmd = TX_AFTER_381; else if (lp->send_underrun == 6) lp->send_cmd = TX_AFTER_ALL; @@ -1370,14 +1377,14 @@ int count = readreg(dev, PP_DmaFrameCnt); while(count) { if (net_debug > 5) - printk("%s: receiving %d DMA frames\n", dev->name, count); + printk(KERN_DEBUG "%s: receiving %d DMA frames\n", dev->name, count); if (net_debug > 2 && count >1) - printk("%s: receiving %d DMA frames\n", dev->name, count); + printk(KERN_DEBUG "%s: receiving %d DMA frames\n", dev->name, count); dma_rx(dev); if (--count == 0) count = readreg(dev, PP_DmaFrameCnt); if (net_debug > 2 && count > 0) - printk("%s: continuing with %d DMA frames\n", dev->name, count); + printk(KERN_DEBUG "%s: continuing with %d DMA frames\n", dev->name, count); } } #endif @@ -1439,7 +1446,7 @@ skb->data[length-1] = inw(ioaddr + RX_FRAME_PORT); if (net_debug > 3) { - printk( "%s: received %d byte packet of type %x\n", + printk( KERN_DEBUG "%s: received %d byte packet of type %x\n", dev->name, length, (skb->data[ETH_ALEN+ETH_ALEN] << 8) | skb->data[ETH_ALEN+ETH_ALEN+1]); } @@ -1539,7 +1546,7 @@ if (netif_running(dev)) return -EBUSY; if (net_debug) { - printk("%s: Setting MAC address to ", dev->name); + printk(KERN_DEBUG "%s: Setting MAC address to ", dev->name); for (i = 0; i < 6; i++) printk(" %2.2x", dev->dev_addr[i] = ((unsigned char *)addr)[i]); printk(".\n");