diff options
author | Alexander Beregalov <a.beregalov@gmail.com> | 2009-05-26 08:35:25 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-26 23:35:02 -0400 |
commit | 646cdb32831eebe8c2f742c293d0d266326854d9 (patch) | |
tree | 43b2460ea3704f2b6e1ff0c53cc592ecaa4d3747 /drivers/net | |
parent | d3f65f7c3cf11b036bbc01f22ac5c958570e724c (diff) |
3c50x: convert printk() to pr_<foo>()
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/3c501.c | 65 | ||||
-rw-r--r-- | drivers/net/3c503.c | 36 | ||||
-rw-r--r-- | drivers/net/3c505.c | 215 | ||||
-rw-r--r-- | drivers/net/3c507.c | 55 | ||||
-rw-r--r-- | drivers/net/3c509.c | 64 |
5 files changed, 216 insertions, 219 deletions
diff --git a/drivers/net/3c501.c b/drivers/net/3c501.c index 1c5344aa57cc..367bec63620c 100644 --- a/drivers/net/3c501.c +++ b/drivers/net/3c501.c | |||
@@ -281,7 +281,7 @@ static int __init el1_probe1(struct net_device *dev, int ioaddr) | |||
281 | autoirq = probe_irq_off(irq_mask); | 281 | autoirq = probe_irq_off(irq_mask); |
282 | 282 | ||
283 | if (autoirq == 0) { | 283 | if (autoirq == 0) { |
284 | printk(KERN_WARNING "%s probe at %#x failed to detect IRQ line.\n", | 284 | pr_warning("%s probe at %#x failed to detect IRQ line.\n", |
285 | mname, ioaddr); | 285 | mname, ioaddr); |
286 | release_region(ioaddr, EL1_IO_EXTENT); | 286 | release_region(ioaddr, EL1_IO_EXTENT); |
287 | return -EAGAIN; | 287 | return -EAGAIN; |
@@ -297,16 +297,16 @@ static int __init el1_probe1(struct net_device *dev, int ioaddr) | |||
297 | if (autoirq) | 297 | if (autoirq) |
298 | dev->irq = autoirq; | 298 | dev->irq = autoirq; |
299 | 299 | ||
300 | printk(KERN_INFO "%s: %s EtherLink at %#lx, using %sIRQ %d.\n", | 300 | pr_info("%s: %s EtherLink at %#lx, using %sIRQ %d.\n", |
301 | dev->name, mname, dev->base_addr, | 301 | dev->name, mname, dev->base_addr, |
302 | autoirq ? "auto":"assigned ", dev->irq); | 302 | autoirq ? "auto":"assigned ", dev->irq); |
303 | 303 | ||
304 | #ifdef CONFIG_IP_MULTICAST | 304 | #ifdef CONFIG_IP_MULTICAST |
305 | printk(KERN_WARNING "WARNING: Use of the 3c501 in a multicast kernel is NOT recommended.\n"); | 305 | pr_warning("WARNING: Use of the 3c501 in a multicast kernel is NOT recommended.\n"); |
306 | #endif | 306 | #endif |
307 | 307 | ||
308 | if (el_debug) | 308 | if (el_debug) |
309 | printk(KERN_DEBUG "%s", version); | 309 | pr_debug("%s", version); |
310 | 310 | ||
311 | lp = netdev_priv(dev); | 311 | lp = netdev_priv(dev); |
312 | memset(lp, 0, sizeof(struct net_local)); | 312 | memset(lp, 0, sizeof(struct net_local)); |
@@ -343,7 +343,7 @@ static int el_open(struct net_device *dev) | |||
343 | unsigned long flags; | 343 | unsigned long flags; |
344 | 344 | ||
345 | if (el_debug > 2) | 345 | if (el_debug > 2) |
346 | printk(KERN_DEBUG "%s: Doing el_open()...", dev->name); | 346 | pr_debug("%s: Doing el_open()...\n", dev->name); |
347 | 347 | ||
348 | retval = request_irq(dev->irq, &el_interrupt, 0, dev->name, dev); | 348 | retval = request_irq(dev->irq, &el_interrupt, 0, dev->name, dev); |
349 | if (retval) | 349 | if (retval) |
@@ -374,7 +374,7 @@ static void el_timeout(struct net_device *dev) | |||
374 | int ioaddr = dev->base_addr; | 374 | int ioaddr = dev->base_addr; |
375 | 375 | ||
376 | if (el_debug) | 376 | if (el_debug) |
377 | printk(KERN_DEBUG "%s: transmit timed out, txsr %#2x axsr=%02x rxsr=%02x.\n", | 377 | pr_debug("%s: transmit timed out, txsr %#2x axsr=%02x rxsr=%02x.\n", |
378 | dev->name, inb(TX_STATUS), | 378 | dev->name, inb(TX_STATUS), |
379 | inb(AX_STATUS), inb(RX_STATUS)); | 379 | inb(AX_STATUS), inb(RX_STATUS)); |
380 | dev->stats.tx_errors++; | 380 | dev->stats.tx_errors++; |
@@ -483,14 +483,13 @@ static int el_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
483 | lp->loading = 0; | 483 | lp->loading = 0; |
484 | dev->trans_start = jiffies; | 484 | dev->trans_start = jiffies; |
485 | if (el_debug > 2) | 485 | if (el_debug > 2) |
486 | printk(KERN_DEBUG " queued xmit.\n"); | 486 | pr_debug(" queued xmit.\n"); |
487 | dev_kfree_skb(skb); | 487 | dev_kfree_skb(skb); |
488 | return 0; | 488 | return 0; |
489 | } | 489 | } |
490 | /* A receive upset our load, despite our best efforts */ | 490 | /* A receive upset our load, despite our best efforts */ |
491 | if (el_debug > 2) | 491 | if (el_debug > 2) |
492 | printk(KERN_DEBUG "%s: burped during tx load.\n", | 492 | pr_debug("%s: burped during tx load.\n", dev->name); |
493 | dev->name); | ||
494 | spin_lock_irqsave(&lp->lock, flags); | 493 | spin_lock_irqsave(&lp->lock, flags); |
495 | } while (1); | 494 | } while (1); |
496 | } | 495 | } |
@@ -540,11 +539,10 @@ static irqreturn_t el_interrupt(int irq, void *dev_id) | |||
540 | */ | 539 | */ |
541 | 540 | ||
542 | if (el_debug > 3) | 541 | if (el_debug > 3) |
543 | printk(KERN_DEBUG "%s: el_interrupt() aux=%#02x", | 542 | pr_debug("%s: el_interrupt() aux=%#02x\n", dev->name, axsr); |
544 | dev->name, axsr); | ||
545 | 543 | ||
546 | if (lp->loading == 1 && !lp->txing) | 544 | if (lp->loading == 1 && !lp->txing) |
547 | printk(KERN_WARNING "%s: Inconsistent state loading while not in tx\n", | 545 | pr_warning("%s: Inconsistent state loading while not in tx\n", |
548 | dev->name); | 546 | dev->name); |
549 | 547 | ||
550 | if (lp->txing) { | 548 | if (lp->txing) { |
@@ -555,19 +553,17 @@ static irqreturn_t el_interrupt(int irq, void *dev_id) | |||
555 | int txsr = inb(TX_STATUS); | 553 | int txsr = inb(TX_STATUS); |
556 | 554 | ||
557 | if (lp->loading == 1) { | 555 | if (lp->loading == 1) { |
558 | if (el_debug > 2) { | 556 | if (el_debug > 2) |
559 | printk(KERN_DEBUG "%s: Interrupt while loading [", | 557 | pr_debug("%s: Interrupt while loading [txsr=%02x gp=%04x rp=%04x]\n", |
560 | dev->name); | 558 | dev->name, txsr, inw(GP_LOW), inw(RX_LOW)); |
561 | printk(" txsr=%02x gp=%04x rp=%04x]\n", | 559 | |
562 | txsr, inw(GP_LOW), inw(RX_LOW)); | ||
563 | } | ||
564 | /* Force a reload */ | 560 | /* Force a reload */ |
565 | lp->loading = 2; | 561 | lp->loading = 2; |
566 | spin_unlock(&lp->lock); | 562 | spin_unlock(&lp->lock); |
567 | goto out; | 563 | goto out; |
568 | } | 564 | } |
569 | if (el_debug > 6) | 565 | if (el_debug > 6) |
570 | printk(KERN_DEBUG " txsr=%02x gp=%04x rp=%04x", | 566 | pr_debug("%s: txsr=%02x gp=%04x rp=%04x\n", dev->name, |
571 | txsr, inw(GP_LOW), inw(RX_LOW)); | 567 | txsr, inw(GP_LOW), inw(RX_LOW)); |
572 | 568 | ||
573 | if ((axsr & 0x80) && (txsr & TX_READY) == 0) { | 569 | if ((axsr & 0x80) && (txsr & TX_READY) == 0) { |
@@ -576,7 +572,7 @@ static irqreturn_t el_interrupt(int irq, void *dev_id) | |||
576 | * on trying or reset immediately ? | 572 | * on trying or reset immediately ? |
577 | */ | 573 | */ |
578 | if (el_debug > 1) | 574 | if (el_debug > 1) |
579 | printk(KERN_DEBUG "%s: Unusual interrupt during Tx, txsr=%02x axsr=%02x gp=%03x rp=%03x.\n", | 575 | pr_debug("%s: Unusual interrupt during Tx, txsr=%02x axsr=%02x gp=%03x rp=%03x.\n", |
580 | dev->name, txsr, axsr, | 576 | dev->name, txsr, axsr, |
581 | inw(ioaddr + EL1_DATAPTR), | 577 | inw(ioaddr + EL1_DATAPTR), |
582 | inw(ioaddr + EL1_RXPTR)); | 578 | inw(ioaddr + EL1_RXPTR)); |
@@ -587,7 +583,7 @@ static irqreturn_t el_interrupt(int irq, void *dev_id) | |||
587 | * Timed out | 583 | * Timed out |
588 | */ | 584 | */ |
589 | if (el_debug) | 585 | if (el_debug) |
590 | printk(KERN_DEBUG "%s: Transmit failed 16 times, Ethernet jammed?\n", dev->name); | 586 | pr_debug("%s: Transmit failed 16 times, Ethernet jammed?\n", dev->name); |
591 | outb(AX_SYS, AX_CMD); | 587 | outb(AX_SYS, AX_CMD); |
592 | lp->txing = 0; | 588 | lp->txing = 0; |
593 | dev->stats.tx_aborted_errors++; | 589 | dev->stats.tx_aborted_errors++; |
@@ -598,7 +594,7 @@ static irqreturn_t el_interrupt(int irq, void *dev_id) | |||
598 | */ | 594 | */ |
599 | 595 | ||
600 | if (el_debug > 6) | 596 | if (el_debug > 6) |
601 | printk(KERN_DEBUG " retransmitting after a collision.\n"); | 597 | pr_debug("%s: retransmitting after a collision.\n", dev->name); |
602 | /* | 598 | /* |
603 | * Poor little chip can't reset its own start | 599 | * Poor little chip can't reset its own start |
604 | * pointer | 600 | * pointer |
@@ -616,9 +612,8 @@ static irqreturn_t el_interrupt(int irq, void *dev_id) | |||
616 | */ | 612 | */ |
617 | dev->stats.tx_packets++; | 613 | dev->stats.tx_packets++; |
618 | if (el_debug > 6) | 614 | if (el_debug > 6) |
619 | printk(KERN_DEBUG " Tx succeeded %s\n", | 615 | pr_debug("%s: Tx succeeded %s\n", dev->name, |
620 | (txsr & TX_RDY) ? "." : | 616 | (txsr & TX_RDY) ? "." : "but tx is busy!"); |
621 | "but tx is busy!"); | ||
622 | /* | 617 | /* |
623 | * This is safe the interrupt is atomic WRT itself. | 618 | * This is safe the interrupt is atomic WRT itself. |
624 | */ | 619 | */ |
@@ -633,7 +628,8 @@ static irqreturn_t el_interrupt(int irq, void *dev_id) | |||
633 | 628 | ||
634 | int rxsr = inb(RX_STATUS); | 629 | int rxsr = inb(RX_STATUS); |
635 | if (el_debug > 5) | 630 | if (el_debug > 5) |
636 | printk(KERN_DEBUG " rxsr=%02x txsr=%02x rp=%04x", rxsr, inb(TX_STATUS), inw(RX_LOW)); | 631 | pr_debug("%s: rxsr=%02x txsr=%02x rp=%04x\n", |
632 | dev->name, rxsr, inb(TX_STATUS), inw(RX_LOW)); | ||
637 | /* | 633 | /* |
638 | * Just reading rx_status fixes most errors. | 634 | * Just reading rx_status fixes most errors. |
639 | */ | 635 | */ |
@@ -643,7 +639,7 @@ static irqreturn_t el_interrupt(int irq, void *dev_id) | |||
643 | /* Handled to avoid board lock-up. */ | 639 | /* Handled to avoid board lock-up. */ |
644 | dev->stats.rx_length_errors++; | 640 | dev->stats.rx_length_errors++; |
645 | if (el_debug > 5) | 641 | if (el_debug > 5) |
646 | printk(KERN_DEBUG " runt.\n"); | 642 | pr_debug("%s: runt.\n", dev->name); |
647 | } else if (rxsr & RX_GOOD) { | 643 | } else if (rxsr & RX_GOOD) { |
648 | /* | 644 | /* |
649 | * Receive worked. | 645 | * Receive worked. |
@@ -654,12 +650,10 @@ static irqreturn_t el_interrupt(int irq, void *dev_id) | |||
654 | * Nothing? Something is broken! | 650 | * Nothing? Something is broken! |
655 | */ | 651 | */ |
656 | if (el_debug > 2) | 652 | if (el_debug > 2) |
657 | printk(KERN_DEBUG "%s: No packet seen, rxsr=%02x **resetting 3c501***\n", | 653 | pr_debug("%s: No packet seen, rxsr=%02x **resetting 3c501***\n", |
658 | dev->name, rxsr); | 654 | dev->name, rxsr); |
659 | el_reset(dev); | 655 | el_reset(dev); |
660 | } | 656 | } |
661 | if (el_debug > 3) | ||
662 | printk(KERN_DEBUG ".\n"); | ||
663 | } | 657 | } |
664 | 658 | ||
665 | /* | 659 | /* |
@@ -695,11 +689,11 @@ static void el_receive(struct net_device *dev) | |||
695 | pkt_len = inw(RX_LOW); | 689 | pkt_len = inw(RX_LOW); |
696 | 690 | ||
697 | if (el_debug > 4) | 691 | if (el_debug > 4) |
698 | printk(KERN_DEBUG " el_receive %d.\n", pkt_len); | 692 | pr_debug(" el_receive %d.\n", pkt_len); |
699 | 693 | ||
700 | if (pkt_len < 60 || pkt_len > 1536) { | 694 | if (pkt_len < 60 || pkt_len > 1536) { |
701 | if (el_debug) | 695 | if (el_debug) |
702 | printk(KERN_DEBUG "%s: bogus packet, length=%d\n", | 696 | pr_debug("%s: bogus packet, length=%d\n", |
703 | dev->name, pkt_len); | 697 | dev->name, pkt_len); |
704 | dev->stats.rx_over_errors++; | 698 | dev->stats.rx_over_errors++; |
705 | return; | 699 | return; |
@@ -718,8 +712,7 @@ static void el_receive(struct net_device *dev) | |||
718 | 712 | ||
719 | outw(0x00, GP_LOW); | 713 | outw(0x00, GP_LOW); |
720 | if (skb == NULL) { | 714 | if (skb == NULL) { |
721 | printk(KERN_INFO "%s: Memory squeeze, dropping packet.\n", | 715 | pr_info("%s: Memory squeeze, dropping packet.\n", dev->name); |
722 | dev->name); | ||
723 | dev->stats.rx_dropped++; | 716 | dev->stats.rx_dropped++; |
724 | return; | 717 | return; |
725 | } else { | 718 | } else { |
@@ -753,7 +746,7 @@ static void el_reset(struct net_device *dev) | |||
753 | int ioaddr = dev->base_addr; | 746 | int ioaddr = dev->base_addr; |
754 | 747 | ||
755 | if (el_debug > 2) | 748 | if (el_debug > 2) |
756 | printk(KERN_INFO "3c501 reset..."); | 749 | pr_info("3c501 reset...\n"); |
757 | outb(AX_RESET, AX_CMD); /* Reset the chip */ | 750 | outb(AX_RESET, AX_CMD); /* Reset the chip */ |
758 | /* Aux control, irq and loopback enabled */ | 751 | /* Aux control, irq and loopback enabled */ |
759 | outb(AX_LOOP, AX_CMD); | 752 | outb(AX_LOOP, AX_CMD); |
@@ -787,7 +780,7 @@ static int el1_close(struct net_device *dev) | |||
787 | int ioaddr = dev->base_addr; | 780 | int ioaddr = dev->base_addr; |
788 | 781 | ||
789 | if (el_debug > 2) | 782 | if (el_debug > 2) |
790 | printk(KERN_INFO "%s: Shutting down Ethernet card at %#x.\n", | 783 | pr_info("%s: Shutting down Ethernet card at %#x.\n", |
791 | dev->name, ioaddr); | 784 | dev->name, ioaddr); |
792 | 785 | ||
793 | netif_stop_queue(dev); | 786 | netif_stop_queue(dev); |
diff --git a/drivers/net/3c503.c b/drivers/net/3c503.c index 4f08bd995836..134638a9759f 100644 --- a/drivers/net/3c503.c +++ b/drivers/net/3c503.c | |||
@@ -234,16 +234,16 @@ el2_probe1(struct net_device *dev, int ioaddr) | |||
234 | } | 234 | } |
235 | 235 | ||
236 | if (ei_debug && version_printed++ == 0) | 236 | if (ei_debug && version_printed++ == 0) |
237 | printk(version); | 237 | pr_debug("%s", version); |
238 | 238 | ||
239 | dev->base_addr = ioaddr; | 239 | dev->base_addr = ioaddr; |
240 | 240 | ||
241 | printk("%s: 3c503 at i/o base %#3x, node ", dev->name, ioaddr); | 241 | pr_info("%s: 3c503 at i/o base %#3x, node ", dev->name, ioaddr); |
242 | 242 | ||
243 | /* Retrieve and print the ethernet address. */ | 243 | /* Retrieve and print the ethernet address. */ |
244 | for (i = 0; i < 6; i++) | 244 | for (i = 0; i < 6; i++) |
245 | dev->dev_addr[i] = inb(ioaddr + i); | 245 | dev->dev_addr[i] = inb(ioaddr + i); |
246 | printk("%pM", dev->dev_addr); | 246 | pr_cont("%pM", dev->dev_addr); |
247 | 247 | ||
248 | /* Map the 8390 back into the window. */ | 248 | /* Map the 8390 back into the window. */ |
249 | outb(ECNTRL_THIN, ioaddr + 0x406); | 249 | outb(ECNTRL_THIN, ioaddr + 0x406); |
@@ -256,7 +256,8 @@ el2_probe1(struct net_device *dev, int ioaddr) | |||
256 | outb_p(E8390_PAGE0, ioaddr + E8390_CMD); | 256 | outb_p(E8390_PAGE0, ioaddr + E8390_CMD); |
257 | 257 | ||
258 | /* Probe for, turn on and clear the board's shared memory. */ | 258 | /* Probe for, turn on and clear the board's shared memory. */ |
259 | if (ei_debug > 2) printk(" memory jumpers %2.2x ", membase_reg); | 259 | if (ei_debug > 2) |
260 | pr_cont(" memory jumpers %2.2x ", membase_reg); | ||
260 | outb(EGACFR_NORM, ioaddr + 0x405); /* Enable RAM */ | 261 | outb(EGACFR_NORM, ioaddr + 0x405); /* Enable RAM */ |
261 | 262 | ||
262 | /* This should be probed for (or set via an ioctl()) at run-time. | 263 | /* This should be probed for (or set via an ioctl()) at run-time. |
@@ -268,7 +269,7 @@ el2_probe1(struct net_device *dev, int ioaddr) | |||
268 | #else | 269 | #else |
269 | ei_status.interface_num = dev->mem_end & 0xf; | 270 | ei_status.interface_num = dev->mem_end & 0xf; |
270 | #endif | 271 | #endif |
271 | printk(", using %sternal xcvr.\n", ei_status.interface_num == 0 ? "in" : "ex"); | 272 | pr_cont(", using %sternal xcvr.\n", ei_status.interface_num == 0 ? "in" : "ex"); |
272 | 273 | ||
273 | if ((membase_reg & 0xf0) == 0) { | 274 | if ((membase_reg & 0xf0) == 0) { |
274 | dev->mem_start = 0; | 275 | dev->mem_start = 0; |
@@ -292,7 +293,7 @@ el2_probe1(struct net_device *dev, int ioaddr) | |||
292 | writel(test_val, mem_base + i); | 293 | writel(test_val, mem_base + i); |
293 | if (readl(mem_base) != 0xba5eba5e | 294 | if (readl(mem_base) != 0xba5eba5e |
294 | || readl(mem_base + i) != test_val) { | 295 | || readl(mem_base + i) != test_val) { |
295 | printk("3c503: memory failure or memory address conflict.\n"); | 296 | pr_warning("3c503: memory failure or memory address conflict.\n"); |
296 | dev->mem_start = 0; | 297 | dev->mem_start = 0; |
297 | ei_status.name = "3c503-PIO"; | 298 | ei_status.name = "3c503-PIO"; |
298 | iounmap(mem_base); | 299 | iounmap(mem_base); |
@@ -344,7 +345,7 @@ el2_probe1(struct net_device *dev, int ioaddr) | |||
344 | if (dev->irq == 2) | 345 | if (dev->irq == 2) |
345 | dev->irq = 9; | 346 | dev->irq = 9; |
346 | else if (dev->irq > 5 && dev->irq != 9) { | 347 | else if (dev->irq > 5 && dev->irq != 9) { |
347 | printk("3c503: configured interrupt %d invalid, will use autoIRQ.\n", | 348 | pr_warning("3c503: configured interrupt %d invalid, will use autoIRQ.\n", |
348 | dev->irq); | 349 | dev->irq); |
349 | dev->irq = 0; | 350 | dev->irq = 0; |
350 | } | 351 | } |
@@ -359,7 +360,7 @@ el2_probe1(struct net_device *dev, int ioaddr) | |||
359 | goto out1; | 360 | goto out1; |
360 | 361 | ||
361 | if (dev->mem_start) | 362 | if (dev->mem_start) |
362 | printk("%s: %s - %dkB RAM, 8kB shared mem window at %#6lx-%#6lx.\n", | 363 | pr_info("%s: %s - %dkB RAM, 8kB shared mem window at %#6lx-%#6lx.\n", |
363 | dev->name, ei_status.name, (wordlength+1)<<3, | 364 | dev->name, ei_status.name, (wordlength+1)<<3, |
364 | dev->mem_start, dev->mem_end-1); | 365 | dev->mem_start, dev->mem_end-1); |
365 | 366 | ||
@@ -367,7 +368,7 @@ el2_probe1(struct net_device *dev, int ioaddr) | |||
367 | { | 368 | { |
368 | ei_status.tx_start_page = EL2_MB1_START_PG; | 369 | ei_status.tx_start_page = EL2_MB1_START_PG; |
369 | ei_status.rx_start_page = EL2_MB1_START_PG + TX_PAGES; | 370 | ei_status.rx_start_page = EL2_MB1_START_PG + TX_PAGES; |
370 | printk("\n%s: %s, %dkB RAM, using programmed I/O (REJUMPER for SHARED MEMORY).\n", | 371 | pr_info("%s: %s, %dkB RAM, using programmed I/O (REJUMPER for SHARED MEMORY).\n", |
371 | dev->name, ei_status.name, (wordlength+1)<<3); | 372 | dev->name, ei_status.name, (wordlength+1)<<3); |
372 | } | 373 | } |
373 | release_region(ioaddr + 0x400, 8); | 374 | release_region(ioaddr + 0x400, 8); |
@@ -435,15 +436,16 @@ static void | |||
435 | el2_reset_8390(struct net_device *dev) | 436 | el2_reset_8390(struct net_device *dev) |
436 | { | 437 | { |
437 | if (ei_debug > 1) { | 438 | if (ei_debug > 1) { |
438 | printk("%s: Resetting the 3c503 board...", dev->name); | 439 | pr_debug("%s: Resetting the 3c503 board...", dev->name); |
439 | printk("%#lx=%#02x %#lx=%#02x %#lx=%#02x...", E33G_IDCFR, inb(E33G_IDCFR), | 440 | pr_cont(" %#lx=%#02x %#lx=%#02x %#lx=%#02x...", E33G_IDCFR, inb(E33G_IDCFR), |
440 | E33G_CNTRL, inb(E33G_CNTRL), E33G_GACFR, inb(E33G_GACFR)); | 441 | E33G_CNTRL, inb(E33G_CNTRL), E33G_GACFR, inb(E33G_GACFR)); |
441 | } | 442 | } |
442 | outb_p(ECNTRL_RESET|ECNTRL_THIN, E33G_CNTRL); | 443 | outb_p(ECNTRL_RESET|ECNTRL_THIN, E33G_CNTRL); |
443 | ei_status.txing = 0; | 444 | ei_status.txing = 0; |
444 | outb_p(ei_status.interface_num==0 ? ECNTRL_THIN : ECNTRL_AUI, E33G_CNTRL); | 445 | outb_p(ei_status.interface_num==0 ? ECNTRL_THIN : ECNTRL_AUI, E33G_CNTRL); |
445 | el2_init_card(dev); | 446 | el2_init_card(dev); |
446 | if (ei_debug > 1) printk("done\n"); | 447 | if (ei_debug > 1) |
448 | pr_cont("done\n"); | ||
447 | } | 449 | } |
448 | 450 | ||
449 | /* Initialize the 3c503 GA registers after a reset. */ | 451 | /* Initialize the 3c503 GA registers after a reset. */ |
@@ -529,7 +531,7 @@ el2_block_output(struct net_device *dev, int count, | |||
529 | { | 531 | { |
530 | if(!boguscount--) | 532 | if(!boguscount--) |
531 | { | 533 | { |
532 | printk("%s: FIFO blocked in el2_block_output.\n", dev->name); | 534 | pr_notice("%s: FIFO blocked in el2_block_output.\n", dev->name); |
533 | el2_reset_8390(dev); | 535 | el2_reset_8390(dev); |
534 | goto blocked; | 536 | goto blocked; |
535 | } | 537 | } |
@@ -581,7 +583,7 @@ el2_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr, int ring_pag | |||
581 | { | 583 | { |
582 | if(!boguscount--) | 584 | if(!boguscount--) |
583 | { | 585 | { |
584 | printk("%s: FIFO blocked in el2_get_8390_hdr.\n", dev->name); | 586 | pr_notice("%s: FIFO blocked in el2_get_8390_hdr.\n", dev->name); |
585 | memset(hdr, 0x00, sizeof(struct e8390_pkt_hdr)); | 587 | memset(hdr, 0x00, sizeof(struct e8390_pkt_hdr)); |
586 | el2_reset_8390(dev); | 588 | el2_reset_8390(dev); |
587 | goto blocked; | 589 | goto blocked; |
@@ -645,7 +647,7 @@ el2_block_input(struct net_device *dev, int count, struct sk_buff *skb, int ring | |||
645 | { | 647 | { |
646 | if(!boguscount--) | 648 | if(!boguscount--) |
647 | { | 649 | { |
648 | printk("%s: FIFO blocked in el2_block_input.\n", dev->name); | 650 | pr_notice("%s: FIFO blocked in el2_block_input.\n", dev->name); |
649 | el2_reset_8390(dev); | 651 | el2_reset_8390(dev); |
650 | goto blocked; | 652 | goto blocked; |
651 | } | 653 | } |
@@ -707,7 +709,7 @@ init_module(void) | |||
707 | for (this_dev = 0; this_dev < MAX_EL2_CARDS; this_dev++) { | 709 | for (this_dev = 0; this_dev < MAX_EL2_CARDS; this_dev++) { |
708 | if (io[this_dev] == 0) { | 710 | if (io[this_dev] == 0) { |
709 | if (this_dev != 0) break; /* only autoprobe 1st one */ | 711 | if (this_dev != 0) break; /* only autoprobe 1st one */ |
710 | printk(KERN_NOTICE "3c503.c: Presently autoprobing (not recommended) for a single card.\n"); | 712 | pr_notice("3c503.c: Presently autoprobing (not recommended) for a single card.\n"); |
711 | } | 713 | } |
712 | dev = alloc_eip_netdev(); | 714 | dev = alloc_eip_netdev(); |
713 | if (!dev) | 715 | if (!dev) |
@@ -720,7 +722,7 @@ init_module(void) | |||
720 | continue; | 722 | continue; |
721 | } | 723 | } |
722 | free_netdev(dev); | 724 | free_netdev(dev); |
723 | printk(KERN_WARNING "3c503.c: No 3c503 card found (i/o = 0x%x).\n", io[this_dev]); | 725 | pr_warning("3c503.c: No 3c503 card found (i/o = 0x%x).\n", io[this_dev]); |
724 | break; | 726 | break; |
725 | } | 727 | } |
726 | if (found) | 728 | if (found) |
diff --git a/drivers/net/3c505.c b/drivers/net/3c505.c index 2de1c9cd7bde..b28499459cd6 100644 --- a/drivers/net/3c505.c +++ b/drivers/net/3c505.c | |||
@@ -126,26 +126,25 @@ | |||
126 | * | 126 | * |
127 | *********************************************************/ | 127 | *********************************************************/ |
128 | 128 | ||
129 | static const char filename[] = __FILE__; | 129 | #define filename __FILE__ |
130 | 130 | ||
131 | static const char timeout_msg[] = "*** timeout at %s:%s (line %d) ***\n"; | 131 | #define timeout_msg "*** timeout at %s:%s (line %d) ***\n" |
132 | #define TIMEOUT_MSG(lineno) \ | 132 | #define TIMEOUT_MSG(lineno) \ |
133 | printk(timeout_msg, filename,__func__,(lineno)) | 133 | pr_notice(timeout_msg, filename, __func__, (lineno)) |
134 | 134 | ||
135 | static const char invalid_pcb_msg[] = | 135 | #define invalid_pcb_msg "*** invalid pcb length %d at %s:%s (line %d) ***\n" |
136 | "*** invalid pcb length %d at %s:%s (line %d) ***\n"; | ||
137 | #define INVALID_PCB_MSG(len) \ | 136 | #define INVALID_PCB_MSG(len) \ |
138 | printk(invalid_pcb_msg, (len),filename,__func__,__LINE__) | 137 | pr_notice(invalid_pcb_msg, (len), filename, __func__, __LINE__) |
139 | 138 | ||
140 | static char search_msg[] __initdata = KERN_INFO "%s: Looking for 3c505 adapter at address %#x..."; | 139 | #define search_msg "%s: Looking for 3c505 adapter at address %#x..." |
141 | 140 | ||
142 | static char stilllooking_msg[] __initdata = "still looking..."; | 141 | #define stilllooking_msg "still looking..." |
143 | 142 | ||
144 | static char found_msg[] __initdata = "found.\n"; | 143 | #define found_msg "found.\n" |
145 | 144 | ||
146 | static char notfound_msg[] __initdata = "not found (reason = %d)\n"; | 145 | #define notfound_msg "not found (reason = %d)\n" |
147 | 146 | ||
148 | static char couldnot_msg[] __initdata = KERN_INFO "%s: 3c505 not found\n"; | 147 | #define couldnot_msg "%s: 3c505 not found\n" |
149 | 148 | ||
150 | /********************************************************* | 149 | /********************************************************* |
151 | * | 150 | * |
@@ -284,7 +283,7 @@ static inline void adapter_reset(struct net_device *dev) | |||
284 | 283 | ||
285 | outb_control(orig_hcr, dev); | 284 | outb_control(orig_hcr, dev); |
286 | if (!start_receive(dev, &adapter->tx_pcb)) | 285 | if (!start_receive(dev, &adapter->tx_pcb)) |
287 | printk(KERN_ERR "%s: start receive command failed \n", dev->name); | 286 | pr_err("%s: start receive command failed\n", dev->name); |
288 | } | 287 | } |
289 | 288 | ||
290 | /* Check to make sure that a DMA transfer hasn't timed out. This should | 289 | /* Check to make sure that a DMA transfer hasn't timed out. This should |
@@ -296,7 +295,9 @@ static inline void check_3c505_dma(struct net_device *dev) | |||
296 | elp_device *adapter = netdev_priv(dev); | 295 | elp_device *adapter = netdev_priv(dev); |
297 | if (adapter->dmaing && time_after(jiffies, adapter->current_dma.start_time + 10)) { | 296 | if (adapter->dmaing && time_after(jiffies, adapter->current_dma.start_time + 10)) { |
298 | unsigned long flags, f; | 297 | unsigned long flags, f; |
299 | printk(KERN_ERR "%s: DMA %s timed out, %d bytes left\n", dev->name, adapter->current_dma.direction ? "download" : "upload", get_dma_residue(dev->dma)); | 298 | pr_err("%s: DMA %s timed out, %d bytes left\n", dev->name, |
299 | adapter->current_dma.direction ? "download" : "upload", | ||
300 | get_dma_residue(dev->dma)); | ||
300 | spin_lock_irqsave(&adapter->lock, flags); | 301 | spin_lock_irqsave(&adapter->lock, flags); |
301 | adapter->dmaing = 0; | 302 | adapter->dmaing = 0; |
302 | adapter->busy = 0; | 303 | adapter->busy = 0; |
@@ -321,7 +322,7 @@ static inline bool send_pcb_slow(unsigned int base_addr, unsigned char byte) | |||
321 | if (inb_status(base_addr) & HCRE) | 322 | if (inb_status(base_addr) & HCRE) |
322 | return false; | 323 | return false; |
323 | } | 324 | } |
324 | printk(KERN_WARNING "3c505: send_pcb_slow timed out\n"); | 325 | pr_warning("3c505: send_pcb_slow timed out\n"); |
325 | return true; | 326 | return true; |
326 | } | 327 | } |
327 | 328 | ||
@@ -333,7 +334,7 @@ static inline bool send_pcb_fast(unsigned int base_addr, unsigned char byte) | |||
333 | if (inb_status(base_addr) & HCRE) | 334 | if (inb_status(base_addr) & HCRE) |
334 | return false; | 335 | return false; |
335 | } | 336 | } |
336 | printk(KERN_WARNING "3c505: send_pcb_fast timed out\n"); | 337 | pr_warning("3c505: send_pcb_fast timed out\n"); |
337 | return true; | 338 | return true; |
338 | } | 339 | } |
339 | 340 | ||
@@ -386,7 +387,7 @@ static bool send_pcb(struct net_device *dev, pcb_struct * pcb) | |||
386 | /* Avoid contention */ | 387 | /* Avoid contention */ |
387 | if (test_and_set_bit(1, &adapter->send_pcb_semaphore)) { | 388 | if (test_and_set_bit(1, &adapter->send_pcb_semaphore)) { |
388 | if (elp_debug >= 3) { | 389 | if (elp_debug >= 3) { |
389 | printk(KERN_DEBUG "%s: send_pcb entered while threaded\n", dev->name); | 390 | pr_debug("%s: send_pcb entered while threaded\n", dev->name); |
390 | } | 391 | } |
391 | return false; | 392 | return false; |
392 | } | 393 | } |
@@ -424,14 +425,15 @@ static bool send_pcb(struct net_device *dev, pcb_struct * pcb) | |||
424 | 425 | ||
425 | case ASF_PCB_NAK: | 426 | case ASF_PCB_NAK: |
426 | #ifdef ELP_DEBUG | 427 | #ifdef ELP_DEBUG |
427 | printk(KERN_DEBUG "%s: send_pcb got NAK\n", dev->name); | 428 | pr_debug("%s: send_pcb got NAK\n", dev->name); |
428 | #endif | 429 | #endif |
429 | goto abort; | 430 | goto abort; |
430 | } | 431 | } |
431 | } | 432 | } |
432 | 433 | ||
433 | if (elp_debug >= 1) | 434 | if (elp_debug >= 1) |
434 | printk(KERN_DEBUG "%s: timeout waiting for PCB acknowledge (status %02x)\n", dev->name, inb_status(dev->base_addr)); | 435 | pr_debug("%s: timeout waiting for PCB acknowledge (status %02x)\n", |
436 | dev->name, inb_status(dev->base_addr)); | ||
435 | goto abort; | 437 | goto abort; |
436 | 438 | ||
437 | sti_abort: | 439 | sti_abort: |
@@ -481,7 +483,7 @@ static bool receive_pcb(struct net_device *dev, pcb_struct * pcb) | |||
481 | while (((stat = get_status(dev->base_addr)) & ACRF) == 0 && time_before(jiffies, timeout)); | 483 | while (((stat = get_status(dev->base_addr)) & ACRF) == 0 && time_before(jiffies, timeout)); |
482 | if (time_after_eq(jiffies, timeout)) { | 484 | if (time_after_eq(jiffies, timeout)) { |
483 | TIMEOUT_MSG(__LINE__); | 485 | TIMEOUT_MSG(__LINE__); |
484 | printk(KERN_INFO "%s: status %02x\n", dev->name, stat); | 486 | pr_info("%s: status %02x\n", dev->name, stat); |
485 | return false; | 487 | return false; |
486 | } | 488 | } |
487 | pcb->length = inb_command(dev->base_addr); | 489 | pcb->length = inb_command(dev->base_addr); |
@@ -518,7 +520,7 @@ static bool receive_pcb(struct net_device *dev, pcb_struct * pcb) | |||
518 | /* safety check total length vs data length */ | 520 | /* safety check total length vs data length */ |
519 | if (total_length != (pcb->length + 2)) { | 521 | if (total_length != (pcb->length + 2)) { |
520 | if (elp_debug >= 2) | 522 | if (elp_debug >= 2) |
521 | printk(KERN_WARNING "%s: mangled PCB received\n", dev->name); | 523 | pr_warning("%s: mangled PCB received\n", dev->name); |
522 | set_hsf(dev, HSF_PCB_NAK); | 524 | set_hsf(dev, HSF_PCB_NAK); |
523 | return false; | 525 | return false; |
524 | } | 526 | } |
@@ -527,7 +529,7 @@ static bool receive_pcb(struct net_device *dev, pcb_struct * pcb) | |||
527 | if (test_and_set_bit(0, (void *) &adapter->busy)) { | 529 | if (test_and_set_bit(0, (void *) &adapter->busy)) { |
528 | if (backlog_next(adapter->rx_backlog.in) == adapter->rx_backlog.out) { | 530 | if (backlog_next(adapter->rx_backlog.in) == adapter->rx_backlog.out) { |
529 | set_hsf(dev, HSF_PCB_NAK); | 531 | set_hsf(dev, HSF_PCB_NAK); |
530 | printk(KERN_WARNING "%s: PCB rejected, transfer in progress and backlog full\n", dev->name); | 532 | pr_warning("%s: PCB rejected, transfer in progress and backlog full\n", dev->name); |
531 | pcb->command = 0; | 533 | pcb->command = 0; |
532 | return true; | 534 | return true; |
533 | } else { | 535 | } else { |
@@ -552,7 +554,7 @@ static bool start_receive(struct net_device *dev, pcb_struct * tx_pcb) | |||
552 | elp_device *adapter = netdev_priv(dev); | 554 | elp_device *adapter = netdev_priv(dev); |
553 | 555 | ||
554 | if (elp_debug >= 3) | 556 | if (elp_debug >= 3) |
555 | printk(KERN_DEBUG "%s: restarting receiver\n", dev->name); | 557 | pr_debug("%s: restarting receiver\n", dev->name); |
556 | tx_pcb->command = CMD_RECEIVE_PACKET; | 558 | tx_pcb->command = CMD_RECEIVE_PACKET; |
557 | tx_pcb->length = sizeof(struct Rcv_pkt); | 559 | tx_pcb->length = sizeof(struct Rcv_pkt); |
558 | tx_pcb->data.rcv_pkt.buf_seg | 560 | tx_pcb->data.rcv_pkt.buf_seg |
@@ -586,7 +588,7 @@ static void receive_packet(struct net_device *dev, int len) | |||
586 | skb = dev_alloc_skb(rlen + 2); | 588 | skb = dev_alloc_skb(rlen + 2); |
587 | 589 | ||
588 | if (!skb) { | 590 | if (!skb) { |
589 | printk(KERN_WARNING "%s: memory squeeze, dropping packet\n", dev->name); | 591 | pr_warning("%s: memory squeeze, dropping packet\n", dev->name); |
590 | target = adapter->dma_buffer; | 592 | target = adapter->dma_buffer; |
591 | adapter->current_dma.target = NULL; | 593 | adapter->current_dma.target = NULL; |
592 | /* FIXME: stats */ | 594 | /* FIXME: stats */ |
@@ -604,7 +606,8 @@ static void receive_packet(struct net_device *dev, int len) | |||
604 | 606 | ||
605 | /* if this happens, we die */ | 607 | /* if this happens, we die */ |
606 | if (test_and_set_bit(0, (void *) &adapter->dmaing)) | 608 | if (test_and_set_bit(0, (void *) &adapter->dmaing)) |
607 | printk(KERN_ERR "%s: rx blocked, DMA in progress, dir %d\n", dev->name, adapter->current_dma.direction); | 609 | pr_err("%s: rx blocked, DMA in progress, dir %d\n", |
610 | dev->name, adapter->current_dma.direction); | ||
608 | 611 | ||
609 | adapter->current_dma.direction = 0; | 612 | adapter->current_dma.direction = 0; |
610 | adapter->current_dma.length = rlen; | 613 | adapter->current_dma.length = rlen; |
@@ -623,14 +626,14 @@ static void receive_packet(struct net_device *dev, int len) | |||
623 | release_dma_lock(flags); | 626 | release_dma_lock(flags); |
624 | 627 | ||
625 | if (elp_debug >= 3) { | 628 | if (elp_debug >= 3) { |
626 | printk(KERN_DEBUG "%s: rx DMA transfer started\n", dev->name); | 629 | pr_debug("%s: rx DMA transfer started\n", dev->name); |
627 | } | 630 | } |
628 | 631 | ||
629 | if (adapter->rx_active) | 632 | if (adapter->rx_active) |
630 | adapter->rx_active--; | 633 | adapter->rx_active--; |
631 | 634 | ||
632 | if (!adapter->busy) | 635 | if (!adapter->busy) |
633 | printk(KERN_WARNING "%s: receive_packet called, busy not set.\n", dev->name); | 636 | pr_warning("%s: receive_packet called, busy not set.\n", dev->name); |
634 | } | 637 | } |
635 | 638 | ||
636 | /****************************************************** | 639 | /****************************************************** |
@@ -655,12 +658,13 @@ static irqreturn_t elp_interrupt(int irq, void *dev_id) | |||
655 | * has a DMA transfer finished? | 658 | * has a DMA transfer finished? |
656 | */ | 659 | */ |
657 | if (inb_status(dev->base_addr) & DONE) { | 660 | if (inb_status(dev->base_addr) & DONE) { |
658 | if (!adapter->dmaing) { | 661 | if (!adapter->dmaing) |
659 | printk(KERN_WARNING "%s: phantom DMA completed\n", dev->name); | 662 | pr_warning("%s: phantom DMA completed\n", dev->name); |
660 | } | 663 | |
661 | if (elp_debug >= 3) { | 664 | if (elp_debug >= 3) |
662 | printk(KERN_DEBUG "%s: %s DMA complete, status %02x\n", dev->name, adapter->current_dma.direction ? "tx" : "rx", inb_status(dev->base_addr)); | 665 | pr_debug("%s: %s DMA complete, status %02x\n", dev->name, |
663 | } | 666 | adapter->current_dma.direction ? "tx" : "rx", |
667 | inb_status(dev->base_addr)); | ||
664 | 668 | ||
665 | outb_control(adapter->hcr_val & ~(DMAE | TCEN | DIR), dev); | 669 | outb_control(adapter->hcr_val & ~(DMAE | TCEN | DIR), dev); |
666 | if (adapter->current_dma.direction) { | 670 | if (adapter->current_dma.direction) { |
@@ -682,7 +686,7 @@ static irqreturn_t elp_interrupt(int irq, void *dev_id) | |||
682 | int t = adapter->rx_backlog.length[adapter->rx_backlog.out]; | 686 | int t = adapter->rx_backlog.length[adapter->rx_backlog.out]; |
683 | adapter->rx_backlog.out = backlog_next(adapter->rx_backlog.out); | 687 | adapter->rx_backlog.out = backlog_next(adapter->rx_backlog.out); |
684 | if (elp_debug >= 2) | 688 | if (elp_debug >= 2) |
685 | printk(KERN_DEBUG "%s: receiving backlogged packet (%d)\n", dev->name, t); | 689 | pr_debug("%s: receiving backlogged packet (%d)\n", dev->name, t); |
686 | receive_packet(dev, t); | 690 | receive_packet(dev, t); |
687 | } else { | 691 | } else { |
688 | adapter->busy = 0; | 692 | adapter->busy = 0; |
@@ -713,21 +717,23 @@ static irqreturn_t elp_interrupt(int irq, void *dev_id) | |||
713 | len = adapter->irx_pcb.data.rcv_resp.pkt_len; | 717 | len = adapter->irx_pcb.data.rcv_resp.pkt_len; |
714 | dlen = adapter->irx_pcb.data.rcv_resp.buf_len; | 718 | dlen = adapter->irx_pcb.data.rcv_resp.buf_len; |
715 | if (adapter->irx_pcb.data.rcv_resp.timeout != 0) { | 719 | if (adapter->irx_pcb.data.rcv_resp.timeout != 0) { |
716 | printk(KERN_ERR "%s: interrupt - packet not received correctly\n", dev->name); | 720 | pr_err("%s: interrupt - packet not received correctly\n", dev->name); |
717 | } else { | 721 | } else { |
718 | if (elp_debug >= 3) { | 722 | if (elp_debug >= 3) { |
719 | printk(KERN_DEBUG "%s: interrupt - packet received of length %i (%i)\n", dev->name, len, dlen); | 723 | pr_debug("%s: interrupt - packet received of length %i (%i)\n", |
724 | dev->name, len, dlen); | ||
720 | } | 725 | } |
721 | if (adapter->irx_pcb.command == 0xff) { | 726 | if (adapter->irx_pcb.command == 0xff) { |
722 | if (elp_debug >= 2) | 727 | if (elp_debug >= 2) |
723 | printk(KERN_DEBUG "%s: adding packet to backlog (len = %d)\n", dev->name, dlen); | 728 | pr_debug("%s: adding packet to backlog (len = %d)\n", |
729 | dev->name, dlen); | ||
724 | adapter->rx_backlog.length[adapter->rx_backlog.in] = dlen; | 730 | adapter->rx_backlog.length[adapter->rx_backlog.in] = dlen; |
725 | adapter->rx_backlog.in = backlog_next(adapter->rx_backlog.in); | 731 | adapter->rx_backlog.in = backlog_next(adapter->rx_backlog.in); |
726 | } else { | 732 | } else { |
727 | receive_packet(dev, dlen); | 733 | receive_packet(dev, dlen); |
728 | } | 734 | } |
729 | if (elp_debug >= 3) | 735 | if (elp_debug >= 3) |
730 | printk(KERN_DEBUG "%s: packet received\n", dev->name); | 736 | pr_debug("%s: packet received\n", dev->name); |
731 | } | 737 | } |
732 | break; | 738 | break; |
733 | 739 | ||
@@ -737,7 +743,7 @@ static irqreturn_t elp_interrupt(int irq, void *dev_id) | |||
737 | case CMD_CONFIGURE_82586_RESPONSE: | 743 | case CMD_CONFIGURE_82586_RESPONSE: |
738 | adapter->got[CMD_CONFIGURE_82586] = 1; | 744 | adapter->got[CMD_CONFIGURE_82586] = 1; |
739 | if (elp_debug >= 3) | 745 | if (elp_debug >= 3) |
740 | printk(KERN_DEBUG "%s: interrupt - configure response received\n", dev->name); | 746 | pr_debug("%s: interrupt - configure response received\n", dev->name); |
741 | break; | 747 | break; |
742 | 748 | ||
743 | /* | 749 | /* |
@@ -746,7 +752,7 @@ static irqreturn_t elp_interrupt(int irq, void *dev_id) | |||
746 | case CMD_CONFIGURE_ADAPTER_RESPONSE: | 752 | case CMD_CONFIGURE_ADAPTER_RESPONSE: |
747 | adapter->got[CMD_CONFIGURE_ADAPTER_MEMORY] = 1; | 753 | adapter->got[CMD_CONFIGURE_ADAPTER_MEMORY] = 1; |
748 | if (elp_debug >= 3) | 754 | if (elp_debug >= 3) |
749 | printk(KERN_DEBUG "%s: Adapter memory configuration %s.\n", dev->name, | 755 | pr_debug("%s: Adapter memory configuration %s.\n", dev->name, |
750 | adapter->irx_pcb.data.failed ? "failed" : "succeeded"); | 756 | adapter->irx_pcb.data.failed ? "failed" : "succeeded"); |
751 | break; | 757 | break; |
752 | 758 | ||
@@ -756,7 +762,7 @@ static irqreturn_t elp_interrupt(int irq, void *dev_id) | |||
756 | case CMD_LOAD_MULTICAST_RESPONSE: | 762 | case CMD_LOAD_MULTICAST_RESPONSE: |
757 | adapter->got[CMD_LOAD_MULTICAST_LIST] = 1; | 763 | adapter->got[CMD_LOAD_MULTICAST_LIST] = 1; |
758 | if (elp_debug >= 3) | 764 | if (elp_debug >= 3) |
759 | printk(KERN_DEBUG "%s: Multicast address list loading %s.\n", dev->name, | 765 | pr_debug("%s: Multicast address list loading %s.\n", dev->name, |
760 | adapter->irx_pcb.data.failed ? "failed" : "succeeded"); | 766 | adapter->irx_pcb.data.failed ? "failed" : "succeeded"); |
761 | break; | 767 | break; |
762 | 768 | ||
@@ -766,7 +772,7 @@ static irqreturn_t elp_interrupt(int irq, void *dev_id) | |||
766 | case CMD_SET_ADDRESS_RESPONSE: | 772 | case CMD_SET_ADDRESS_RESPONSE: |
767 | adapter->got[CMD_SET_STATION_ADDRESS] = 1; | 773 | adapter->got[CMD_SET_STATION_ADDRESS] = 1; |
768 | if (elp_debug >= 3) | 774 | if (elp_debug >= 3) |
769 | printk(KERN_DEBUG "%s: Ethernet address setting %s.\n", dev->name, | 775 | pr_debug("%s: Ethernet address setting %s.\n", dev->name, |
770 | adapter->irx_pcb.data.failed ? "failed" : "succeeded"); | 776 | adapter->irx_pcb.data.failed ? "failed" : "succeeded"); |
771 | break; | 777 | break; |
772 | 778 | ||
@@ -783,7 +789,7 @@ static irqreturn_t elp_interrupt(int irq, void *dev_id) | |||
783 | dev->stats.rx_over_errors += adapter->irx_pcb.data.netstat.err_res; | 789 | dev->stats.rx_over_errors += adapter->irx_pcb.data.netstat.err_res; |
784 | adapter->got[CMD_NETWORK_STATISTICS] = 1; | 790 | adapter->got[CMD_NETWORK_STATISTICS] = 1; |
785 | if (elp_debug >= 3) | 791 | if (elp_debug >= 3) |
786 | printk(KERN_DEBUG "%s: interrupt - statistics response received\n", dev->name); | 792 | pr_debug("%s: interrupt - statistics response received\n", dev->name); |
787 | break; | 793 | break; |
788 | 794 | ||
789 | /* | 795 | /* |
@@ -791,17 +797,17 @@ static irqreturn_t elp_interrupt(int irq, void *dev_id) | |||
791 | */ | 797 | */ |
792 | case CMD_TRANSMIT_PACKET_COMPLETE: | 798 | case CMD_TRANSMIT_PACKET_COMPLETE: |
793 | if (elp_debug >= 3) | 799 | if (elp_debug >= 3) |
794 | printk(KERN_DEBUG "%s: interrupt - packet sent\n", dev->name); | 800 | pr_debug("%s: interrupt - packet sent\n", dev->name); |
795 | if (!netif_running(dev)) | 801 | if (!netif_running(dev)) |
796 | break; | 802 | break; |
797 | switch (adapter->irx_pcb.data.xmit_resp.c_stat) { | 803 | switch (adapter->irx_pcb.data.xmit_resp.c_stat) { |
798 | case 0xffff: | 804 | case 0xffff: |
799 | dev->stats.tx_aborted_errors++; | 805 | dev->stats.tx_aborted_errors++; |
800 | printk(KERN_INFO "%s: transmit timed out, network cable problem?\n", dev->name); | 806 | pr_info("%s: transmit timed out, network cable problem?\n", dev->name); |
801 | break; | 807 | break; |
802 | case 0xfffe: | 808 | case 0xfffe: |
803 | dev->stats.tx_fifo_errors++; | 809 | dev->stats.tx_fifo_errors++; |
804 | printk(KERN_INFO "%s: transmit timed out, FIFO underrun\n", dev->name); | 810 | pr_info("%s: transmit timed out, FIFO underrun\n", dev->name); |
805 | break; | 811 | break; |
806 | } | 812 | } |
807 | netif_wake_queue(dev); | 813 | netif_wake_queue(dev); |
@@ -811,11 +817,12 @@ static irqreturn_t elp_interrupt(int irq, void *dev_id) | |||
811 | * some unknown PCB | 817 | * some unknown PCB |
812 | */ | 818 | */ |
813 | default: | 819 | default: |
814 | printk(KERN_DEBUG "%s: unknown PCB received - %2.2x\n", dev->name, adapter->irx_pcb.command); | 820 | pr_debug("%s: unknown PCB received - %2.2x\n", |
821 | dev->name, adapter->irx_pcb.command); | ||
815 | break; | 822 | break; |
816 | } | 823 | } |
817 | } else { | 824 | } else { |
818 | printk(KERN_WARNING "%s: failed to read PCB on interrupt\n", dev->name); | 825 | pr_warning("%s: failed to read PCB on interrupt\n", dev->name); |
819 | adapter_reset(dev); | 826 | adapter_reset(dev); |
820 | } | 827 | } |
821 | } | 828 | } |
@@ -844,13 +851,13 @@ static int elp_open(struct net_device *dev) | |||
844 | int retval; | 851 | int retval; |
845 | 852 | ||
846 | if (elp_debug >= 3) | 853 | if (elp_debug >= 3) |
847 | printk(KERN_DEBUG "%s: request to open device\n", dev->name); | 854 | pr_debug("%s: request to open device\n", dev->name); |
848 | 855 | ||
849 | /* | 856 | /* |
850 | * make sure we actually found the device | 857 | * make sure we actually found the device |
851 | */ | 858 | */ |
852 | if (adapter == NULL) { | 859 | if (adapter == NULL) { |
853 | printk(KERN_ERR "%s: Opening a non-existent physical device\n", dev->name); | 860 | pr_err("%s: Opening a non-existent physical device\n", dev->name); |
854 | return -EAGAIN; | 861 | return -EAGAIN; |
855 | } | 862 | } |
856 | /* | 863 | /* |
@@ -880,17 +887,17 @@ static int elp_open(struct net_device *dev) | |||
880 | * install our interrupt service routine | 887 | * install our interrupt service routine |
881 | */ | 888 | */ |
882 | if ((retval = request_irq(dev->irq, &elp_interrupt, 0, dev->name, dev))) { | 889 | if ((retval = request_irq(dev->irq, &elp_interrupt, 0, dev->name, dev))) { |
883 | printk(KERN_ERR "%s: could not allocate IRQ%d\n", dev->name, dev->irq); | 890 | pr_err("%s: could not allocate IRQ%d\n", dev->name, dev->irq); |
884 | return retval; | 891 | return retval; |
885 | } | 892 | } |
886 | if ((retval = request_dma(dev->dma, dev->name))) { | 893 | if ((retval = request_dma(dev->dma, dev->name))) { |
887 | free_irq(dev->irq, dev); | 894 | free_irq(dev->irq, dev); |
888 | printk(KERN_ERR "%s: could not allocate DMA%d channel\n", dev->name, dev->dma); | 895 | pr_err("%s: could not allocate DMA%d channel\n", dev->name, dev->dma); |
889 | return retval; | 896 | return retval; |
890 | } | 897 | } |
891 | adapter->dma_buffer = (void *) dma_mem_alloc(DMA_BUFFER_SIZE); | 898 | adapter->dma_buffer = (void *) dma_mem_alloc(DMA_BUFFER_SIZE); |
892 | if (!adapter->dma_buffer) { | 899 | if (!adapter->dma_buffer) { |
893 | printk(KERN_ERR "%s: could not allocate DMA buffer\n", dev->name); | 900 | pr_err("%s: could not allocate DMA buffer\n", dev->name); |
894 | free_dma(dev->dma); | 901 | free_dma(dev->dma); |
895 | free_irq(dev->irq, dev); | 902 | free_irq(dev->irq, dev); |
896 | return -ENOMEM; | 903 | return -ENOMEM; |
@@ -906,7 +913,7 @@ static int elp_open(struct net_device *dev) | |||
906 | * configure adapter memory: we need 10 multicast addresses, default==0 | 913 | * configure adapter memory: we need 10 multicast addresses, default==0 |
907 | */ | 914 | */ |
908 | if (elp_debug >= 3) | 915 | if (elp_debug >= 3) |
909 | printk(KERN_DEBUG "%s: sending 3c505 memory configuration command\n", dev->name); | 916 | pr_debug("%s: sending 3c505 memory configuration command\n", dev->name); |
910 | adapter->tx_pcb.command = CMD_CONFIGURE_ADAPTER_MEMORY; | 917 | adapter->tx_pcb.command = CMD_CONFIGURE_ADAPTER_MEMORY; |
911 | adapter->tx_pcb.data.memconf.cmd_q = 10; | 918 | adapter->tx_pcb.data.memconf.cmd_q = 10; |
912 | adapter->tx_pcb.data.memconf.rcv_q = 20; | 919 | adapter->tx_pcb.data.memconf.rcv_q = 20; |
@@ -917,7 +924,7 @@ static int elp_open(struct net_device *dev) | |||
917 | adapter->tx_pcb.length = sizeof(struct Memconf); | 924 | adapter->tx_pcb.length = sizeof(struct Memconf); |
918 | adapter->got[CMD_CONFIGURE_ADAPTER_MEMORY] = 0; | 925 | adapter->got[CMD_CONFIGURE_ADAPTER_MEMORY] = 0; |
919 | if (!send_pcb(dev, &adapter->tx_pcb)) | 926 | if (!send_pcb(dev, &adapter->tx_pcb)) |
920 | printk(KERN_ERR "%s: couldn't send memory configuration command\n", dev->name); | 927 | pr_err("%s: couldn't send memory configuration command\n", dev->name); |
921 | else { | 928 | else { |
922 | unsigned long timeout = jiffies + TIMEOUT; | 929 | unsigned long timeout = jiffies + TIMEOUT; |
923 | while (adapter->got[CMD_CONFIGURE_ADAPTER_MEMORY] == 0 && time_before(jiffies, timeout)); | 930 | while (adapter->got[CMD_CONFIGURE_ADAPTER_MEMORY] == 0 && time_before(jiffies, timeout)); |
@@ -930,13 +937,13 @@ static int elp_open(struct net_device *dev) | |||
930 | * configure adapter to receive broadcast messages and wait for response | 937 | * configure adapter to receive broadcast messages and wait for response |
931 | */ | 938 | */ |
932 | if (elp_debug >= 3) | 939 | if (elp_debug >= 3) |
933 | printk(KERN_DEBUG "%s: sending 82586 configure command\n", dev->name); | 940 | pr_debug("%s: sending 82586 configure command\n", dev->name); |
934 | adapter->tx_pcb.command = CMD_CONFIGURE_82586; | 941 | adapter->tx_pcb.command = CMD_CONFIGURE_82586; |
935 | adapter->tx_pcb.data.configure = NO_LOOPBACK | RECV_BROAD; | 942 | adapter->tx_pcb.data.configure = NO_LOOPBACK | RECV_BROAD; |
936 | adapter->tx_pcb.length = 2; | 943 | adapter->tx_pcb.length = 2; |
937 | adapter->got[CMD_CONFIGURE_82586] = 0; | 944 | adapter->got[CMD_CONFIGURE_82586] = 0; |
938 | if (!send_pcb(dev, &adapter->tx_pcb)) | 945 | if (!send_pcb(dev, &adapter->tx_pcb)) |
939 | printk(KERN_ERR "%s: couldn't send 82586 configure command\n", dev->name); | 946 | pr_err("%s: couldn't send 82586 configure command\n", dev->name); |
940 | else { | 947 | else { |
941 | unsigned long timeout = jiffies + TIMEOUT; | 948 | unsigned long timeout = jiffies + TIMEOUT; |
942 | while (adapter->got[CMD_CONFIGURE_82586] == 0 && time_before(jiffies, timeout)); | 949 | while (adapter->got[CMD_CONFIGURE_82586] == 0 && time_before(jiffies, timeout)); |
@@ -952,7 +959,7 @@ static int elp_open(struct net_device *dev) | |||
952 | */ | 959 | */ |
953 | prime_rx(dev); | 960 | prime_rx(dev); |
954 | if (elp_debug >= 3) | 961 | if (elp_debug >= 3) |
955 | printk(KERN_DEBUG "%s: %d receive PCBs active\n", dev->name, adapter->rx_active); | 962 | pr_debug("%s: %d receive PCBs active\n", dev->name, adapter->rx_active); |
956 | 963 | ||
957 | /* | 964 | /* |
958 | * device is now officially open! | 965 | * device is now officially open! |
@@ -982,7 +989,7 @@ static bool send_packet(struct net_device *dev, struct sk_buff *skb) | |||
982 | 989 | ||
983 | if (test_and_set_bit(0, (void *) &adapter->busy)) { | 990 | if (test_and_set_bit(0, (void *) &adapter->busy)) { |
984 | if (elp_debug >= 2) | 991 | if (elp_debug >= 2) |
985 | printk(KERN_DEBUG "%s: transmit blocked\n", dev->name); | 992 | pr_debug("%s: transmit blocked\n", dev->name); |
986 | return false; | 993 | return false; |
987 | } | 994 | } |
988 | 995 | ||
@@ -1004,7 +1011,7 @@ static bool send_packet(struct net_device *dev, struct sk_buff *skb) | |||
1004 | } | 1011 | } |
1005 | /* if this happens, we die */ | 1012 | /* if this happens, we die */ |
1006 | if (test_and_set_bit(0, (void *) &adapter->dmaing)) | 1013 | if (test_and_set_bit(0, (void *) &adapter->dmaing)) |
1007 | printk(KERN_DEBUG "%s: tx: DMA %d in progress\n", dev->name, adapter->current_dma.direction); | 1014 | pr_debug("%s: tx: DMA %d in progress\n", dev->name, adapter->current_dma.direction); |
1008 | 1015 | ||
1009 | adapter->current_dma.direction = 1; | 1016 | adapter->current_dma.direction = 1; |
1010 | adapter->current_dma.start_time = jiffies; | 1017 | adapter->current_dma.start_time = jiffies; |
@@ -1030,7 +1037,7 @@ static bool send_packet(struct net_device *dev, struct sk_buff *skb) | |||
1030 | release_dma_lock(flags); | 1037 | release_dma_lock(flags); |
1031 | 1038 | ||
1032 | if (elp_debug >= 3) | 1039 | if (elp_debug >= 3) |
1033 | printk(KERN_DEBUG "%s: DMA transfer started\n", dev->name); | 1040 | pr_debug("%s: DMA transfer started\n", dev->name); |
1034 | 1041 | ||
1035 | return true; | 1042 | return true; |
1036 | } | 1043 | } |
@@ -1044,9 +1051,10 @@ static void elp_timeout(struct net_device *dev) | |||
1044 | int stat; | 1051 | int stat; |
1045 | 1052 | ||
1046 | stat = inb_status(dev->base_addr); | 1053 | stat = inb_status(dev->base_addr); |
1047 | printk(KERN_WARNING "%s: transmit timed out, lost %s?\n", dev->name, (stat & ACRF) ? "interrupt" : "command"); | 1054 | pr_warning("%s: transmit timed out, lost %s?\n", dev->name, |
1055 | (stat & ACRF) ? "interrupt" : "command"); | ||
1048 | if (elp_debug >= 1) | 1056 | if (elp_debug >= 1) |
1049 | printk(KERN_DEBUG "%s: status %#02x\n", dev->name, stat); | 1057 | pr_debug("%s: status %#02x\n", dev->name, stat); |
1050 | dev->trans_start = jiffies; | 1058 | dev->trans_start = jiffies; |
1051 | dev->stats.tx_dropped++; | 1059 | dev->stats.tx_dropped++; |
1052 | netif_wake_queue(dev); | 1060 | netif_wake_queue(dev); |
@@ -1068,7 +1076,7 @@ static int elp_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1068 | check_3c505_dma(dev); | 1076 | check_3c505_dma(dev); |
1069 | 1077 | ||
1070 | if (elp_debug >= 3) | 1078 | if (elp_debug >= 3) |
1071 | printk(KERN_DEBUG "%s: request to send packet of length %d\n", dev->name, (int) skb->len); | 1079 | pr_debug("%s: request to send packet of length %d\n", dev->name, (int) skb->len); |
1072 | 1080 | ||
1073 | netif_stop_queue(dev); | 1081 | netif_stop_queue(dev); |
1074 | 1082 | ||
@@ -1077,13 +1085,13 @@ static int elp_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1077 | */ | 1085 | */ |
1078 | if (!send_packet(dev, skb)) { | 1086 | if (!send_packet(dev, skb)) { |
1079 | if (elp_debug >= 2) { | 1087 | if (elp_debug >= 2) { |
1080 | printk(KERN_DEBUG "%s: failed to transmit packet\n", dev->name); | 1088 | pr_debug("%s: failed to transmit packet\n", dev->name); |
1081 | } | 1089 | } |
1082 | spin_unlock_irqrestore(&adapter->lock, flags); | 1090 | spin_unlock_irqrestore(&adapter->lock, flags); |
1083 | return 1; | 1091 | return 1; |
1084 | } | 1092 | } |
1085 | if (elp_debug >= 3) | 1093 | if (elp_debug >= 3) |
1086 | printk(KERN_DEBUG "%s: packet of length %d sent\n", dev->name, (int) skb->len); | 1094 | pr_debug("%s: packet of length %d sent\n", dev->name, (int) skb->len); |
1087 | 1095 | ||
1088 | /* | 1096 | /* |
1089 | * start the transmit timeout | 1097 | * start the transmit timeout |
@@ -1107,7 +1115,7 @@ static struct net_device_stats *elp_get_stats(struct net_device *dev) | |||
1107 | elp_device *adapter = netdev_priv(dev); | 1115 | elp_device *adapter = netdev_priv(dev); |
1108 | 1116 | ||
1109 | if (elp_debug >= 3) | 1117 | if (elp_debug >= 3) |
1110 | printk(KERN_DEBUG "%s: request for stats\n", dev->name); | 1118 | pr_debug("%s: request for stats\n", dev->name); |
1111 | 1119 | ||
1112 | /* If the device is closed, just return the latest stats we have, | 1120 | /* If the device is closed, just return the latest stats we have, |
1113 | - we cannot ask from the adapter without interrupts */ | 1121 | - we cannot ask from the adapter without interrupts */ |
@@ -1119,7 +1127,7 @@ static struct net_device_stats *elp_get_stats(struct net_device *dev) | |||
1119 | adapter->tx_pcb.length = 0; | 1127 | adapter->tx_pcb.length = 0; |
1120 | adapter->got[CMD_NETWORK_STATISTICS] = 0; | 1128 | adapter->got[CMD_NETWORK_STATISTICS] = 0; |
1121 | if (!send_pcb(dev, &adapter->tx_pcb)) | 1129 | if (!send_pcb(dev, &adapter->tx_pcb)) |
1122 | printk(KERN_ERR "%s: couldn't send get statistics command\n", dev->name); | 1130 | pr_err("%s: couldn't send get statistics command\n", dev->name); |
1123 | else { | 1131 | else { |
1124 | unsigned long timeout = jiffies + TIMEOUT; | 1132 | unsigned long timeout = jiffies + TIMEOUT; |
1125 | while (adapter->got[CMD_NETWORK_STATISTICS] == 0 && time_before(jiffies, timeout)); | 1133 | while (adapter->got[CMD_NETWORK_STATISTICS] == 0 && time_before(jiffies, timeout)); |
@@ -1169,7 +1177,7 @@ static int elp_close(struct net_device *dev) | |||
1169 | elp_device *adapter = netdev_priv(dev); | 1177 | elp_device *adapter = netdev_priv(dev); |
1170 | 1178 | ||
1171 | if (elp_debug >= 3) | 1179 | if (elp_debug >= 3) |
1172 | printk(KERN_DEBUG "%s: request to close device\n", dev->name); | 1180 | pr_debug("%s: request to close device\n", dev->name); |
1173 | 1181 | ||
1174 | netif_stop_queue(dev); | 1182 | netif_stop_queue(dev); |
1175 | 1183 | ||
@@ -1213,7 +1221,7 @@ static void elp_set_mc_list(struct net_device *dev) | |||
1213 | unsigned long flags; | 1221 | unsigned long flags; |
1214 | 1222 | ||
1215 | if (elp_debug >= 3) | 1223 | if (elp_debug >= 3) |
1216 | printk(KERN_DEBUG "%s: request to set multicast list\n", dev->name); | 1224 | pr_debug("%s: request to set multicast list\n", dev->name); |
1217 | 1225 | ||
1218 | spin_lock_irqsave(&adapter->lock, flags); | 1226 | spin_lock_irqsave(&adapter->lock, flags); |
1219 | 1227 | ||
@@ -1228,7 +1236,7 @@ static void elp_set_mc_list(struct net_device *dev) | |||
1228 | } | 1236 | } |
1229 | adapter->got[CMD_LOAD_MULTICAST_LIST] = 0; | 1237 | adapter->got[CMD_LOAD_MULTICAST_LIST] = 0; |
1230 | if (!send_pcb(dev, &adapter->tx_pcb)) | 1238 | if (!send_pcb(dev, &adapter->tx_pcb)) |
1231 | printk(KERN_ERR "%s: couldn't send set_multicast command\n", dev->name); | 1239 | pr_err("%s: couldn't send set_multicast command\n", dev->name); |
1232 | else { | 1240 | else { |
1233 | unsigned long timeout = jiffies + TIMEOUT; | 1241 | unsigned long timeout = jiffies + TIMEOUT; |
1234 | while (adapter->got[CMD_LOAD_MULTICAST_LIST] == 0 && time_before(jiffies, timeout)); | 1242 | while (adapter->got[CMD_LOAD_MULTICAST_LIST] == 0 && time_before(jiffies, timeout)); |
@@ -1247,14 +1255,14 @@ static void elp_set_mc_list(struct net_device *dev) | |||
1247 | * and wait for response | 1255 | * and wait for response |
1248 | */ | 1256 | */ |
1249 | if (elp_debug >= 3) | 1257 | if (elp_debug >= 3) |
1250 | printk(KERN_DEBUG "%s: sending 82586 configure command\n", dev->name); | 1258 | pr_debug("%s: sending 82586 configure command\n", dev->name); |
1251 | adapter->tx_pcb.command = CMD_CONFIGURE_82586; | 1259 | adapter->tx_pcb.command = CMD_CONFIGURE_82586; |
1252 | adapter->tx_pcb.length = 2; | 1260 | adapter->tx_pcb.length = 2; |
1253 | adapter->got[CMD_CONFIGURE_82586] = 0; | 1261 | adapter->got[CMD_CONFIGURE_82586] = 0; |
1254 | if (!send_pcb(dev, &adapter->tx_pcb)) | 1262 | if (!send_pcb(dev, &adapter->tx_pcb)) |
1255 | { | 1263 | { |
1256 | spin_unlock_irqrestore(&adapter->lock, flags); | 1264 | spin_unlock_irqrestore(&adapter->lock, flags); |
1257 | printk(KERN_ERR "%s: couldn't send 82586 configure command\n", dev->name); | 1265 | pr_err("%s: couldn't send 82586 configure command\n", dev->name); |
1258 | } | 1266 | } |
1259 | else { | 1267 | else { |
1260 | unsigned long timeout = jiffies + TIMEOUT; | 1268 | unsigned long timeout = jiffies + TIMEOUT; |
@@ -1283,17 +1291,17 @@ static int __init elp_sense(struct net_device *dev) | |||
1283 | orig_HSR = inb_status(addr); | 1291 | orig_HSR = inb_status(addr); |
1284 | 1292 | ||
1285 | if (elp_debug > 0) | 1293 | if (elp_debug > 0) |
1286 | printk(search_msg, name, addr); | 1294 | pr_debug(search_msg, name, addr); |
1287 | 1295 | ||
1288 | if (orig_HSR == 0xff) { | 1296 | if (orig_HSR == 0xff) { |
1289 | if (elp_debug > 0) | 1297 | if (elp_debug > 0) |
1290 | printk(notfound_msg, 1); | 1298 | pr_cont(notfound_msg, 1); |
1291 | goto out; | 1299 | goto out; |
1292 | } | 1300 | } |
1293 | 1301 | ||
1294 | /* Wait for a while; the adapter may still be booting up */ | 1302 | /* Wait for a while; the adapter may still be booting up */ |
1295 | if (elp_debug > 0) | 1303 | if (elp_debug > 0) |
1296 | printk(stilllooking_msg); | 1304 | pr_cont(stilllooking_msg); |
1297 | 1305 | ||
1298 | if (orig_HSR & DIR) { | 1306 | if (orig_HSR & DIR) { |
1299 | /* If HCR.DIR is up, we pull it down. HSR.DIR should follow. */ | 1307 | /* If HCR.DIR is up, we pull it down. HSR.DIR should follow. */ |
@@ -1301,7 +1309,7 @@ static int __init elp_sense(struct net_device *dev) | |||
1301 | msleep(300); | 1309 | msleep(300); |
1302 | if (inb_status(addr) & DIR) { | 1310 | if (inb_status(addr) & DIR) { |
1303 | if (elp_debug > 0) | 1311 | if (elp_debug > 0) |
1304 | printk(notfound_msg, 2); | 1312 | pr_cont(notfound_msg, 2); |
1305 | goto out; | 1313 | goto out; |
1306 | } | 1314 | } |
1307 | } else { | 1315 | } else { |
@@ -1310,7 +1318,7 @@ static int __init elp_sense(struct net_device *dev) | |||
1310 | msleep(300); | 1318 | msleep(300); |
1311 | if (!(inb_status(addr) & DIR)) { | 1319 | if (!(inb_status(addr) & DIR)) { |
1312 | if (elp_debug > 0) | 1320 | if (elp_debug > 0) |
1313 | printk(notfound_msg, 3); | 1321 | pr_cont(notfound_msg, 3); |
1314 | goto out; | 1322 | goto out; |
1315 | } | 1323 | } |
1316 | } | 1324 | } |
@@ -1318,7 +1326,7 @@ static int __init elp_sense(struct net_device *dev) | |||
1318 | * It certainly looks like a 3c505. | 1326 | * It certainly looks like a 3c505. |
1319 | */ | 1327 | */ |
1320 | if (elp_debug > 0) | 1328 | if (elp_debug > 0) |
1321 | printk(found_msg); | 1329 | pr_cont(found_msg); |
1322 | 1330 | ||
1323 | return 0; | 1331 | return 0; |
1324 | out: | 1332 | out: |
@@ -1349,7 +1357,7 @@ static int __init elp_autodetect(struct net_device *dev) | |||
1349 | 1357 | ||
1350 | /* could not find an adapter */ | 1358 | /* could not find an adapter */ |
1351 | if (elp_debug > 0) | 1359 | if (elp_debug > 0) |
1352 | printk(couldnot_msg, dev->name); | 1360 | pr_debug(couldnot_msg, dev->name); |
1353 | 1361 | ||
1354 | return 0; /* Because of this, the layer above will return -ENODEV */ | 1362 | return 0; /* Because of this, the layer above will return -ENODEV */ |
1355 | } | 1363 | } |
@@ -1424,16 +1432,16 @@ static int __init elplus_setup(struct net_device *dev) | |||
1424 | /* Nope, it's ignoring the command register. This means that | 1432 | /* Nope, it's ignoring the command register. This means that |
1425 | * either it's still booting up, or it's died. | 1433 | * either it's still booting up, or it's died. |
1426 | */ | 1434 | */ |
1427 | printk(KERN_ERR "%s: command register wouldn't drain, ", dev->name); | 1435 | pr_err("%s: command register wouldn't drain, ", dev->name); |
1428 | if ((inb_status(dev->base_addr) & 7) == 3) { | 1436 | if ((inb_status(dev->base_addr) & 7) == 3) { |
1429 | /* If the adapter status is 3, it *could* still be booting. | 1437 | /* If the adapter status is 3, it *could* still be booting. |
1430 | * Give it the benefit of the doubt for 10 seconds. | 1438 | * Give it the benefit of the doubt for 10 seconds. |
1431 | */ | 1439 | */ |
1432 | printk("assuming 3c505 still starting\n"); | 1440 | pr_cont("assuming 3c505 still starting\n"); |
1433 | timeout = jiffies + 10*HZ; | 1441 | timeout = jiffies + 10*HZ; |
1434 | while (time_before(jiffies, timeout) && (inb_status(dev->base_addr) & 7)); | 1442 | while (time_before(jiffies, timeout) && (inb_status(dev->base_addr) & 7)); |
1435 | if (inb_status(dev->base_addr) & 7) { | 1443 | if (inb_status(dev->base_addr) & 7) { |
1436 | printk(KERN_ERR "%s: 3c505 failed to start\n", dev->name); | 1444 | pr_err("%s: 3c505 failed to start\n", dev->name); |
1437 | } else { | 1445 | } else { |
1438 | okay = 1; /* It started */ | 1446 | okay = 1; /* It started */ |
1439 | } | 1447 | } |
@@ -1441,7 +1449,7 @@ static int __init elplus_setup(struct net_device *dev) | |||
1441 | /* Otherwise, it must just be in a strange | 1449 | /* Otherwise, it must just be in a strange |
1442 | * state. We probably need to kick it. | 1450 | * state. We probably need to kick it. |
1443 | */ | 1451 | */ |
1444 | printk("3c505 is sulking\n"); | 1452 | pr_cont("3c505 is sulking\n"); |
1445 | } | 1453 | } |
1446 | } | 1454 | } |
1447 | for (tries = 0; tries < 5 && okay; tries++) { | 1455 | for (tries = 0; tries < 5 && okay; tries++) { |
@@ -1454,18 +1462,19 @@ static int __init elplus_setup(struct net_device *dev) | |||
1454 | adapter->tx_pcb.length = 0; | 1462 | adapter->tx_pcb.length = 0; |
1455 | cookie = probe_irq_on(); | 1463 | cookie = probe_irq_on(); |
1456 | if (!send_pcb(dev, &adapter->tx_pcb)) { | 1464 | if (!send_pcb(dev, &adapter->tx_pcb)) { |
1457 | printk(KERN_ERR "%s: could not send first PCB\n", dev->name); | 1465 | pr_err("%s: could not send first PCB\n", dev->name); |
1458 | probe_irq_off(cookie); | 1466 | probe_irq_off(cookie); |
1459 | continue; | 1467 | continue; |
1460 | } | 1468 | } |
1461 | if (!receive_pcb(dev, &adapter->rx_pcb)) { | 1469 | if (!receive_pcb(dev, &adapter->rx_pcb)) { |
1462 | printk(KERN_ERR "%s: could not read first PCB\n", dev->name); | 1470 | pr_err("%s: could not read first PCB\n", dev->name); |
1463 | probe_irq_off(cookie); | 1471 | probe_irq_off(cookie); |
1464 | continue; | 1472 | continue; |
1465 | } | 1473 | } |
1466 | if ((adapter->rx_pcb.command != CMD_ADDRESS_RESPONSE) || | 1474 | if ((adapter->rx_pcb.command != CMD_ADDRESS_RESPONSE) || |
1467 | (adapter->rx_pcb.length != 6)) { | 1475 | (adapter->rx_pcb.length != 6)) { |
1468 | printk(KERN_ERR "%s: first PCB wrong (%d, %d)\n", dev->name, adapter->rx_pcb.command, adapter->rx_pcb.length); | 1476 | pr_err("%s: first PCB wrong (%d, %d)\n", dev->name, |
1477 | adapter->rx_pcb.command, adapter->rx_pcb.length); | ||
1469 | probe_irq_off(cookie); | 1478 | probe_irq_off(cookie); |
1470 | continue; | 1479 | continue; |
1471 | } | 1480 | } |
@@ -1474,32 +1483,32 @@ static int __init elplus_setup(struct net_device *dev) | |||
1474 | /* It's broken. Do a hard reset to re-initialise the board, | 1483 | /* It's broken. Do a hard reset to re-initialise the board, |
1475 | * and try again. | 1484 | * and try again. |
1476 | */ | 1485 | */ |
1477 | printk(KERN_INFO "%s: resetting adapter\n", dev->name); | 1486 | pr_info("%s: resetting adapter\n", dev->name); |
1478 | outb_control(adapter->hcr_val | FLSH | ATTN, dev); | 1487 | outb_control(adapter->hcr_val | FLSH | ATTN, dev); |
1479 | outb_control(adapter->hcr_val & ~(FLSH | ATTN), dev); | 1488 | outb_control(adapter->hcr_val & ~(FLSH | ATTN), dev); |
1480 | } | 1489 | } |
1481 | printk(KERN_ERR "%s: failed to initialise 3c505\n", dev->name); | 1490 | pr_err("%s: failed to initialise 3c505\n", dev->name); |
1482 | goto out; | 1491 | goto out; |
1483 | 1492 | ||
1484 | okay: | 1493 | okay: |
1485 | if (dev->irq) { /* Is there a preset IRQ? */ | 1494 | if (dev->irq) { /* Is there a preset IRQ? */ |
1486 | int rpt = probe_irq_off(cookie); | 1495 | int rpt = probe_irq_off(cookie); |
1487 | if (dev->irq != rpt) { | 1496 | if (dev->irq != rpt) { |
1488 | printk(KERN_WARNING "%s: warning, irq %d configured but %d detected\n", dev->name, dev->irq, rpt); | 1497 | pr_warning("%s: warning, irq %d configured but %d detected\n", dev->name, dev->irq, rpt); |
1489 | } | 1498 | } |
1490 | /* if dev->irq == probe_irq_off(cookie), all is well */ | 1499 | /* if dev->irq == probe_irq_off(cookie), all is well */ |
1491 | } else /* No preset IRQ; just use what we can detect */ | 1500 | } else /* No preset IRQ; just use what we can detect */ |
1492 | dev->irq = probe_irq_off(cookie); | 1501 | dev->irq = probe_irq_off(cookie); |
1493 | switch (dev->irq) { /* Legal, sane? */ | 1502 | switch (dev->irq) { /* Legal, sane? */ |
1494 | case 0: | 1503 | case 0: |
1495 | printk(KERN_ERR "%s: IRQ probe failed: check 3c505 jumpers.\n", | 1504 | pr_err("%s: IRQ probe failed: check 3c505 jumpers.\n", |
1496 | dev->name); | 1505 | dev->name); |
1497 | goto out; | 1506 | goto out; |
1498 | case 1: | 1507 | case 1: |
1499 | case 6: | 1508 | case 6: |
1500 | case 8: | 1509 | case 8: |
1501 | case 13: | 1510 | case 13: |
1502 | printk(KERN_ERR "%s: Impossible IRQ %d reported by probe_irq_off().\n", | 1511 | pr_err("%s: Impossible IRQ %d reported by probe_irq_off().\n", |
1503 | dev->name, dev->irq); | 1512 | dev->name, dev->irq); |
1504 | goto out; | 1513 | goto out; |
1505 | } | 1514 | } |
@@ -1521,7 +1530,7 @@ static int __init elplus_setup(struct net_device *dev) | |||
1521 | dev->dma = dev->mem_start & 7; | 1530 | dev->dma = dev->mem_start & 7; |
1522 | } | 1531 | } |
1523 | else { | 1532 | else { |
1524 | printk(KERN_WARNING "%s: warning, DMA channel not specified, using default\n", dev->name); | 1533 | pr_warning("%s: warning, DMA channel not specified, using default\n", dev->name); |
1525 | dev->dma = ELP_DMA; | 1534 | dev->dma = ELP_DMA; |
1526 | } | 1535 | } |
1527 | } | 1536 | } |
@@ -1529,11 +1538,8 @@ static int __init elplus_setup(struct net_device *dev) | |||
1529 | /* | 1538 | /* |
1530 | * print remainder of startup message | 1539 | * print remainder of startup message |
1531 | */ | 1540 | */ |
1532 | printk(KERN_INFO "%s: 3c505 at %#lx, irq %d, dma %d, " | 1541 | pr_info("%s: 3c505 at %#lx, irq %d, dma %d, addr %pM, ", |
1533 | "addr %pM, ", | 1542 | dev->name, dev->base_addr, dev->irq, dev->dma, dev->dev_addr); |
1534 | dev->name, dev->base_addr, dev->irq, dev->dma, | ||
1535 | dev->dev_addr); | ||
1536 | |||
1537 | /* | 1543 | /* |
1538 | * read more information from the adapter | 1544 | * read more information from the adapter |
1539 | */ | 1545 | */ |
@@ -1544,9 +1550,10 @@ static int __init elplus_setup(struct net_device *dev) | |||
1544 | !receive_pcb(dev, &adapter->rx_pcb) || | 1550 | !receive_pcb(dev, &adapter->rx_pcb) || |
1545 | (adapter->rx_pcb.command != CMD_ADAPTER_INFO_RESPONSE) || | 1551 | (adapter->rx_pcb.command != CMD_ADAPTER_INFO_RESPONSE) || |
1546 | (adapter->rx_pcb.length != 10)) { | 1552 | (adapter->rx_pcb.length != 10)) { |
1547 | printk("not responding to second PCB\n"); | 1553 | pr_cont("not responding to second PCB\n"); |
1548 | } | 1554 | } |
1549 | printk("rev %d.%d, %dk\n", adapter->rx_pcb.data.info.major_vers, adapter->rx_pcb.data.info.minor_vers, adapter->rx_pcb.data.info.RAM_sz); | 1555 | pr_cont("rev %d.%d, %dk\n", adapter->rx_pcb.data.info.major_vers, |
1556 | adapter->rx_pcb.data.info.minor_vers, adapter->rx_pcb.data.info.RAM_sz); | ||
1550 | 1557 | ||
1551 | /* | 1558 | /* |
1552 | * reconfigure the adapter memory to better suit our purposes | 1559 | * reconfigure the adapter memory to better suit our purposes |
@@ -1563,10 +1570,10 @@ static int __init elplus_setup(struct net_device *dev) | |||
1563 | !receive_pcb(dev, &adapter->rx_pcb) || | 1570 | !receive_pcb(dev, &adapter->rx_pcb) || |
1564 | (adapter->rx_pcb.command != CMD_CONFIGURE_ADAPTER_RESPONSE) || | 1571 | (adapter->rx_pcb.command != CMD_CONFIGURE_ADAPTER_RESPONSE) || |
1565 | (adapter->rx_pcb.length != 2)) { | 1572 | (adapter->rx_pcb.length != 2)) { |
1566 | printk(KERN_ERR "%s: could not configure adapter memory\n", dev->name); | 1573 | pr_err("%s: could not configure adapter memory\n", dev->name); |
1567 | } | 1574 | } |
1568 | if (adapter->rx_pcb.data.configure) { | 1575 | if (adapter->rx_pcb.data.configure) { |
1569 | printk(KERN_ERR "%s: adapter configuration failed\n", dev->name); | 1576 | pr_err("%s: adapter configuration failed\n", dev->name); |
1570 | } | 1577 | } |
1571 | 1578 | ||
1572 | dev->netdev_ops = &elp_netdev_ops; | 1579 | dev->netdev_ops = &elp_netdev_ops; |
@@ -1631,17 +1638,17 @@ int __init init_module(void) | |||
1631 | dev->dma = dma[this_dev]; | 1638 | dev->dma = dma[this_dev]; |
1632 | } else { | 1639 | } else { |
1633 | dev->dma = ELP_DMA; | 1640 | dev->dma = ELP_DMA; |
1634 | printk(KERN_WARNING "3c505.c: warning, using default DMA channel,\n"); | 1641 | pr_warning("3c505.c: warning, using default DMA channel,\n"); |
1635 | } | 1642 | } |
1636 | if (io[this_dev] == 0) { | 1643 | if (io[this_dev] == 0) { |
1637 | if (this_dev) { | 1644 | if (this_dev) { |
1638 | free_netdev(dev); | 1645 | free_netdev(dev); |
1639 | break; | 1646 | break; |
1640 | } | 1647 | } |
1641 | printk(KERN_NOTICE "3c505.c: module autoprobe not recommended, give io=xx.\n"); | 1648 | pr_notice("3c505.c: module autoprobe not recommended, give io=xx.\n"); |
1642 | } | 1649 | } |
1643 | if (elplus_setup(dev) != 0) { | 1650 | if (elplus_setup(dev) != 0) { |
1644 | printk(KERN_WARNING "3c505.c: Failed to register card at 0x%x.\n", io[this_dev]); | 1651 | pr_warning("3c505.c: Failed to register card at 0x%x.\n", io[this_dev]); |
1645 | free_netdev(dev); | 1652 | free_netdev(dev); |
1646 | break; | 1653 | break; |
1647 | } | 1654 | } |
diff --git a/drivers/net/3c507.c b/drivers/net/3c507.c index fbbaf826deff..96b86659381a 100644 --- a/drivers/net/3c507.c +++ b/drivers/net/3c507.c | |||
@@ -364,7 +364,7 @@ static const struct net_device_ops netdev_ops = { | |||
364 | 364 | ||
365 | static int __init el16_probe1(struct net_device *dev, int ioaddr) | 365 | static int __init el16_probe1(struct net_device *dev, int ioaddr) |
366 | { | 366 | { |
367 | static unsigned char init_ID_done, version_printed; | 367 | static unsigned char init_ID_done; |
368 | int i, irq, irqval, retval; | 368 | int i, irq, irqval, retval; |
369 | struct net_local *lp; | 369 | struct net_local *lp; |
370 | 370 | ||
@@ -391,10 +391,7 @@ static int __init el16_probe1(struct net_device *dev, int ioaddr) | |||
391 | goto out; | 391 | goto out; |
392 | } | 392 | } |
393 | 393 | ||
394 | if (net_debug && version_printed++ == 0) | 394 | pr_info("%s: 3c507 at %#x,", dev->name, ioaddr); |
395 | printk(version); | ||
396 | |||
397 | printk("%s: 3c507 at %#x,", dev->name, ioaddr); | ||
398 | 395 | ||
399 | /* We should make a few more checks here, like the first three octets of | 396 | /* We should make a few more checks here, like the first three octets of |
400 | the S.A. for the manufacturer's code. */ | 397 | the S.A. for the manufacturer's code. */ |
@@ -403,7 +400,8 @@ static int __init el16_probe1(struct net_device *dev, int ioaddr) | |||
403 | 400 | ||
404 | irqval = request_irq(irq, &el16_interrupt, 0, DRV_NAME, dev); | 401 | irqval = request_irq(irq, &el16_interrupt, 0, DRV_NAME, dev); |
405 | if (irqval) { | 402 | if (irqval) { |
406 | printk(KERN_ERR "3c507: unable to get IRQ %d (irqval=%d).\n", irq, irqval); | 403 | pr_cont("\n"); |
404 | pr_err("3c507: unable to get IRQ %d (irqval=%d).\n", irq, irqval); | ||
407 | retval = -EAGAIN; | 405 | retval = -EAGAIN; |
408 | goto out; | 406 | goto out; |
409 | } | 407 | } |
@@ -414,7 +412,7 @@ static int __init el16_probe1(struct net_device *dev, int ioaddr) | |||
414 | outb(0x01, ioaddr + MISC_CTRL); | 412 | outb(0x01, ioaddr + MISC_CTRL); |
415 | for (i = 0; i < 6; i++) | 413 | for (i = 0; i < 6; i++) |
416 | dev->dev_addr[i] = inb(ioaddr + i); | 414 | dev->dev_addr[i] = inb(ioaddr + i); |
417 | printk(" %pM", dev->dev_addr); | 415 | pr_cont(" %pM", dev->dev_addr); |
418 | 416 | ||
419 | if (mem_start) | 417 | if (mem_start) |
420 | net_debug = mem_start & 7; | 418 | net_debug = mem_start & 7; |
@@ -443,18 +441,18 @@ static int __init el16_probe1(struct net_device *dev, int ioaddr) | |||
443 | dev->if_port = (inb(ioaddr + ROM_CONFIG) & 0x80) ? 1 : 0; | 441 | dev->if_port = (inb(ioaddr + ROM_CONFIG) & 0x80) ? 1 : 0; |
444 | dev->irq = inb(ioaddr + IRQ_CONFIG) & 0x0f; | 442 | dev->irq = inb(ioaddr + IRQ_CONFIG) & 0x0f; |
445 | 443 | ||
446 | printk(", IRQ %d, %sternal xcvr, memory %#lx-%#lx.\n", dev->irq, | 444 | pr_cont(", IRQ %d, %sternal xcvr, memory %#lx-%#lx.\n", dev->irq, |
447 | dev->if_port ? "ex" : "in", dev->mem_start, dev->mem_end-1); | 445 | dev->if_port ? "ex" : "in", dev->mem_start, dev->mem_end-1); |
448 | 446 | ||
449 | if (net_debug) | 447 | if (net_debug) |
450 | printk(version); | 448 | pr_debug("%s", version); |
451 | 449 | ||
452 | lp = netdev_priv(dev); | 450 | lp = netdev_priv(dev); |
453 | memset(lp, 0, sizeof(*lp)); | 451 | memset(lp, 0, sizeof(*lp)); |
454 | spin_lock_init(&lp->lock); | 452 | spin_lock_init(&lp->lock); |
455 | lp->base = ioremap(dev->mem_start, RX_BUF_END); | 453 | lp->base = ioremap(dev->mem_start, RX_BUF_END); |
456 | if (!lp->base) { | 454 | if (!lp->base) { |
457 | printk(KERN_ERR "3c507: unable to remap memory\n"); | 455 | pr_err("3c507: unable to remap memory\n"); |
458 | retval = -EAGAIN; | 456 | retval = -EAGAIN; |
459 | goto out1; | 457 | goto out1; |
460 | } | 458 | } |
@@ -488,20 +486,20 @@ static void el16_tx_timeout (struct net_device *dev) | |||
488 | void __iomem *shmem = lp->base; | 486 | void __iomem *shmem = lp->base; |
489 | 487 | ||
490 | if (net_debug > 1) | 488 | if (net_debug > 1) |
491 | printk ("%s: transmit timed out, %s? ", dev->name, | 489 | pr_debug("%s: transmit timed out, %s? ", dev->name, |
492 | readw(shmem + iSCB_STATUS) & 0x8000 ? "IRQ conflict" : | 490 | readw(shmem + iSCB_STATUS) & 0x8000 ? "IRQ conflict" : |
493 | "network cable problem"); | 491 | "network cable problem"); |
494 | /* Try to restart the adaptor. */ | 492 | /* Try to restart the adaptor. */ |
495 | if (lp->last_restart == dev->stats.tx_packets) { | 493 | if (lp->last_restart == dev->stats.tx_packets) { |
496 | if (net_debug > 1) | 494 | if (net_debug > 1) |
497 | printk ("Resetting board.\n"); | 495 | pr_cont("Resetting board.\n"); |
498 | /* Completely reset the adaptor. */ | 496 | /* Completely reset the adaptor. */ |
499 | init_82586_mem (dev); | 497 | init_82586_mem (dev); |
500 | lp->tx_pkts_in_ring = 0; | 498 | lp->tx_pkts_in_ring = 0; |
501 | } else { | 499 | } else { |
502 | /* Issue the channel attention signal and hope it "gets better". */ | 500 | /* Issue the channel attention signal and hope it "gets better". */ |
503 | if (net_debug > 1) | 501 | if (net_debug > 1) |
504 | printk ("Kicking board.\n"); | 502 | pr_cont("Kicking board.\n"); |
505 | writew(0xf000 | CUC_START | RX_START, shmem + iSCB_CMD); | 503 | writew(0xf000 | CUC_START | RX_START, shmem + iSCB_CMD); |
506 | outb (0, ioaddr + SIGNAL_CA); /* Issue channel-attn. */ | 504 | outb (0, ioaddr + SIGNAL_CA); /* Issue channel-attn. */ |
507 | lp->last_restart = dev->stats.tx_packets; | 505 | lp->last_restart = dev->stats.tx_packets; |
@@ -553,7 +551,8 @@ static irqreturn_t el16_interrupt(int irq, void *dev_id) | |||
553 | void __iomem *shmem; | 551 | void __iomem *shmem; |
554 | 552 | ||
555 | if (dev == NULL) { | 553 | if (dev == NULL) { |
556 | printk ("net_interrupt(): irq %d for unknown device.\n", irq); | 554 | pr_err("%s: net_interrupt(): irq %d for unknown device.\n", |
555 | dev->name, irq); | ||
557 | return IRQ_NONE; | 556 | return IRQ_NONE; |
558 | } | 557 | } |
559 | 558 | ||
@@ -566,7 +565,7 @@ static irqreturn_t el16_interrupt(int irq, void *dev_id) | |||
566 | status = readw(shmem+iSCB_STATUS); | 565 | status = readw(shmem+iSCB_STATUS); |
567 | 566 | ||
568 | if (net_debug > 4) { | 567 | if (net_debug > 4) { |
569 | printk("%s: 3c507 interrupt, status %4.4x.\n", dev->name, status); | 568 | pr_debug("%s: 3c507 interrupt, status %4.4x.\n", dev->name, status); |
570 | } | 569 | } |
571 | 570 | ||
572 | /* Disable the 82586's input to the interrupt line. */ | 571 | /* Disable the 82586's input to the interrupt line. */ |
@@ -577,7 +576,7 @@ static irqreturn_t el16_interrupt(int irq, void *dev_id) | |||
577 | unsigned short tx_status = readw(shmem+lp->tx_reap); | 576 | unsigned short tx_status = readw(shmem+lp->tx_reap); |
578 | if (!(tx_status & 0x8000)) { | 577 | if (!(tx_status & 0x8000)) { |
579 | if (net_debug > 5) | 578 | if (net_debug > 5) |
580 | printk("Tx command incomplete (%#x).\n", lp->tx_reap); | 579 | pr_debug("Tx command incomplete (%#x).\n", lp->tx_reap); |
581 | break; | 580 | break; |
582 | } | 581 | } |
583 | /* Tx unsuccessful or some interesting status bit set. */ | 582 | /* Tx unsuccessful or some interesting status bit set. */ |
@@ -591,7 +590,7 @@ static irqreturn_t el16_interrupt(int irq, void *dev_id) | |||
591 | } | 590 | } |
592 | dev->stats.tx_packets++; | 591 | dev->stats.tx_packets++; |
593 | if (net_debug > 5) | 592 | if (net_debug > 5) |
594 | printk("Reaped %x, Tx status %04x.\n" , lp->tx_reap, tx_status); | 593 | pr_debug("Reaped %x, Tx status %04x.\n" , lp->tx_reap, tx_status); |
595 | lp->tx_reap += TX_BUF_SIZE; | 594 | lp->tx_reap += TX_BUF_SIZE; |
596 | if (lp->tx_reap > RX_BUF_START - TX_BUF_SIZE) | 595 | if (lp->tx_reap > RX_BUF_START - TX_BUF_SIZE) |
597 | lp->tx_reap = TX_BUF_START; | 596 | lp->tx_reap = TX_BUF_START; |
@@ -606,7 +605,7 @@ static irqreturn_t el16_interrupt(int irq, void *dev_id) | |||
606 | 605 | ||
607 | if (status & 0x4000) { /* Packet received. */ | 606 | if (status & 0x4000) { /* Packet received. */ |
608 | if (net_debug > 5) | 607 | if (net_debug > 5) |
609 | printk("Received packet, rx_head %04x.\n", lp->rx_head); | 608 | pr_debug("Received packet, rx_head %04x.\n", lp->rx_head); |
610 | el16_rx(dev); | 609 | el16_rx(dev); |
611 | } | 610 | } |
612 | 611 | ||
@@ -615,7 +614,7 @@ static irqreturn_t el16_interrupt(int irq, void *dev_id) | |||
615 | 614 | ||
616 | if ((status & 0x0700) != 0x0200 && netif_running(dev)) { | 615 | if ((status & 0x0700) != 0x0200 && netif_running(dev)) { |
617 | if (net_debug) | 616 | if (net_debug) |
618 | printk("%s: Command unit stopped, status %04x, restarting.\n", | 617 | pr_debug("%s: Command unit stopped, status %04x, restarting.\n", |
619 | dev->name, status); | 618 | dev->name, status); |
620 | /* If this ever occurs we should really re-write the idle loop, reset | 619 | /* If this ever occurs we should really re-write the idle loop, reset |
621 | the Tx list, and do a complete restart of the command unit. | 620 | the Tx list, and do a complete restart of the command unit. |
@@ -627,7 +626,7 @@ static irqreturn_t el16_interrupt(int irq, void *dev_id) | |||
627 | /* The Rx unit is not ready, it must be hung. Restart the receiver by | 626 | /* The Rx unit is not ready, it must be hung. Restart the receiver by |
628 | initializing the rx buffers, and issuing an Rx start command. */ | 627 | initializing the rx buffers, and issuing an Rx start command. */ |
629 | if (net_debug) | 628 | if (net_debug) |
630 | printk("%s: Rx unit stopped, status %04x, restarting.\n", | 629 | pr_debug("%s: Rx unit stopped, status %04x, restarting.\n", |
631 | dev->name, status); | 630 | dev->name, status); |
632 | init_rx_bufs(dev); | 631 | init_rx_bufs(dev); |
633 | writew(RX_BUF_START,shmem+iSCB_RFA); | 632 | writew(RX_BUF_START,shmem+iSCB_RFA); |
@@ -753,9 +752,8 @@ static void init_82586_mem(struct net_device *dev) | |||
753 | int boguscnt = 50; | 752 | int boguscnt = 50; |
754 | while (readw(shmem+iSCB_STATUS) == 0) | 753 | while (readw(shmem+iSCB_STATUS) == 0) |
755 | if (--boguscnt == 0) { | 754 | if (--boguscnt == 0) { |
756 | printk("%s: i82586 initialization timed out with status %04x, " | 755 | pr_warning("%s: i82586 initialization timed out with status %04x, cmd %04x.\n", |
757 | "cmd %04x.\n", dev->name, | 756 | dev->name, readw(shmem+iSCB_STATUS), readw(shmem+iSCB_CMD)); |
758 | readw(shmem+iSCB_STATUS), readw(shmem+iSCB_CMD)); | ||
759 | break; | 757 | break; |
760 | } | 758 | } |
761 | /* Issue channel-attn -- the 82586 won't start. */ | 759 | /* Issue channel-attn -- the 82586 won't start. */ |
@@ -765,7 +763,7 @@ static void init_82586_mem(struct net_device *dev) | |||
765 | /* Disable loopback and enable interrupts. */ | 763 | /* Disable loopback and enable interrupts. */ |
766 | outb(0x84, ioaddr + MISC_CTRL); | 764 | outb(0x84, ioaddr + MISC_CTRL); |
767 | if (net_debug > 4) | 765 | if (net_debug > 4) |
768 | printk("%s: Initialized 82586, status %04x.\n", dev->name, | 766 | pr_debug("%s: Initialized 82586, status %04x.\n", dev->name, |
769 | readw(shmem+iSCB_STATUS)); | 767 | readw(shmem+iSCB_STATUS)); |
770 | return; | 768 | return; |
771 | } | 769 | } |
@@ -810,7 +808,7 @@ static void hardware_send_packet(struct net_device *dev, void *buf, short length | |||
810 | lp->tx_head = TX_BUF_START; | 808 | lp->tx_head = TX_BUF_START; |
811 | 809 | ||
812 | if (net_debug > 4) { | 810 | if (net_debug > 4) { |
813 | printk("%s: 3c507 @%x send length = %d, tx_block %3x, next %3x.\n", | 811 | pr_debug("%s: 3c507 @%x send length = %d, tx_block %3x, next %3x.\n", |
814 | dev->name, ioaddr, length, tx_block, lp->tx_head); | 812 | dev->name, ioaddr, length, tx_block, lp->tx_head); |
815 | } | 813 | } |
816 | 814 | ||
@@ -838,7 +836,7 @@ static void el16_rx(struct net_device *dev) | |||
838 | 836 | ||
839 | if (rfd_cmd != 0 || data_buffer_addr != rx_head + 22 | 837 | if (rfd_cmd != 0 || data_buffer_addr != rx_head + 22 |
840 | || (pkt_len & 0xC000) != 0xC000) { | 838 | || (pkt_len & 0xC000) != 0xC000) { |
841 | printk(KERN_ERR "%s: Rx frame at %#x corrupted, " | 839 | pr_err("%s: Rx frame at %#x corrupted, " |
842 | "status %04x cmd %04x next %04x " | 840 | "status %04x cmd %04x next %04x " |
843 | "data-buf @%04x %04x.\n", | 841 | "data-buf @%04x %04x.\n", |
844 | dev->name, rx_head, frame_status, rfd_cmd, | 842 | dev->name, rx_head, frame_status, rfd_cmd, |
@@ -858,8 +856,7 @@ static void el16_rx(struct net_device *dev) | |||
858 | pkt_len &= 0x3fff; | 856 | pkt_len &= 0x3fff; |
859 | skb = dev_alloc_skb(pkt_len+2); | 857 | skb = dev_alloc_skb(pkt_len+2); |
860 | if (skb == NULL) { | 858 | if (skb == NULL) { |
861 | printk(KERN_ERR "%s: Memory squeeze, " | 859 | pr_err("%s: Memory squeeze, dropping packet.\n", |
862 | "dropping packet.\n", | ||
863 | dev->name); | 860 | dev->name); |
864 | dev->stats.rx_dropped++; | 861 | dev->stats.rx_dropped++; |
865 | break; | 862 | break; |
@@ -926,7 +923,7 @@ MODULE_PARM_DESC(irq, "(ignored)"); | |||
926 | int __init init_module(void) | 923 | int __init init_module(void) |
927 | { | 924 | { |
928 | if (io == 0) | 925 | if (io == 0) |
929 | printk("3c507: You should not use auto-probing with insmod!\n"); | 926 | pr_notice("3c507: You should not use auto-probing with insmod!\n"); |
930 | dev_3c507 = el16_probe(-1); | 927 | dev_3c507 = el16_probe(-1); |
931 | return IS_ERR(dev_3c507) ? PTR_ERR(dev_3c507) : 0; | 928 | return IS_ERR(dev_3c507) ? PTR_ERR(dev_3c507) : 0; |
932 | } | 929 | } |
diff --git a/drivers/net/3c509.c b/drivers/net/3c509.c index 393e4e711965..8d9aa49de145 100644 --- a/drivers/net/3c509.c +++ b/drivers/net/3c509.c | |||
@@ -257,7 +257,7 @@ static int el3_isa_id_sequence(__be16 *phys_addr) | |||
257 | && !memcmp(phys_addr, el3_devs[i]->dev_addr, | 257 | && !memcmp(phys_addr, el3_devs[i]->dev_addr, |
258 | ETH_ALEN)) { | 258 | ETH_ALEN)) { |
259 | if (el3_debug > 3) | 259 | if (el3_debug > 3) |
260 | printk(KERN_DEBUG "3c509 with address %02x %02x %02x %02x %02x %02x was found by ISAPnP\n", | 260 | pr_debug("3c509 with address %02x %02x %02x %02x %02x %02x was found by ISAPnP\n", |
261 | phys_addr[0] & 0xff, phys_addr[0] >> 8, | 261 | phys_addr[0] & 0xff, phys_addr[0] >> 8, |
262 | phys_addr[1] & 0xff, phys_addr[1] >> 8, | 262 | phys_addr[1] & 0xff, phys_addr[1] >> 8, |
263 | phys_addr[2] & 0xff, phys_addr[2] >> 8); | 263 | phys_addr[2] & 0xff, phys_addr[2] >> 8); |
@@ -574,19 +574,18 @@ static int __devinit el3_common_init(struct net_device *dev) | |||
574 | 574 | ||
575 | err = register_netdev(dev); | 575 | err = register_netdev(dev); |
576 | if (err) { | 576 | if (err) { |
577 | printk(KERN_ERR "Failed to register 3c5x9 at %#3.3lx, IRQ %d.\n", | 577 | pr_err("Failed to register 3c5x9 at %#3.3lx, IRQ %d.\n", |
578 | dev->base_addr, dev->irq); | 578 | dev->base_addr, dev->irq); |
579 | release_region(dev->base_addr, EL3_IO_EXTENT); | 579 | release_region(dev->base_addr, EL3_IO_EXTENT); |
580 | return err; | 580 | return err; |
581 | } | 581 | } |
582 | 582 | ||
583 | printk(KERN_INFO "%s: 3c5x9 found at %#3.3lx, %s port, " | 583 | pr_info("%s: 3c5x9 found at %#3.3lx, %s port, address %pM, IRQ %d.\n", |
584 | "address %pM, IRQ %d.\n", | ||
585 | dev->name, dev->base_addr, if_names[(dev->if_port & 0x03)], | 584 | dev->name, dev->base_addr, if_names[(dev->if_port & 0x03)], |
586 | dev->dev_addr, dev->irq); | 585 | dev->dev_addr, dev->irq); |
587 | 586 | ||
588 | if (el3_debug > 0) | 587 | if (el3_debug > 0) |
589 | printk(KERN_INFO "%s", version); | 588 | pr_info("%s", version); |
590 | return 0; | 589 | return 0; |
591 | 590 | ||
592 | } | 591 | } |
@@ -625,8 +624,8 @@ static int __init el3_mca_probe(struct device *device) | |||
625 | irq = pos5 & 0x0f; | 624 | irq = pos5 & 0x0f; |
626 | 625 | ||
627 | 626 | ||
628 | printk(KERN_INFO "3c529: found %s at slot %d\n", | 627 | pr_info("3c529: found %s at slot %d\n", |
629 | el3_mca_adapter_names[mdev->index], slot + 1); | 628 | el3_mca_adapter_names[mdev->index], slot + 1); |
630 | 629 | ||
631 | /* claim the slot */ | 630 | /* claim the slot */ |
632 | strncpy(mdev->name, el3_mca_adapter_names[mdev->index], | 631 | strncpy(mdev->name, el3_mca_adapter_names[mdev->index], |
@@ -638,7 +637,7 @@ static int __init el3_mca_probe(struct device *device) | |||
638 | irq = mca_device_transform_irq(mdev, irq); | 637 | irq = mca_device_transform_irq(mdev, irq); |
639 | ioaddr = mca_device_transform_ioport(mdev, ioaddr); | 638 | ioaddr = mca_device_transform_ioport(mdev, ioaddr); |
640 | if (el3_debug > 2) { | 639 | if (el3_debug > 2) { |
641 | printk(KERN_DEBUG "3c529: irq %d ioaddr 0x%x ifport %d\n", irq, ioaddr, if_port); | 640 | pr_debug("3c529: irq %d ioaddr 0x%x ifport %d\n", irq, ioaddr, if_port); |
642 | } | 641 | } |
643 | EL3WINDOW(0); | 642 | EL3WINDOW(0); |
644 | for (i = 0; i < 3; i++) | 643 | for (i = 0; i < 3; i++) |
@@ -761,7 +760,7 @@ static ushort id_read_eeprom(int index) | |||
761 | word = (word << 1) + (inb(id_port) & 0x01); | 760 | word = (word << 1) + (inb(id_port) & 0x01); |
762 | 761 | ||
763 | if (el3_debug > 3) | 762 | if (el3_debug > 3) |
764 | printk(KERN_DEBUG " 3c509 EEPROM word %d %#4.4x.\n", index, word); | 763 | pr_debug(" 3c509 EEPROM word %d %#4.4x.\n", index, word); |
765 | 764 | ||
766 | return word; | 765 | return word; |
767 | } | 766 | } |
@@ -783,13 +782,13 @@ el3_open(struct net_device *dev) | |||
783 | 782 | ||
784 | EL3WINDOW(0); | 783 | EL3WINDOW(0); |
785 | if (el3_debug > 3) | 784 | if (el3_debug > 3) |
786 | printk(KERN_DEBUG "%s: Opening, IRQ %d status@%x %4.4x.\n", dev->name, | 785 | pr_debug("%s: Opening, IRQ %d status@%x %4.4x.\n", dev->name, |
787 | dev->irq, ioaddr + EL3_STATUS, inw(ioaddr + EL3_STATUS)); | 786 | dev->irq, ioaddr + EL3_STATUS, inw(ioaddr + EL3_STATUS)); |
788 | 787 | ||
789 | el3_up(dev); | 788 | el3_up(dev); |
790 | 789 | ||
791 | if (el3_debug > 3) | 790 | if (el3_debug > 3) |
792 | printk(KERN_DEBUG "%s: Opened 3c509 IRQ %d status %4.4x.\n", | 791 | pr_debug("%s: Opened 3c509 IRQ %d status %4.4x.\n", |
793 | dev->name, dev->irq, inw(ioaddr + EL3_STATUS)); | 792 | dev->name, dev->irq, inw(ioaddr + EL3_STATUS)); |
794 | 793 | ||
795 | return 0; | 794 | return 0; |
@@ -801,8 +800,7 @@ el3_tx_timeout (struct net_device *dev) | |||
801 | int ioaddr = dev->base_addr; | 800 | int ioaddr = dev->base_addr; |
802 | 801 | ||
803 | /* Transmitter timeout, serious problems. */ | 802 | /* Transmitter timeout, serious problems. */ |
804 | printk(KERN_WARNING "%s: transmit timed out, Tx_status %2.2x status %4.4x " | 803 | pr_warning("%s: transmit timed out, Tx_status %2.2x status %4.4x Tx FIFO room %d.\n", |
805 | "Tx FIFO room %d.\n", | ||
806 | dev->name, inb(ioaddr + TX_STATUS), inw(ioaddr + EL3_STATUS), | 804 | dev->name, inb(ioaddr + TX_STATUS), inw(ioaddr + EL3_STATUS), |
807 | inw(ioaddr + TX_FREE)); | 805 | inw(ioaddr + TX_FREE)); |
808 | dev->stats.tx_errors++; | 806 | dev->stats.tx_errors++; |
@@ -826,7 +824,7 @@ el3_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
826 | dev->stats.tx_bytes += skb->len; | 824 | dev->stats.tx_bytes += skb->len; |
827 | 825 | ||
828 | if (el3_debug > 4) { | 826 | if (el3_debug > 4) { |
829 | printk(KERN_DEBUG "%s: el3_start_xmit(length = %u) called, status %4.4x.\n", | 827 | pr_debug("%s: el3_start_xmit(length = %u) called, status %4.4x.\n", |
830 | dev->name, skb->len, inw(ioaddr + EL3_STATUS)); | 828 | dev->name, skb->len, inw(ioaddr + EL3_STATUS)); |
831 | } | 829 | } |
832 | #if 0 | 830 | #if 0 |
@@ -835,7 +833,7 @@ el3_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
835 | ushort status = inw(ioaddr + EL3_STATUS); | 833 | ushort status = inw(ioaddr + EL3_STATUS); |
836 | if (status & 0x0001 /* IRQ line active, missed one. */ | 834 | if (status & 0x0001 /* IRQ line active, missed one. */ |
837 | && inw(ioaddr + EL3_STATUS) & 1) { /* Make sure. */ | 835 | && inw(ioaddr + EL3_STATUS) & 1) { /* Make sure. */ |
838 | printk(KERN_DEBUG "%s: Missed interrupt, status then %04x now %04x" | 836 | pr_debug("%s: Missed interrupt, status then %04x now %04x" |
839 | " Tx %2.2x Rx %4.4x.\n", dev->name, status, | 837 | " Tx %2.2x Rx %4.4x.\n", dev->name, status, |
840 | inw(ioaddr + EL3_STATUS), inb(ioaddr + TX_STATUS), | 838 | inw(ioaddr + EL3_STATUS), inb(ioaddr + TX_STATUS), |
841 | inw(ioaddr + RX_STATUS)); | 839 | inw(ioaddr + RX_STATUS)); |
@@ -909,7 +907,7 @@ el3_interrupt(int irq, void *dev_id) | |||
909 | 907 | ||
910 | if (el3_debug > 4) { | 908 | if (el3_debug > 4) { |
911 | status = inw(ioaddr + EL3_STATUS); | 909 | status = inw(ioaddr + EL3_STATUS); |
912 | printk(KERN_DEBUG "%s: interrupt, status %4.4x.\n", dev->name, status); | 910 | pr_debug("%s: interrupt, status %4.4x.\n", dev->name, status); |
913 | } | 911 | } |
914 | 912 | ||
915 | while ((status = inw(ioaddr + EL3_STATUS)) & | 913 | while ((status = inw(ioaddr + EL3_STATUS)) & |
@@ -920,7 +918,7 @@ el3_interrupt(int irq, void *dev_id) | |||
920 | 918 | ||
921 | if (status & TxAvailable) { | 919 | if (status & TxAvailable) { |
922 | if (el3_debug > 5) | 920 | if (el3_debug > 5) |
923 | printk(KERN_DEBUG " TX room bit was handled.\n"); | 921 | pr_debug(" TX room bit was handled.\n"); |
924 | /* There's room in the FIFO for a full-sized packet. */ | 922 | /* There's room in the FIFO for a full-sized packet. */ |
925 | outw(AckIntr | TxAvailable, ioaddr + EL3_CMD); | 923 | outw(AckIntr | TxAvailable, ioaddr + EL3_CMD); |
926 | netif_wake_queue (dev); | 924 | netif_wake_queue (dev); |
@@ -958,7 +956,7 @@ el3_interrupt(int irq, void *dev_id) | |||
958 | } | 956 | } |
959 | 957 | ||
960 | if (--i < 0) { | 958 | if (--i < 0) { |
961 | printk(KERN_ERR "%s: Infinite loop in interrupt, status %4.4x.\n", | 959 | pr_err("%s: Infinite loop in interrupt, status %4.4x.\n", |
962 | dev->name, status); | 960 | dev->name, status); |
963 | /* Clear all interrupts. */ | 961 | /* Clear all interrupts. */ |
964 | outw(AckIntr | 0xFF, ioaddr + EL3_CMD); | 962 | outw(AckIntr | 0xFF, ioaddr + EL3_CMD); |
@@ -969,7 +967,7 @@ el3_interrupt(int irq, void *dev_id) | |||
969 | } | 967 | } |
970 | 968 | ||
971 | if (el3_debug > 4) { | 969 | if (el3_debug > 4) { |
972 | printk(KERN_DEBUG "%s: exiting interrupt, status %4.4x.\n", dev->name, | 970 | pr_debug("%s: exiting interrupt, status %4.4x.\n", dev->name, |
973 | inw(ioaddr + EL3_STATUS)); | 971 | inw(ioaddr + EL3_STATUS)); |
974 | } | 972 | } |
975 | spin_unlock(&lp->lock); | 973 | spin_unlock(&lp->lock); |
@@ -1017,7 +1015,7 @@ static void update_stats(struct net_device *dev) | |||
1017 | int ioaddr = dev->base_addr; | 1015 | int ioaddr = dev->base_addr; |
1018 | 1016 | ||
1019 | if (el3_debug > 5) | 1017 | if (el3_debug > 5) |
1020 | printk(" Updating the statistics.\n"); | 1018 | pr_debug(" Updating the statistics.\n"); |
1021 | /* Turn off statistics updates while reading. */ | 1019 | /* Turn off statistics updates while reading. */ |
1022 | outw(StatsDisable, ioaddr + EL3_CMD); | 1020 | outw(StatsDisable, ioaddr + EL3_CMD); |
1023 | /* Switch to the stats window, and read everything. */ | 1021 | /* Switch to the stats window, and read everything. */ |
@@ -1047,7 +1045,7 @@ el3_rx(struct net_device *dev) | |||
1047 | short rx_status; | 1045 | short rx_status; |
1048 | 1046 | ||
1049 | if (el3_debug > 5) | 1047 | if (el3_debug > 5) |
1050 | printk(" In rx_packet(), status %4.4x, rx_status %4.4x.\n", | 1048 | pr_debug(" In rx_packet(), status %4.4x, rx_status %4.4x.\n", |
1051 | inw(ioaddr+EL3_STATUS), inw(ioaddr+RX_STATUS)); | 1049 | inw(ioaddr+EL3_STATUS), inw(ioaddr+RX_STATUS)); |
1052 | while ((rx_status = inw(ioaddr + RX_STATUS)) > 0) { | 1050 | while ((rx_status = inw(ioaddr + RX_STATUS)) > 0) { |
1053 | if (rx_status & 0x4000) { /* Error, update stats. */ | 1051 | if (rx_status & 0x4000) { /* Error, update stats. */ |
@@ -1069,7 +1067,7 @@ el3_rx(struct net_device *dev) | |||
1069 | 1067 | ||
1070 | skb = dev_alloc_skb(pkt_len+5); | 1068 | skb = dev_alloc_skb(pkt_len+5); |
1071 | if (el3_debug > 4) | 1069 | if (el3_debug > 4) |
1072 | printk("Receiving packet size %d status %4.4x.\n", | 1070 | pr_debug("Receiving packet size %d status %4.4x.\n", |
1073 | pkt_len, rx_status); | 1071 | pkt_len, rx_status); |
1074 | if (skb != NULL) { | 1072 | if (skb != NULL) { |
1075 | skb_reserve(skb, 2); /* Align IP on 16 byte */ | 1073 | skb_reserve(skb, 2); /* Align IP on 16 byte */ |
@@ -1088,12 +1086,12 @@ el3_rx(struct net_device *dev) | |||
1088 | outw(RxDiscard, ioaddr + EL3_CMD); | 1086 | outw(RxDiscard, ioaddr + EL3_CMD); |
1089 | dev->stats.rx_dropped++; | 1087 | dev->stats.rx_dropped++; |
1090 | if (el3_debug) | 1088 | if (el3_debug) |
1091 | printk("%s: Couldn't allocate a sk_buff of size %d.\n", | 1089 | pr_debug("%s: Couldn't allocate a sk_buff of size %d.\n", |
1092 | dev->name, pkt_len); | 1090 | dev->name, pkt_len); |
1093 | } | 1091 | } |
1094 | inw(ioaddr + EL3_STATUS); /* Delay. */ | 1092 | inw(ioaddr + EL3_STATUS); /* Delay. */ |
1095 | while (inw(ioaddr + EL3_STATUS) & 0x1000) | 1093 | while (inw(ioaddr + EL3_STATUS) & 0x1000) |
1096 | printk(KERN_DEBUG " Waiting for 3c509 to discard packet, status %x.\n", | 1094 | pr_debug(" Waiting for 3c509 to discard packet, status %x.\n", |
1097 | inw(ioaddr + EL3_STATUS) ); | 1095 | inw(ioaddr + EL3_STATUS) ); |
1098 | } | 1096 | } |
1099 | 1097 | ||
@@ -1114,7 +1112,7 @@ set_multicast_list(struct net_device *dev) | |||
1114 | static int old; | 1112 | static int old; |
1115 | if (old != dev->mc_count) { | 1113 | if (old != dev->mc_count) { |
1116 | old = dev->mc_count; | 1114 | old = dev->mc_count; |
1117 | printk("%s: Setting Rx mode to %d addresses.\n", dev->name, dev->mc_count); | 1115 | pr_debug("%s: Setting Rx mode to %d addresses.\n", dev->name, dev->mc_count); |
1118 | } | 1116 | } |
1119 | } | 1117 | } |
1120 | spin_lock_irqsave(&lp->lock, flags); | 1118 | spin_lock_irqsave(&lp->lock, flags); |
@@ -1137,7 +1135,7 @@ el3_close(struct net_device *dev) | |||
1137 | struct el3_private *lp = netdev_priv(dev); | 1135 | struct el3_private *lp = netdev_priv(dev); |
1138 | 1136 | ||
1139 | if (el3_debug > 2) | 1137 | if (el3_debug > 2) |
1140 | printk("%s: Shutting down ethercard.\n", dev->name); | 1138 | pr_debug("%s: Shutting down ethercard.\n", dev->name); |
1141 | 1139 | ||
1142 | el3_down(dev); | 1140 | el3_down(dev); |
1143 | 1141 | ||
@@ -1384,30 +1382,30 @@ el3_up(struct net_device *dev) | |||
1384 | EL3WINDOW(4); | 1382 | EL3WINDOW(4); |
1385 | net_diag = inw(ioaddr + WN4_NETDIAG); | 1383 | net_diag = inw(ioaddr + WN4_NETDIAG); |
1386 | net_diag = (net_diag | FD_ENABLE); /* temporarily assume full-duplex will be set */ | 1384 | net_diag = (net_diag | FD_ENABLE); /* temporarily assume full-duplex will be set */ |
1387 | printk("%s: ", dev->name); | 1385 | pr_info("%s: ", dev->name); |
1388 | switch (dev->if_port & 0x0c) { | 1386 | switch (dev->if_port & 0x0c) { |
1389 | case 12: | 1387 | case 12: |
1390 | /* force full-duplex mode if 3c5x9b */ | 1388 | /* force full-duplex mode if 3c5x9b */ |
1391 | if (sw_info & 0x000f) { | 1389 | if (sw_info & 0x000f) { |
1392 | printk("Forcing 3c5x9b full-duplex mode"); | 1390 | pr_cont("Forcing 3c5x9b full-duplex mode"); |
1393 | break; | 1391 | break; |
1394 | } | 1392 | } |
1395 | case 8: | 1393 | case 8: |
1396 | /* set full-duplex mode based on eeprom config setting */ | 1394 | /* set full-duplex mode based on eeprom config setting */ |
1397 | if ((sw_info & 0x000f) && (sw_info & 0x8000)) { | 1395 | if ((sw_info & 0x000f) && (sw_info & 0x8000)) { |
1398 | printk("Setting 3c5x9b full-duplex mode (from EEPROM configuration bit)"); | 1396 | pr_cont("Setting 3c5x9b full-duplex mode (from EEPROM configuration bit)"); |
1399 | break; | 1397 | break; |
1400 | } | 1398 | } |
1401 | default: | 1399 | default: |
1402 | /* xcvr=(0 || 4) OR user has an old 3c5x9 non "B" model */ | 1400 | /* xcvr=(0 || 4) OR user has an old 3c5x9 non "B" model */ |
1403 | printk("Setting 3c5x9/3c5x9B half-duplex mode"); | 1401 | pr_cont("Setting 3c5x9/3c5x9B half-duplex mode"); |
1404 | net_diag = (net_diag & ~FD_ENABLE); /* disable full duplex */ | 1402 | net_diag = (net_diag & ~FD_ENABLE); /* disable full duplex */ |
1405 | } | 1403 | } |
1406 | 1404 | ||
1407 | outw(net_diag, ioaddr + WN4_NETDIAG); | 1405 | outw(net_diag, ioaddr + WN4_NETDIAG); |
1408 | printk(" if_port: %d, sw_info: %4.4x\n", dev->if_port, sw_info); | 1406 | pr_cont(" if_port: %d, sw_info: %4.4x\n", dev->if_port, sw_info); |
1409 | if (el3_debug > 3) | 1407 | if (el3_debug > 3) |
1410 | printk("%s: 3c5x9 net diag word is now: %4.4x.\n", dev->name, net_diag); | 1408 | pr_debug("%s: 3c5x9 net diag word is now: %4.4x.\n", dev->name, net_diag); |
1411 | /* Enable link beat and jabber check. */ | 1409 | /* Enable link beat and jabber check. */ |
1412 | outw(inw(ioaddr + WN4_MEDIA) | MEDIA_TP, ioaddr + WN4_MEDIA); | 1410 | outw(inw(ioaddr + WN4_MEDIA) | MEDIA_TP, ioaddr + WN4_MEDIA); |
1413 | } | 1411 | } |
@@ -1535,7 +1533,7 @@ static int __init el3_init_module(void) | |||
1535 | } | 1533 | } |
1536 | if (id_port >= 0x200) { | 1534 | if (id_port >= 0x200) { |
1537 | id_port = 0; | 1535 | id_port = 0; |
1538 | printk(KERN_ERR "No I/O port available for 3c509 activation.\n"); | 1536 | pr_err("No I/O port available for 3c509 activation.\n"); |
1539 | } else { | 1537 | } else { |
1540 | ret = isa_register_driver(&el3_isa_driver, EL3_MAX_CARDS); | 1538 | ret = isa_register_driver(&el3_isa_driver, EL3_MAX_CARDS); |
1541 | if (!ret) | 1539 | if (!ret) |