aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/lib8390.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-06-22 16:38:55 -0400
committerDavid S. Miller <davem@davemloft.net>2011-06-24 20:31:36 -0400
commit840f63933983a1d873c5b2f85d2e169bb94e3c19 (patch)
tree03fb739401e4857856d357a1ef4b44f70ce8c3c6 /drivers/net/lib8390.c
parent747e252fa1a061cf63d12ed68ac937cf53a4fe4e (diff)
lib8390: Use pr_<level> and netdev_<level>
Use the current logging styles. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/lib8390.c')
-rw-r--r--drivers/net/lib8390.c86
1 files changed, 43 insertions, 43 deletions
diff --git a/drivers/net/lib8390.c b/drivers/net/lib8390.c
index 70eb2077bd22..59d5414eb45f 100644
--- a/drivers/net/lib8390.c
+++ b/drivers/net/lib8390.c
@@ -267,9 +267,10 @@ static void __ei_tx_timeout(struct net_device *dev)
267 isr = ei_inb(e8390_base+EN0_ISR); 267 isr = ei_inb(e8390_base+EN0_ISR);
268 spin_unlock_irqrestore(&ei_local->page_lock, flags); 268 spin_unlock_irqrestore(&ei_local->page_lock, flags);
269 269
270 printk(KERN_DEBUG "%s: Tx timed out, %s TSR=%#2x, ISR=%#2x, t=%d.\n", 270 netdev_dbg(dev, "Tx timed out, %s TSR=%#2x, ISR=%#2x, t=%d\n",
271 dev->name, (txsr & ENTSR_ABT) ? "excess collisions." : 271 (txsr & ENTSR_ABT) ? "excess collisions." :
272 (isr) ? "lost interrupt?" : "cable problem?", txsr, isr, tickssofar); 272 (isr) ? "lost interrupt?" : "cable problem?",
273 txsr, isr, tickssofar);
273 274
274 if (!isr && !dev->stats.tx_packets) 275 if (!isr && !dev->stats.tx_packets)
275 { 276 {
@@ -349,22 +350,22 @@ static netdev_tx_t __ei_start_xmit(struct sk_buff *skb,
349 output_page = ei_local->tx_start_page; 350 output_page = ei_local->tx_start_page;
350 ei_local->tx1 = send_length; 351 ei_local->tx1 = send_length;
351 if (ei_debug && ei_local->tx2 > 0) 352 if (ei_debug && ei_local->tx2 > 0)
352 printk(KERN_DEBUG "%s: idle transmitter tx2=%d, lasttx=%d, txing=%d.\n", 353 netdev_dbg(dev, "idle transmitter tx2=%d, lasttx=%d, txing=%d\n",
353 dev->name, ei_local->tx2, ei_local->lasttx, ei_local->txing); 354 ei_local->tx2, ei_local->lasttx, ei_local->txing);
354 } 355 }
355 else if (ei_local->tx2 == 0) 356 else if (ei_local->tx2 == 0)
356 { 357 {
357 output_page = ei_local->tx_start_page + TX_PAGES/2; 358 output_page = ei_local->tx_start_page + TX_PAGES/2;
358 ei_local->tx2 = send_length; 359 ei_local->tx2 = send_length;
359 if (ei_debug && ei_local->tx1 > 0) 360 if (ei_debug && ei_local->tx1 > 0)
360 printk(KERN_DEBUG "%s: idle transmitter, tx1=%d, lasttx=%d, txing=%d.\n", 361 netdev_dbg(dev, "idle transmitter, tx1=%d, lasttx=%d, txing=%d\n",
361 dev->name, ei_local->tx1, ei_local->lasttx, ei_local->txing); 362 ei_local->tx1, ei_local->lasttx, ei_local->txing);
362 } 363 }
363 else 364 else
364 { /* We should never get here. */ 365 { /* We should never get here. */
365 if (ei_debug) 366 if (ei_debug)
366 printk(KERN_DEBUG "%s: No Tx buffers free! tx1=%d tx2=%d last=%d\n", 367 netdev_dbg(dev, "No Tx buffers free! tx1=%d tx2=%d last=%d\n",
367 dev->name, ei_local->tx1, ei_local->tx2, ei_local->lasttx); 368 ei_local->tx1, ei_local->tx2, ei_local->lasttx);
368 ei_local->irqlock = 0; 369 ei_local->irqlock = 0;
369 netif_stop_queue(dev); 370 netif_stop_queue(dev);
370 ei_outb_p(ENISR_ALL, e8390_base + EN0_IMR); 371 ei_outb_p(ENISR_ALL, e8390_base + EN0_IMR);
@@ -448,9 +449,8 @@ static irqreturn_t __ei_interrupt(int irq, void *dev_id)
448 * This might just be an interrupt for a PCI device sharing 449 * This might just be an interrupt for a PCI device sharing
449 * this line 450 * this line
450 */ 451 */
451 printk("%s: Interrupted while interrupts are masked!" 452 netdev_err(dev, "Interrupted while interrupts are masked! isr=%#2x imr=%#2x\n",
452 " isr=%#2x imr=%#2x.\n", 453 ei_inb_p(e8390_base + EN0_ISR),
453 dev->name, ei_inb_p(e8390_base + EN0_ISR),
454 ei_inb_p(e8390_base + EN0_IMR)); 454 ei_inb_p(e8390_base + EN0_IMR));
455 spin_unlock(&ei_local->page_lock); 455 spin_unlock(&ei_local->page_lock);
456 return IRQ_NONE; 456 return IRQ_NONE;
@@ -459,7 +459,7 @@ static irqreturn_t __ei_interrupt(int irq, void *dev_id)
459 /* Change to page 0 and read the intr status reg. */ 459 /* Change to page 0 and read the intr status reg. */
460 ei_outb_p(E8390_NODMA+E8390_PAGE0, e8390_base + E8390_CMD); 460 ei_outb_p(E8390_NODMA+E8390_PAGE0, e8390_base + E8390_CMD);
461 if (ei_debug > 3) 461 if (ei_debug > 3)
462 printk(KERN_DEBUG "%s: interrupt(isr=%#2.2x).\n", dev->name, 462 netdev_dbg(dev, "interrupt(isr=%#2.2x)\n",
463 ei_inb_p(e8390_base + EN0_ISR)); 463 ei_inb_p(e8390_base + EN0_ISR));
464 464
465 /* !!Assumption!! -- we stay in page 0. Don't break this. */ 465 /* !!Assumption!! -- we stay in page 0. Don't break this. */
@@ -467,7 +467,7 @@ static irqreturn_t __ei_interrupt(int irq, void *dev_id)
467 ++nr_serviced < MAX_SERVICE) 467 ++nr_serviced < MAX_SERVICE)
468 { 468 {
469 if (!netif_running(dev)) { 469 if (!netif_running(dev)) {
470 printk(KERN_WARNING "%s: interrupt from stopped card\n", dev->name); 470 netdev_warn(dev, "interrupt from stopped card\n");
471 /* rmk - acknowledge the interrupts */ 471 /* rmk - acknowledge the interrupts */
472 ei_outb_p(interrupts, e8390_base + EN0_ISR); 472 ei_outb_p(interrupts, e8390_base + EN0_ISR);
473 interrupts = 0; 473 interrupts = 0;
@@ -510,11 +510,11 @@ static irqreturn_t __ei_interrupt(int irq, void *dev_id)
510 { 510 {
511 /* 0xFF is valid for a card removal */ 511 /* 0xFF is valid for a card removal */
512 if(interrupts!=0xFF) 512 if(interrupts!=0xFF)
513 printk(KERN_WARNING "%s: Too much work at interrupt, status %#2.2x\n", 513 netdev_warn(dev, "Too much work at interrupt, status %#2.2x\n",
514 dev->name, interrupts); 514 interrupts);
515 ei_outb_p(ENISR_ALL, e8390_base + EN0_ISR); /* Ack. most intrs. */ 515 ei_outb_p(ENISR_ALL, e8390_base + EN0_ISR); /* Ack. most intrs. */
516 } else { 516 } else {
517 printk(KERN_WARNING "%s: unknown interrupt %#2x\n", dev->name, interrupts); 517 netdev_warn(dev, "unknown interrupt %#2x\n", interrupts);
518 ei_outb_p(0xff, e8390_base + EN0_ISR); /* Ack. all intrs. */ 518 ei_outb_p(0xff, e8390_base + EN0_ISR); /* Ack. all intrs. */
519 } 519 }
520 } 520 }
@@ -554,18 +554,18 @@ static void ei_tx_err(struct net_device *dev)
554 unsigned char tx_was_aborted = txsr & (ENTSR_ABT+ENTSR_FU); 554 unsigned char tx_was_aborted = txsr & (ENTSR_ABT+ENTSR_FU);
555 555
556#ifdef VERBOSE_ERROR_DUMP 556#ifdef VERBOSE_ERROR_DUMP
557 printk(KERN_DEBUG "%s: transmitter error (%#2x): ", dev->name, txsr); 557 netdev_dbg(dev, "transmitter error (%#2x):", txsr);
558 if (txsr & ENTSR_ABT) 558 if (txsr & ENTSR_ABT)
559 printk("excess-collisions "); 559 pr_cont(" excess-collisions ");
560 if (txsr & ENTSR_ND) 560 if (txsr & ENTSR_ND)
561 printk("non-deferral "); 561 pr_cont(" non-deferral ");
562 if (txsr & ENTSR_CRS) 562 if (txsr & ENTSR_CRS)
563 printk("lost-carrier "); 563 pr_cont(" lost-carrier ");
564 if (txsr & ENTSR_FU) 564 if (txsr & ENTSR_FU)
565 printk("FIFO-underrun "); 565 pr_cont(" FIFO-underrun ");
566 if (txsr & ENTSR_CDH) 566 if (txsr & ENTSR_CDH)
567 printk("lost-heartbeat "); 567 pr_cont(" lost-heartbeat ");
568 printk("\n"); 568 pr_cont("\n");
569#endif 569#endif
570 570
571 ei_outb_p(ENISR_TX_ERR, e8390_base + EN0_ISR); /* Ack intr. */ 571 ei_outb_p(ENISR_TX_ERR, e8390_base + EN0_ISR); /* Ack intr. */
@@ -606,8 +606,8 @@ static void ei_tx_intr(struct net_device *dev)
606 if (ei_local->tx1 < 0) 606 if (ei_local->tx1 < 0)
607 { 607 {
608 if (ei_local->lasttx != 1 && ei_local->lasttx != -1) 608 if (ei_local->lasttx != 1 && ei_local->lasttx != -1)
609 printk(KERN_ERR "%s: bogus last_tx_buffer %d, tx1=%d.\n", 609 pr_err("%s: bogus last_tx_buffer %d, tx1=%d\n",
610 ei_local->name, ei_local->lasttx, ei_local->tx1); 610 ei_local->name, ei_local->lasttx, ei_local->tx1);
611 ei_local->tx1 = 0; 611 ei_local->tx1 = 0;
612 if (ei_local->tx2 > 0) 612 if (ei_local->tx2 > 0)
613 { 613 {
@@ -622,8 +622,8 @@ static void ei_tx_intr(struct net_device *dev)
622 else if (ei_local->tx2 < 0) 622 else if (ei_local->tx2 < 0)
623 { 623 {
624 if (ei_local->lasttx != 2 && ei_local->lasttx != -2) 624 if (ei_local->lasttx != 2 && ei_local->lasttx != -2)
625 printk("%s: bogus last_tx_buffer %d, tx2=%d.\n", 625 pr_err("%s: bogus last_tx_buffer %d, tx2=%d\n",
626 ei_local->name, ei_local->lasttx, ei_local->tx2); 626 ei_local->name, ei_local->lasttx, ei_local->tx2);
627 ei_local->tx2 = 0; 627 ei_local->tx2 = 0;
628 if (ei_local->tx1 > 0) 628 if (ei_local->tx1 > 0)
629 { 629 {
@@ -703,8 +703,8 @@ static void ei_receive(struct net_device *dev)
703 is that some clones crash in roughly the same way. 703 is that some clones crash in roughly the same way.
704 */ 704 */
705 if (ei_debug > 0 && this_frame != ei_local->current_page && (this_frame!=0x0 || rxing_page!=0xFF)) 705 if (ei_debug > 0 && this_frame != ei_local->current_page && (this_frame!=0x0 || rxing_page!=0xFF))
706 printk(KERN_ERR "%s: mismatched read page pointers %2x vs %2x.\n", 706 netdev_err(dev, "mismatched read page pointers %2x vs %2x\n",
707 dev->name, this_frame, ei_local->current_page); 707 this_frame, ei_local->current_page);
708 708
709 if (this_frame == rxing_page) /* Read all the frames? */ 709 if (this_frame == rxing_page) /* Read all the frames? */
710 break; /* Done for now */ 710 break; /* Done for now */
@@ -733,8 +733,8 @@ static void ei_receive(struct net_device *dev)
733 if (pkt_len < 60 || pkt_len > 1518) 733 if (pkt_len < 60 || pkt_len > 1518)
734 { 734 {
735 if (ei_debug) 735 if (ei_debug)
736 printk(KERN_DEBUG "%s: bogus packet size: %d, status=%#2x nxpg=%#2x.\n", 736 netdev_dbg(dev, "bogus packet size: %d, status=%#2x nxpg=%#2x\n",
737 dev->name, rx_frame.count, rx_frame.status, 737 rx_frame.count, rx_frame.status,
738 rx_frame.next); 738 rx_frame.next);
739 dev->stats.rx_errors++; 739 dev->stats.rx_errors++;
740 dev->stats.rx_length_errors++; 740 dev->stats.rx_length_errors++;
@@ -747,8 +747,8 @@ static void ei_receive(struct net_device *dev)
747 if (skb == NULL) 747 if (skb == NULL)
748 { 748 {
749 if (ei_debug > 1) 749 if (ei_debug > 1)
750 printk(KERN_DEBUG "%s: Couldn't allocate a sk_buff of size %d.\n", 750 netdev_dbg(dev, "Couldn't allocate a sk_buff of size %d\n",
751 dev->name, pkt_len); 751 pkt_len);
752 dev->stats.rx_dropped++; 752 dev->stats.rx_dropped++;
753 break; 753 break;
754 } 754 }
@@ -769,8 +769,8 @@ static void ei_receive(struct net_device *dev)
769 else 769 else
770 { 770 {
771 if (ei_debug) 771 if (ei_debug)
772 printk(KERN_DEBUG "%s: bogus packet: status=%#2x nxpg=%#2x size=%d\n", 772 netdev_dbg(dev, "bogus packet: status=%#2x nxpg=%#2x size=%d\n",
773 dev->name, rx_frame.status, rx_frame.next, 773 rx_frame.status, rx_frame.next,
774 rx_frame.count); 774 rx_frame.count);
775 dev->stats.rx_errors++; 775 dev->stats.rx_errors++;
776 /* NB: The NIC counts CRC, frame and missed errors. */ 776 /* NB: The NIC counts CRC, frame and missed errors. */
@@ -781,8 +781,8 @@ static void ei_receive(struct net_device *dev)
781 781
782 /* This _should_ never happen: it's here for avoiding bad clones. */ 782 /* This _should_ never happen: it's here for avoiding bad clones. */
783 if (next_frame >= ei_local->stop_page) { 783 if (next_frame >= ei_local->stop_page) {
784 printk("%s: next frame inconsistency, %#2x\n", dev->name, 784 netdev_notice(dev, "next frame inconsistency, %#2x\n",
785 next_frame); 785 next_frame);
786 next_frame = ei_local->rx_start_page; 786 next_frame = ei_local->rx_start_page;
787 } 787 }
788 ei_local->current_page = next_frame; 788 ei_local->current_page = next_frame;
@@ -822,7 +822,7 @@ static void ei_rx_overrun(struct net_device *dev)
822 ei_outb_p(E8390_NODMA+E8390_PAGE0+E8390_STOP, e8390_base+E8390_CMD); 822 ei_outb_p(E8390_NODMA+E8390_PAGE0+E8390_STOP, e8390_base+E8390_CMD);
823 823
824 if (ei_debug > 1) 824 if (ei_debug > 1)
825 printk(KERN_DEBUG "%s: Receiver overrun.\n", dev->name); 825 netdev_dbg(dev, "Receiver overrun\n");
826 dev->stats.rx_over_errors++; 826 dev->stats.rx_over_errors++;
827 827
828 /* 828 /*
@@ -960,7 +960,8 @@ static void do_set_multicast_list(struct net_device *dev)
960 ei_outb_p(ei_local->mcfilter[i], e8390_base + EN1_MULT_SHIFT(i)); 960 ei_outb_p(ei_local->mcfilter[i], e8390_base + EN1_MULT_SHIFT(i));
961#ifndef BUG_83C690 961#ifndef BUG_83C690
962 if(ei_inb_p(e8390_base + EN1_MULT_SHIFT(i))!=ei_local->mcfilter[i]) 962 if(ei_inb_p(e8390_base + EN1_MULT_SHIFT(i))!=ei_local->mcfilter[i])
963 printk(KERN_ERR "Multicast filter read/write mismap %d\n",i); 963 netdev_err(dev, "Multicast filter read/write mismap %d\n",
964 i);
964#endif 965#endif
965 } 966 }
966 ei_outb_p(E8390_NODMA + E8390_PAGE0, e8390_base + E8390_CMD); 967 ei_outb_p(E8390_NODMA + E8390_PAGE0, e8390_base + E8390_CMD);
@@ -1072,7 +1073,7 @@ static void __NS8390_init(struct net_device *dev, int startp)
1072 { 1073 {
1073 ei_outb_p(dev->dev_addr[i], e8390_base + EN1_PHYS_SHIFT(i)); 1074 ei_outb_p(dev->dev_addr[i], e8390_base + EN1_PHYS_SHIFT(i));
1074 if (ei_debug > 1 && ei_inb_p(e8390_base + EN1_PHYS_SHIFT(i))!=dev->dev_addr[i]) 1075 if (ei_debug > 1 && ei_inb_p(e8390_base + EN1_PHYS_SHIFT(i))!=dev->dev_addr[i])
1075 printk(KERN_ERR "Hw. address read/write mismap %d\n",i); 1076 netdev_err(dev, "Hw. address read/write mismap %d\n", i);
1076 } 1077 }
1077 1078
1078 ei_outb_p(ei_local->rx_start_page, e8390_base + EN1_CURPAG); 1079 ei_outb_p(ei_local->rx_start_page, e8390_base + EN1_CURPAG);
@@ -1106,8 +1107,7 @@ static void NS8390_trigger_send(struct net_device *dev, unsigned int length,
1106 1107
1107 if (ei_inb_p(e8390_base + E8390_CMD) & E8390_TRANS) 1108 if (ei_inb_p(e8390_base + E8390_CMD) & E8390_TRANS)
1108 { 1109 {
1109 printk(KERN_WARNING "%s: trigger_send() called with the transmitter busy.\n", 1110 netdev_warn(dev, "trigger_send() called with the transmitter busy\n");
1110 dev->name);
1111 return; 1111 return;
1112 } 1112 }
1113 ei_outb_p(length & 0xff, e8390_base + EN0_TCNTLO); 1113 ei_outb_p(length & 0xff, e8390_base + EN0_TCNTLO);