diff options
| -rw-r--r-- | drivers/net/tulip/21142.c | 14 | ||||
| -rw-r--r-- | drivers/net/tulip/Makefile | 2 | ||||
| -rw-r--r-- | drivers/net/tulip/de2104x.c | 47 | ||||
| -rw-r--r-- | drivers/net/tulip/interrupt.c | 48 | ||||
| -rw-r--r-- | drivers/net/tulip/media.c | 49 | ||||
| -rw-r--r-- | drivers/net/tulip/pnic.c | 22 | ||||
| -rw-r--r-- | drivers/net/tulip/pnic2.c | 16 | ||||
| -rw-r--r-- | drivers/net/tulip/timer.c | 47 | ||||
| -rw-r--r-- | drivers/net/tulip/tulip.h | 8 | ||||
| -rw-r--r-- | drivers/net/tulip/tulip_core.c | 20 | ||||
| -rw-r--r-- | drivers/net/tulip/winbond-840.c | 73 | ||||
| -rw-r--r-- | drivers/net/tulip/xircom_cb.c | 2 |
12 files changed, 166 insertions, 182 deletions
diff --git a/drivers/net/tulip/21142.c b/drivers/net/tulip/21142.c index 007d8e75666d..092c3faa882a 100644 --- a/drivers/net/tulip/21142.c +++ b/drivers/net/tulip/21142.c | |||
| @@ -122,8 +122,8 @@ void t21142_start_nway(struct net_device *dev) | |||
| 122 | tp->nway = tp->mediasense = 1; | 122 | tp->nway = tp->mediasense = 1; |
| 123 | tp->nwayset = tp->lpar = 0; | 123 | tp->nwayset = tp->lpar = 0; |
| 124 | if (tulip_debug > 1) | 124 | if (tulip_debug > 1) |
| 125 | printk(KERN_DEBUG "%s: Restarting 21143 autonegotiation, csr14=%08x\n", | 125 | netdev_dbg(dev, "Restarting 21143 autonegotiation, csr14=%08x\n", |
| 126 | dev->name, csr14); | 126 | csr14); |
| 127 | iowrite32(0x0001, ioaddr + CSR13); | 127 | iowrite32(0x0001, ioaddr + CSR13); |
| 128 | udelay(100); | 128 | udelay(100); |
| 129 | iowrite32(csr14, ioaddr + CSR14); | 129 | iowrite32(csr14, ioaddr + CSR14); |
| @@ -206,14 +206,14 @@ void t21142_lnk_change(struct net_device *dev, int csr5) | |||
| 206 | #if 0 /* Restart shouldn't be needed. */ | 206 | #if 0 /* Restart shouldn't be needed. */ |
| 207 | iowrite32(tp->csr6 | RxOn, ioaddr + CSR6); | 207 | iowrite32(tp->csr6 | RxOn, ioaddr + CSR6); |
| 208 | if (tulip_debug > 2) | 208 | if (tulip_debug > 2) |
| 209 | printk(KERN_DEBUG "%s: Restarting Tx and Rx, CSR5 is %08x\n", | 209 | netdev_dbg(dev, " Restarting Tx and Rx, CSR5 is %08x\n", |
| 210 | dev->name, ioread32(ioaddr + CSR5)); | 210 | ioread32(ioaddr + CSR5)); |
| 211 | #endif | 211 | #endif |
| 212 | tulip_start_rxtx(tp); | 212 | tulip_start_rxtx(tp); |
| 213 | if (tulip_debug > 2) | 213 | if (tulip_debug > 2) |
| 214 | printk(KERN_DEBUG "%s: Setting CSR6 %08x/%x CSR12 %08x\n", | 214 | netdev_dbg(dev, " Setting CSR6 %08x/%x CSR12 %08x\n", |
| 215 | dev->name, tp->csr6, ioread32(ioaddr + CSR6), | 215 | tp->csr6, ioread32(ioaddr + CSR6), |
| 216 | ioread32(ioaddr + CSR12)); | 216 | ioread32(ioaddr + CSR12)); |
| 217 | } else if ((tp->nwayset && (csr5 & 0x08000000) && | 217 | } else if ((tp->nwayset && (csr5 & 0x08000000) && |
| 218 | (dev->if_port == 3 || dev->if_port == 5) && | 218 | (dev->if_port == 3 || dev->if_port == 5) && |
| 219 | (csr12 & 2) == 2) || | 219 | (csr12 & 2) == 2) || |
diff --git a/drivers/net/tulip/Makefile b/drivers/net/tulip/Makefile index 200cbf7c815c..5e8be38b45bb 100644 --- a/drivers/net/tulip/Makefile +++ b/drivers/net/tulip/Makefile | |||
| @@ -2,6 +2,8 @@ | |||
| 2 | # Makefile for the Linux "Tulip" family network device drivers. | 2 | # Makefile for the Linux "Tulip" family network device drivers. |
| 3 | # | 3 | # |
| 4 | 4 | ||
| 5 | ccflags-$(CONFIG_NET_TULIP) := -DDEBUG | ||
| 6 | |||
| 5 | obj-$(CONFIG_PCMCIA_XIRCOM) += xircom_cb.o | 7 | obj-$(CONFIG_PCMCIA_XIRCOM) += xircom_cb.o |
| 6 | obj-$(CONFIG_DM9102) += dmfe.o | 8 | obj-$(CONFIG_DM9102) += dmfe.o |
| 7 | obj-$(CONFIG_WINBOND_840) += winbond-840.o | 9 | obj-$(CONFIG_WINBOND_840) += winbond-840.o |
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c index 62883a0b0618..e925c1ea04bb 100644 --- a/drivers/net/tulip/de2104x.c +++ b/drivers/net/tulip/de2104x.c | |||
| @@ -377,9 +377,9 @@ static u16 t21041_csr15[] = { 0x0008, 0x0006, 0x000E, 0x0008, 0x0008, }; | |||
| 377 | static void de_rx_err_acct (struct de_private *de, unsigned rx_tail, | 377 | static void de_rx_err_acct (struct de_private *de, unsigned rx_tail, |
| 378 | u32 status, u32 len) | 378 | u32 status, u32 len) |
| 379 | { | 379 | { |
| 380 | netif_printk(de, rx_err, KERN_DEBUG, de->dev, | 380 | netif_dbg(de, rx_err, de->dev, |
| 381 | "rx err, slot %d status 0x%x len %d\n", | 381 | "rx err, slot %d status 0x%x len %d\n", |
| 382 | rx_tail, status, len); | 382 | rx_tail, status, len); |
| 383 | 383 | ||
| 384 | if ((status & 0x38000300) != 0x0300) { | 384 | if ((status & 0x38000300) != 0x0300) { |
| 385 | /* Ingore earlier buffers. */ | 385 | /* Ingore earlier buffers. */ |
| @@ -433,10 +433,9 @@ static void de_rx (struct de_private *de) | |||
| 433 | 433 | ||
| 434 | copying_skb = (len <= rx_copybreak); | 434 | copying_skb = (len <= rx_copybreak); |
| 435 | 435 | ||
| 436 | if (unlikely(netif_msg_rx_status(de))) | 436 | netif_dbg(de, rx_status, de->dev, |
| 437 | printk(KERN_DEBUG "%s: rx slot %d status 0x%x len %d copying? %d\n", | 437 | "rx slot %d status 0x%x len %d copying? %d\n", |
| 438 | de->dev->name, rx_tail, status, len, | 438 | rx_tail, status, len, copying_skb); |
| 439 | copying_skb); | ||
| 440 | 439 | ||
| 441 | buflen = copying_skb ? (len + RX_OFFSET) : de->rx_buf_sz; | 440 | buflen = copying_skb ? (len + RX_OFFSET) : de->rx_buf_sz; |
| 442 | copy_skb = dev_alloc_skb (buflen); | 441 | copy_skb = dev_alloc_skb (buflen); |
| @@ -504,10 +503,9 @@ static irqreturn_t de_interrupt (int irq, void *dev_instance) | |||
| 504 | if ((!(status & (IntrOK|IntrErr))) || (status == 0xFFFF)) | 503 | if ((!(status & (IntrOK|IntrErr))) || (status == 0xFFFF)) |
| 505 | return IRQ_NONE; | 504 | return IRQ_NONE; |
| 506 | 505 | ||
| 507 | if (netif_msg_intr(de)) | 506 | netif_dbg(de, intr, dev, "intr, status %08x mode %08x desc %u/%u/%u\n", |
| 508 | printk(KERN_DEBUG "%s: intr, status %08x mode %08x desc %u/%u/%u\n", | 507 | status, dr32(MacMode), |
| 509 | dev->name, status, dr32(MacMode), | 508 | de->rx_tail, de->tx_head, de->tx_tail); |
| 510 | de->rx_tail, de->tx_head, de->tx_tail); | ||
| 511 | 509 | ||
| 512 | dw32(MacStatus, status); | 510 | dw32(MacStatus, status); |
| 513 | 511 | ||
| @@ -570,9 +568,9 @@ static void de_tx (struct de_private *de) | |||
| 570 | 568 | ||
| 571 | if (status & LastFrag) { | 569 | if (status & LastFrag) { |
| 572 | if (status & TxError) { | 570 | if (status & TxError) { |
| 573 | if (netif_msg_tx_err(de)) | 571 | netif_dbg(de, tx_err, de->dev, |
| 574 | printk(KERN_DEBUG "%s: tx err, status 0x%x\n", | 572 | "tx err, status 0x%x\n", |
| 575 | de->dev->name, status); | 573 | status); |
| 576 | de->net_stats.tx_errors++; | 574 | de->net_stats.tx_errors++; |
| 577 | if (status & TxOWC) | 575 | if (status & TxOWC) |
| 578 | de->net_stats.tx_window_errors++; | 576 | de->net_stats.tx_window_errors++; |
| @@ -585,9 +583,8 @@ static void de_tx (struct de_private *de) | |||
| 585 | } else { | 583 | } else { |
| 586 | de->net_stats.tx_packets++; | 584 | de->net_stats.tx_packets++; |
| 587 | de->net_stats.tx_bytes += skb->len; | 585 | de->net_stats.tx_bytes += skb->len; |
| 588 | if (netif_msg_tx_done(de)) | 586 | netif_dbg(de, tx_done, de->dev, |
| 589 | printk(KERN_DEBUG "%s: tx done, slot %d\n", | 587 | "tx done, slot %d\n", tx_tail); |
| 590 | de->dev->name, tx_tail); | ||
| 591 | } | 588 | } |
| 592 | dev_kfree_skb_irq(skb); | 589 | dev_kfree_skb_irq(skb); |
| 593 | } | 590 | } |
| @@ -644,9 +641,8 @@ static netdev_tx_t de_start_xmit (struct sk_buff *skb, | |||
| 644 | wmb(); | 641 | wmb(); |
| 645 | 642 | ||
| 646 | de->tx_head = NEXT_TX(entry); | 643 | de->tx_head = NEXT_TX(entry); |
| 647 | if (netif_msg_tx_queued(de)) | 644 | netif_dbg(de, tx_queued, dev, "tx queued, slot %d, skblen %d\n", |
| 648 | printk(KERN_DEBUG "%s: tx queued, slot %d, skblen %d\n", | 645 | entry, skb->len); |
| 649 | dev->name, entry, skb->len); | ||
| 650 | 646 | ||
| 651 | if (tx_free == 0) | 647 | if (tx_free == 0) |
| 652 | netif_stop_queue(dev); | 648 | netif_stop_queue(dev); |
| @@ -1387,7 +1383,7 @@ static int de_open (struct net_device *dev) | |||
| 1387 | struct de_private *de = netdev_priv(dev); | 1383 | struct de_private *de = netdev_priv(dev); |
| 1388 | int rc; | 1384 | int rc; |
| 1389 | 1385 | ||
| 1390 | netif_printk(de, ifup, KERN_DEBUG, dev, "enabling interface\n"); | 1386 | netif_dbg(de, ifup, dev, "enabling interface\n"); |
| 1391 | 1387 | ||
| 1392 | de->rx_buf_sz = (dev->mtu <= 1500 ? PKT_BUF_SZ : dev->mtu + 32); | 1388 | de->rx_buf_sz = (dev->mtu <= 1500 ? PKT_BUF_SZ : dev->mtu + 32); |
| 1393 | 1389 | ||
| @@ -1429,7 +1425,7 @@ static int de_close (struct net_device *dev) | |||
| 1429 | struct de_private *de = netdev_priv(dev); | 1425 | struct de_private *de = netdev_priv(dev); |
| 1430 | unsigned long flags; | 1426 | unsigned long flags; |
| 1431 | 1427 | ||
| 1432 | netif_printk(de, ifdown, KERN_DEBUG, dev, "disabling interface\n"); | 1428 | netif_dbg(de, ifdown, dev, "disabling interface\n"); |
| 1433 | 1429 | ||
| 1434 | del_timer_sync(&de->media_timer); | 1430 | del_timer_sync(&de->media_timer); |
| 1435 | 1431 | ||
| @@ -1450,10 +1446,9 @@ static void de_tx_timeout (struct net_device *dev) | |||
| 1450 | { | 1446 | { |
| 1451 | struct de_private *de = netdev_priv(dev); | 1447 | struct de_private *de = netdev_priv(dev); |
| 1452 | 1448 | ||
| 1453 | netdev_printk(KERN_DEBUG, dev, | 1449 | netdev_dbg(dev, "NIC status %08x mode %08x sia %08x desc %u/%u/%u\n", |
| 1454 | "NIC status %08x mode %08x sia %08x desc %u/%u/%u\n", | 1450 | dr32(MacStatus), dr32(MacMode), dr32(SIAStatus), |
| 1455 | dr32(MacStatus), dr32(MacMode), dr32(SIAStatus), | 1451 | de->rx_tail, de->tx_head, de->tx_tail); |
| 1456 | de->rx_tail, de->tx_head, de->tx_tail); | ||
| 1457 | 1452 | ||
| 1458 | del_timer_sync(&de->media_timer); | 1453 | del_timer_sync(&de->media_timer); |
| 1459 | 1454 | ||
diff --git a/drivers/net/tulip/interrupt.c b/drivers/net/tulip/interrupt.c index 0013642903ee..5350d753e0ff 100644 --- a/drivers/net/tulip/interrupt.c +++ b/drivers/net/tulip/interrupt.c | |||
| @@ -125,12 +125,12 @@ int tulip_poll(struct napi_struct *napi, int budget) | |||
| 125 | #endif | 125 | #endif |
| 126 | 126 | ||
| 127 | if (tulip_debug > 4) | 127 | if (tulip_debug > 4) |
| 128 | printk(KERN_DEBUG " In tulip_rx(), entry %d %08x\n", | 128 | netdev_dbg(dev, " In tulip_rx(), entry %d %08x\n", |
| 129 | entry, tp->rx_ring[entry].status); | 129 | entry, tp->rx_ring[entry].status); |
| 130 | 130 | ||
| 131 | do { | 131 | do { |
| 132 | if (ioread32(tp->base_addr + CSR5) == 0xffffffff) { | 132 | if (ioread32(tp->base_addr + CSR5) == 0xffffffff) { |
| 133 | printk(KERN_DEBUG " In tulip_poll(), hardware disappeared\n"); | 133 | netdev_dbg(dev, " In tulip_poll(), hardware disappeared\n"); |
| 134 | break; | 134 | break; |
| 135 | } | 135 | } |
| 136 | /* Acknowledge current RX interrupt sources. */ | 136 | /* Acknowledge current RX interrupt sources. */ |
| @@ -145,9 +145,9 @@ int tulip_poll(struct napi_struct *napi, int budget) | |||
| 145 | if (tp->dirty_rx + RX_RING_SIZE == tp->cur_rx) | 145 | if (tp->dirty_rx + RX_RING_SIZE == tp->cur_rx) |
| 146 | break; | 146 | break; |
| 147 | 147 | ||
| 148 | if (tulip_debug > 5) | 148 | if (tulip_debug > 5) |
| 149 | printk(KERN_DEBUG "%s: In tulip_rx(), entry %d %08x\n", | 149 | netdev_dbg(dev, "In tulip_rx(), entry %d %08x\n", |
| 150 | dev->name, entry, status); | 150 | entry, status); |
| 151 | 151 | ||
| 152 | if (++work_done >= budget) | 152 | if (++work_done >= budget) |
| 153 | goto not_done; | 153 | goto not_done; |
| @@ -184,9 +184,9 @@ int tulip_poll(struct napi_struct *napi, int budget) | |||
| 184 | } | 184 | } |
| 185 | } else { | 185 | } else { |
| 186 | /* There was a fatal error. */ | 186 | /* There was a fatal error. */ |
| 187 | if (tulip_debug > 2) | 187 | if (tulip_debug > 2) |
| 188 | printk(KERN_DEBUG "%s: Receive error, Rx status %08x\n", | 188 | netdev_dbg(dev, "Receive error, Rx status %08x\n", |
| 189 | dev->name, status); | 189 | status); |
| 190 | dev->stats.rx_errors++; /* end of a packet.*/ | 190 | dev->stats.rx_errors++; /* end of a packet.*/ |
| 191 | if (pkt_len > 1518 || | 191 | if (pkt_len > 1518 || |
| 192 | (status & RxDescRunt)) | 192 | (status & RxDescRunt)) |
| @@ -367,16 +367,16 @@ static int tulip_rx(struct net_device *dev) | |||
| 367 | int received = 0; | 367 | int received = 0; |
| 368 | 368 | ||
| 369 | if (tulip_debug > 4) | 369 | if (tulip_debug > 4) |
| 370 | printk(KERN_DEBUG " In tulip_rx(), entry %d %08x\n", | 370 | netdev_dbg(dev, "In tulip_rx(), entry %d %08x\n", |
| 371 | entry, tp->rx_ring[entry].status); | 371 | entry, tp->rx_ring[entry].status); |
| 372 | /* If we own the next entry, it is a new packet. Send it up. */ | 372 | /* If we own the next entry, it is a new packet. Send it up. */ |
| 373 | while ( ! (tp->rx_ring[entry].status & cpu_to_le32(DescOwned))) { | 373 | while ( ! (tp->rx_ring[entry].status & cpu_to_le32(DescOwned))) { |
| 374 | s32 status = le32_to_cpu(tp->rx_ring[entry].status); | 374 | s32 status = le32_to_cpu(tp->rx_ring[entry].status); |
| 375 | short pkt_len; | 375 | short pkt_len; |
| 376 | 376 | ||
| 377 | if (tulip_debug > 5) | 377 | if (tulip_debug > 5) |
| 378 | printk(KERN_DEBUG "%s: In tulip_rx(), entry %d %08x\n", | 378 | netdev_dbg(dev, "In tulip_rx(), entry %d %08x\n", |
| 379 | dev->name, entry, status); | 379 | entry, status); |
| 380 | if (--rx_work_limit < 0) | 380 | if (--rx_work_limit < 0) |
| 381 | break; | 381 | break; |
| 382 | 382 | ||
| @@ -404,16 +404,16 @@ static int tulip_rx(struct net_device *dev) | |||
| 404 | /* Ingore earlier buffers. */ | 404 | /* Ingore earlier buffers. */ |
| 405 | if ((status & 0xffff) != 0x7fff) { | 405 | if ((status & 0xffff) != 0x7fff) { |
| 406 | if (tulip_debug > 1) | 406 | if (tulip_debug > 1) |
| 407 | dev_warn(&dev->dev, | 407 | netdev_warn(dev, |
| 408 | "Oversized Ethernet frame spanned multiple buffers, status %08x!\n", | 408 | "Oversized Ethernet frame spanned multiple buffers, status %08x!\n", |
| 409 | status); | 409 | status); |
| 410 | dev->stats.rx_length_errors++; | 410 | dev->stats.rx_length_errors++; |
| 411 | } | 411 | } |
| 412 | } else { | 412 | } else { |
| 413 | /* There was a fatal error. */ | 413 | /* There was a fatal error. */ |
| 414 | if (tulip_debug > 2) | 414 | if (tulip_debug > 2) |
| 415 | printk(KERN_DEBUG "%s: Receive error, Rx status %08x\n", | 415 | netdev_dbg(dev, "Receive error, Rx status %08x\n", |
| 416 | dev->name, status); | 416 | status); |
| 417 | dev->stats.rx_errors++; /* end of a packet.*/ | 417 | dev->stats.rx_errors++; /* end of a packet.*/ |
| 418 | if (pkt_len > 1518 || | 418 | if (pkt_len > 1518 || |
| 419 | (status & RxDescRunt)) | 419 | (status & RxDescRunt)) |
| @@ -573,8 +573,8 @@ irqreturn_t tulip_interrupt(int irq, void *dev_instance) | |||
| 573 | #endif /* CONFIG_TULIP_NAPI */ | 573 | #endif /* CONFIG_TULIP_NAPI */ |
| 574 | 574 | ||
| 575 | if (tulip_debug > 4) | 575 | if (tulip_debug > 4) |
| 576 | printk(KERN_DEBUG "%s: interrupt csr5=%#8.8x new csr5=%#8.8x\n", | 576 | netdev_dbg(dev, "interrupt csr5=%#8.8x new csr5=%#8.8x\n", |
| 577 | dev->name, csr5, ioread32(ioaddr + CSR5)); | 577 | csr5, ioread32(ioaddr + CSR5)); |
| 578 | 578 | ||
| 579 | 579 | ||
| 580 | if (csr5 & (TxNoBuf | TxDied | TxIntr | TimerInt)) { | 580 | if (csr5 & (TxNoBuf | TxDied | TxIntr | TimerInt)) { |
| @@ -605,8 +605,8 @@ irqreturn_t tulip_interrupt(int irq, void *dev_instance) | |||
| 605 | /* There was an major error, log it. */ | 605 | /* There was an major error, log it. */ |
| 606 | #ifndef final_version | 606 | #ifndef final_version |
| 607 | if (tulip_debug > 1) | 607 | if (tulip_debug > 1) |
| 608 | printk(KERN_DEBUG "%s: Transmit error, Tx status %08x\n", | 608 | netdev_dbg(dev, "Transmit error, Tx status %08x\n", |
| 609 | dev->name, status); | 609 | status); |
| 610 | #endif | 610 | #endif |
| 611 | dev->stats.tx_errors++; | 611 | dev->stats.tx_errors++; |
| 612 | if (status & 0x4104) | 612 | if (status & 0x4104) |
| @@ -804,8 +804,8 @@ irqreturn_t tulip_interrupt(int irq, void *dev_instance) | |||
| 804 | } | 804 | } |
| 805 | 805 | ||
| 806 | if (tulip_debug > 4) | 806 | if (tulip_debug > 4) |
| 807 | printk(KERN_DEBUG "%s: exiting interrupt, csr5=%#04x\n", | 807 | netdev_dbg(dev, "exiting interrupt, csr5=%#04x\n", |
| 808 | dev->name, ioread32(ioaddr + CSR5)); | 808 | ioread32(ioaddr + CSR5)); |
| 809 | 809 | ||
| 810 | return IRQ_HANDLED; | 810 | return IRQ_HANDLED; |
| 811 | } | 811 | } |
diff --git a/drivers/net/tulip/media.c b/drivers/net/tulip/media.c index a0c770ee4b64..4bd13922875d 100644 --- a/drivers/net/tulip/media.c +++ b/drivers/net/tulip/media.c | |||
| @@ -182,8 +182,8 @@ void tulip_select_media(struct net_device *dev, int startup) | |||
| 182 | switch (mleaf->type) { | 182 | switch (mleaf->type) { |
| 183 | case 0: /* 21140 non-MII xcvr. */ | 183 | case 0: /* 21140 non-MII xcvr. */ |
| 184 | if (tulip_debug > 1) | 184 | if (tulip_debug > 1) |
| 185 | printk(KERN_DEBUG "%s: Using a 21140 non-MII transceiver with control setting %02x\n", | 185 | netdev_dbg(dev, "Using a 21140 non-MII transceiver with control setting %02x\n", |
| 186 | dev->name, p[1]); | 186 | p[1]); |
| 187 | dev->if_port = p[0]; | 187 | dev->if_port = p[0]; |
| 188 | if (startup) | 188 | if (startup) |
| 189 | iowrite32(mtable->csr12dir | 0x100, ioaddr + CSR12); | 189 | iowrite32(mtable->csr12dir | 0x100, ioaddr + CSR12); |
| @@ -204,15 +204,14 @@ void tulip_select_media(struct net_device *dev, int startup) | |||
| 204 | struct medialeaf *rleaf = &mtable->mleaf[mtable->has_reset]; | 204 | struct medialeaf *rleaf = &mtable->mleaf[mtable->has_reset]; |
| 205 | unsigned char *rst = rleaf->leafdata; | 205 | unsigned char *rst = rleaf->leafdata; |
| 206 | if (tulip_debug > 1) | 206 | if (tulip_debug > 1) |
| 207 | printk(KERN_DEBUG "%s: Resetting the transceiver\n", | 207 | netdev_dbg(dev, "Resetting the transceiver\n"); |
| 208 | dev->name); | ||
| 209 | for (i = 0; i < rst[0]; i++) | 208 | for (i = 0; i < rst[0]; i++) |
| 210 | iowrite32(get_u16(rst + 1 + (i<<1)) << 16, ioaddr + CSR15); | 209 | iowrite32(get_u16(rst + 1 + (i<<1)) << 16, ioaddr + CSR15); |
| 211 | } | 210 | } |
| 212 | if (tulip_debug > 1) | 211 | if (tulip_debug > 1) |
| 213 | printk(KERN_DEBUG "%s: 21143 non-MII %s transceiver control %04x/%04x\n", | 212 | netdev_dbg(dev, "21143 non-MII %s transceiver control %04x/%04x\n", |
| 214 | dev->name, medianame[dev->if_port], | 213 | medianame[dev->if_port], |
| 215 | setup[0], setup[1]); | 214 | setup[0], setup[1]); |
| 216 | if (p[0] & 0x40) { /* SIA (CSR13-15) setup values are provided. */ | 215 | if (p[0] & 0x40) { /* SIA (CSR13-15) setup values are provided. */ |
| 217 | csr13val = setup[0]; | 216 | csr13val = setup[0]; |
| 218 | csr14val = setup[1]; | 217 | csr14val = setup[1]; |
| @@ -239,8 +238,8 @@ void tulip_select_media(struct net_device *dev, int startup) | |||
| 239 | if (startup) iowrite32(csr13val, ioaddr + CSR13); | 238 | if (startup) iowrite32(csr13val, ioaddr + CSR13); |
| 240 | } | 239 | } |
| 241 | if (tulip_debug > 1) | 240 | if (tulip_debug > 1) |
| 242 | printk(KERN_DEBUG "%s: Setting CSR15 to %08x/%08x\n", | 241 | netdev_dbg(dev, "Setting CSR15 to %08x/%08x\n", |
| 243 | dev->name, csr15dir, csr15val); | 242 | csr15dir, csr15val); |
| 244 | if (mleaf->type == 4) | 243 | if (mleaf->type == 4) |
| 245 | new_csr6 = 0x82020000 | ((setup[2] & 0x71) << 18); | 244 | new_csr6 = 0x82020000 | ((setup[2] & 0x71) << 18); |
| 246 | else | 245 | else |
| @@ -316,9 +315,9 @@ void tulip_select_media(struct net_device *dev, int startup) | |||
| 316 | if (tp->mii_advertise == 0) | 315 | if (tp->mii_advertise == 0) |
| 317 | tp->mii_advertise = tp->advertising[phy_num]; | 316 | tp->mii_advertise = tp->advertising[phy_num]; |
| 318 | if (tulip_debug > 1) | 317 | if (tulip_debug > 1) |
| 319 | printk(KERN_DEBUG "%s: Advertising %04x on MII %d\n", | 318 | netdev_dbg(dev, " Advertising %04x on MII %d\n", |
| 320 | dev->name, tp->mii_advertise, | 319 | tp->mii_advertise, |
| 321 | tp->phys[phy_num]); | 320 | tp->phys[phy_num]); |
| 322 | tulip_mdio_write(dev, tp->phys[phy_num], 4, tp->mii_advertise); | 321 | tulip_mdio_write(dev, tp->phys[phy_num], 4, tp->mii_advertise); |
| 323 | } | 322 | } |
| 324 | break; | 323 | break; |
| @@ -335,8 +334,7 @@ void tulip_select_media(struct net_device *dev, int startup) | |||
| 335 | struct medialeaf *rleaf = &mtable->mleaf[mtable->has_reset]; | 334 | struct medialeaf *rleaf = &mtable->mleaf[mtable->has_reset]; |
| 336 | unsigned char *rst = rleaf->leafdata; | 335 | unsigned char *rst = rleaf->leafdata; |
| 337 | if (tulip_debug > 1) | 336 | if (tulip_debug > 1) |
| 338 | printk(KERN_DEBUG "%s: Resetting the transceiver\n", | 337 | netdev_dbg(dev, "Resetting the transceiver\n"); |
| 339 | dev->name); | ||
| 340 | for (i = 0; i < rst[0]; i++) | 338 | for (i = 0; i < rst[0]; i++) |
| 341 | iowrite32(get_u16(rst + 1 + (i<<1)) << 16, ioaddr + CSR15); | 339 | iowrite32(get_u16(rst + 1 + (i<<1)) << 16, ioaddr + CSR15); |
| 342 | } | 340 | } |
| @@ -344,20 +342,21 @@ void tulip_select_media(struct net_device *dev, int startup) | |||
| 344 | break; | 342 | break; |
| 345 | } | 343 | } |
| 346 | default: | 344 | default: |
| 347 | printk(KERN_DEBUG "%s: Invalid media table selection %d\n", | 345 | netdev_dbg(dev, " Invalid media table selection %d\n", |
| 348 | dev->name, mleaf->type); | 346 | mleaf->type); |
| 349 | new_csr6 = 0x020E0000; | 347 | new_csr6 = 0x020E0000; |
| 350 | } | 348 | } |
| 351 | if (tulip_debug > 1) | 349 | if (tulip_debug > 1) |
| 352 | printk(KERN_DEBUG "%s: Using media type %s, CSR12 is %02x\n", | 350 | netdev_dbg(dev, "Using media type %s, CSR12 is %02x\n", |
| 353 | dev->name, medianame[dev->if_port], | 351 | medianame[dev->if_port], |
| 354 | ioread32(ioaddr + CSR12) & 0xff); | 352 | ioread32(ioaddr + CSR12) & 0xff); |
| 355 | } else if (tp->chip_id == LC82C168) { | 353 | } else if (tp->chip_id == LC82C168) { |
| 356 | if (startup && ! tp->medialock) | 354 | if (startup && ! tp->medialock) |
| 357 | dev->if_port = tp->mii_cnt ? 11 : 0; | 355 | dev->if_port = tp->mii_cnt ? 11 : 0; |
| 358 | if (tulip_debug > 1) | 356 | if (tulip_debug > 1) |
| 359 | printk(KERN_DEBUG "%s: PNIC PHY status is %3.3x, media %s\n", | 357 | netdev_dbg(dev, "PNIC PHY status is %3.3x, media %s\n", |
| 360 | dev->name, ioread32(ioaddr + 0xB8), medianame[dev->if_port]); | 358 | ioread32(ioaddr + 0xB8), |
| 359 | medianame[dev->if_port]); | ||
| 361 | if (tp->mii_cnt) { | 360 | if (tp->mii_cnt) { |
| 362 | new_csr6 = 0x810C0000; | 361 | new_csr6 = 0x810C0000; |
| 363 | iowrite32(0x0001, ioaddr + CSR15); | 362 | iowrite32(0x0001, ioaddr + CSR15); |
| @@ -388,9 +387,9 @@ void tulip_select_media(struct net_device *dev, int startup) | |||
| 388 | } else | 387 | } else |
| 389 | new_csr6 = 0x03860000; | 388 | new_csr6 = 0x03860000; |
| 390 | if (tulip_debug > 1) | 389 | if (tulip_debug > 1) |
| 391 | printk(KERN_DEBUG "%s: No media description table, assuming %s transceiver, CSR12 %02x\n", | 390 | netdev_dbg(dev, "No media description table, assuming %s transceiver, CSR12 %02x\n", |
| 392 | dev->name, medianame[dev->if_port], | 391 | medianame[dev->if_port], |
| 393 | ioread32(ioaddr + CSR12)); | 392 | ioread32(ioaddr + CSR12)); |
| 394 | } | 393 | } |
| 395 | 394 | ||
| 396 | tp->csr6 = new_csr6 | (tp->csr6 & 0xfdff) | (tp->full_duplex ? 0x0200 : 0); | 395 | tp->csr6 = new_csr6 | (tp->csr6 & 0xfdff) | (tp->full_duplex ? 0x0200 : 0); |
| @@ -504,8 +503,8 @@ void __devinit tulip_find_mii (struct net_device *dev, int board_idx) | |||
| 504 | 503 | ||
| 505 | /* Fixup for DLink with miswired PHY. */ | 504 | /* Fixup for DLink with miswired PHY. */ |
| 506 | if (mii_advert != to_advert) { | 505 | if (mii_advert != to_advert) { |
| 507 | printk(KERN_DEBUG "tulip%d: Advertising %04x on PHY %d, previously advertising %04x\n", | 506 | pr_debug("tulip%d: Advertising %04x on PHY %d, previously advertising %04x\n", |
| 508 | board_idx, to_advert, phy, mii_advert); | 507 | board_idx, to_advert, phy, mii_advert); |
| 509 | tulip_mdio_write (dev, phy, 4, to_advert); | 508 | tulip_mdio_write (dev, phy, 4, to_advert); |
| 510 | } | 509 | } |
| 511 | 510 | ||
diff --git a/drivers/net/tulip/pnic.c b/drivers/net/tulip/pnic.c index a63e64b6863d..aa4d9dad0395 100644 --- a/drivers/net/tulip/pnic.c +++ b/drivers/net/tulip/pnic.c | |||
| @@ -40,8 +40,8 @@ void pnic_do_nway(struct net_device *dev) | |||
| 40 | new_csr6 |= 0x00000200; | 40 | new_csr6 |= 0x00000200; |
| 41 | } | 41 | } |
| 42 | if (tulip_debug > 1) | 42 | if (tulip_debug > 1) |
| 43 | printk(KERN_DEBUG "%s: PNIC autonegotiated status %08x, %s\n", | 43 | netdev_dbg(dev, "PNIC autonegotiated status %08x, %s\n", |
| 44 | dev->name, phy_reg, medianame[dev->if_port]); | 44 | phy_reg, medianame[dev->if_port]); |
| 45 | if (tp->csr6 != new_csr6) { | 45 | if (tp->csr6 != new_csr6) { |
| 46 | tp->csr6 = new_csr6; | 46 | tp->csr6 = new_csr6; |
| 47 | /* Restart Tx */ | 47 | /* Restart Tx */ |
| @@ -58,8 +58,8 @@ void pnic_lnk_change(struct net_device *dev, int csr5) | |||
| 58 | int phy_reg = ioread32(ioaddr + 0xB8); | 58 | int phy_reg = ioread32(ioaddr + 0xB8); |
| 59 | 59 | ||
| 60 | if (tulip_debug > 1) | 60 | if (tulip_debug > 1) |
| 61 | printk(KERN_DEBUG "%s: PNIC link changed state %08x, CSR5 %08x\n", | 61 | netdev_dbg(dev, "PNIC link changed state %08x, CSR5 %08x\n", |
| 62 | dev->name, phy_reg, csr5); | 62 | phy_reg, csr5); |
| 63 | if (ioread32(ioaddr + CSR5) & TPLnkFail) { | 63 | if (ioread32(ioaddr + CSR5) & TPLnkFail) { |
| 64 | iowrite32((ioread32(ioaddr + CSR7) & ~TPLnkFail) | TPLnkPass, ioaddr + CSR7); | 64 | iowrite32((ioread32(ioaddr + CSR7) & ~TPLnkFail) | TPLnkPass, ioaddr + CSR7); |
| 65 | /* If we use an external MII, then we mustn't use the | 65 | /* If we use an external MII, then we mustn't use the |
| @@ -114,8 +114,8 @@ void pnic_timer(unsigned long data) | |||
| 114 | int csr5 = ioread32(ioaddr + CSR5); | 114 | int csr5 = ioread32(ioaddr + CSR5); |
| 115 | 115 | ||
| 116 | if (tulip_debug > 1) | 116 | if (tulip_debug > 1) |
| 117 | printk(KERN_DEBUG "%s: PNIC timer PHY status %08x, %s CSR5 %08x\n", | 117 | netdev_dbg(dev, "PNIC timer PHY status %08x, %s CSR5 %08x\n", |
| 118 | dev->name, phy_reg, medianame[dev->if_port], csr5); | 118 | phy_reg, medianame[dev->if_port], csr5); |
| 119 | if (phy_reg & 0x04000000) { /* Remote link fault */ | 119 | if (phy_reg & 0x04000000) { /* Remote link fault */ |
| 120 | iowrite32(0x0201F078, ioaddr + 0xB8); | 120 | iowrite32(0x0201F078, ioaddr + 0xB8); |
| 121 | next_tick = 1*HZ; | 121 | next_tick = 1*HZ; |
| @@ -125,11 +125,11 @@ void pnic_timer(unsigned long data) | |||
| 125 | next_tick = 60*HZ; | 125 | next_tick = 60*HZ; |
| 126 | } else if (csr5 & TPLnkFail) { /* 100baseTx link beat */ | 126 | } else if (csr5 & TPLnkFail) { /* 100baseTx link beat */ |
| 127 | if (tulip_debug > 1) | 127 | if (tulip_debug > 1) |
| 128 | printk(KERN_DEBUG "%s: %s link beat failed, CSR12 %04x, CSR5 %08x, PHY %03x\n", | 128 | netdev_dbg(dev, "%s link beat failed, CSR12 %04x, CSR5 %08x, PHY %03x\n", |
| 129 | dev->name, medianame[dev->if_port], | 129 | medianame[dev->if_port], |
| 130 | csr12, | 130 | csr12, |
| 131 | ioread32(ioaddr + CSR5), | 131 | ioread32(ioaddr + CSR5), |
| 132 | ioread32(ioaddr + 0xB8)); | 132 | ioread32(ioaddr + 0xB8)); |
| 133 | next_tick = 3*HZ; | 133 | next_tick = 3*HZ; |
| 134 | if (tp->medialock) { | 134 | if (tp->medialock) { |
| 135 | } else if (tp->nwayset && (dev->if_port & 1)) { | 135 | } else if (tp->nwayset && (dev->if_port & 1)) { |
diff --git a/drivers/net/tulip/pnic2.c b/drivers/net/tulip/pnic2.c index 4690c8e69207..93358ee4d830 100644 --- a/drivers/net/tulip/pnic2.c +++ b/drivers/net/tulip/pnic2.c | |||
| @@ -125,8 +125,8 @@ void pnic2_start_nway(struct net_device *dev) | |||
| 125 | csr14 |= 0x00001184; | 125 | csr14 |= 0x00001184; |
| 126 | 126 | ||
| 127 | if (tulip_debug > 1) | 127 | if (tulip_debug > 1) |
| 128 | printk(KERN_DEBUG "%s: Restarting PNIC2 autonegotiation, csr14=%08x\n", | 128 | netdev_dbg(dev, "Restarting PNIC2 autonegotiation, csr14=%08x\n", |
| 129 | dev->name, csr14); | 129 | csr14); |
| 130 | 130 | ||
| 131 | /* tell pnic2_lnk_change we are doing an nway negotiation */ | 131 | /* tell pnic2_lnk_change we are doing an nway negotiation */ |
| 132 | dev->if_port = 0; | 132 | dev->if_port = 0; |
| @@ -137,8 +137,7 @@ void pnic2_start_nway(struct net_device *dev) | |||
| 137 | 137 | ||
| 138 | tp->csr6 = ioread32(ioaddr + CSR6); | 138 | tp->csr6 = ioread32(ioaddr + CSR6); |
| 139 | if (tulip_debug > 1) | 139 | if (tulip_debug > 1) |
| 140 | printk(KERN_DEBUG "%s: On Entry to Nway, csr6=%08x\n", | 140 | netdev_dbg(dev, "On Entry to Nway, csr6=%08x\n", tp->csr6); |
| 141 | dev->name, tp->csr6); | ||
| 142 | 141 | ||
| 143 | /* mask off any bits not to touch | 142 | /* mask off any bits not to touch |
| 144 | * comment at top of file explains mask value | 143 | * comment at top of file explains mask value |
| @@ -271,9 +270,10 @@ void pnic2_lnk_change(struct net_device *dev, int csr5) | |||
| 271 | iowrite32(1, ioaddr + CSR13); | 270 | iowrite32(1, ioaddr + CSR13); |
| 272 | 271 | ||
| 273 | if (tulip_debug > 2) | 272 | if (tulip_debug > 2) |
| 274 | printk(KERN_DEBUG "%s: Setting CSR6 %08x/%x CSR12 %08x\n", | 273 | netdev_dbg(dev, "Setting CSR6 %08x/%x CSR12 %08x\n", |
| 275 | dev->name, tp->csr6, | 274 | tp->csr6, |
| 276 | ioread32(ioaddr + CSR6), ioread32(ioaddr + CSR12)); | 275 | ioread32(ioaddr + CSR6), |
| 276 | ioread32(ioaddr + CSR12)); | ||
| 277 | 277 | ||
| 278 | /* now the following actually writes out the | 278 | /* now the following actually writes out the |
| 279 | * new csr6 values | 279 | * new csr6 values |
| @@ -324,7 +324,7 @@ void pnic2_lnk_change(struct net_device *dev, int csr5) | |||
| 324 | /* Link blew? Maybe restart NWay. */ | 324 | /* Link blew? Maybe restart NWay. */ |
| 325 | 325 | ||
| 326 | if (tulip_debug > 2) | 326 | if (tulip_debug > 2) |
| 327 | printk(KERN_DEBUG "%s: Ugh! Link blew?\n", dev->name); | 327 | netdev_dbg(dev, "Ugh! Link blew?\n"); |
| 328 | 328 | ||
| 329 | del_timer_sync(&tp->timer); | 329 | del_timer_sync(&tp->timer); |
| 330 | pnic2_start_nway(dev); | 330 | pnic2_start_nway(dev); |
diff --git a/drivers/net/tulip/timer.c b/drivers/net/tulip/timer.c index 36c2725ec886..2017faf2d0e6 100644 --- a/drivers/net/tulip/timer.c +++ b/drivers/net/tulip/timer.c | |||
| @@ -28,11 +28,11 @@ void tulip_media_task(struct work_struct *work) | |||
| 28 | unsigned long flags; | 28 | unsigned long flags; |
| 29 | 29 | ||
| 30 | if (tulip_debug > 2) { | 30 | if (tulip_debug > 2) { |
| 31 | printk(KERN_DEBUG "%s: Media selection tick, %s, status %08x mode %08x SIA %08x %08x %08x %08x\n", | 31 | netdev_dbg(dev, "Media selection tick, %s, status %08x mode %08x SIA %08x %08x %08x %08x\n", |
| 32 | dev->name, medianame[dev->if_port], | 32 | medianame[dev->if_port], |
| 33 | ioread32(ioaddr + CSR5), ioread32(ioaddr + CSR6), | 33 | ioread32(ioaddr + CSR5), ioread32(ioaddr + CSR6), |
| 34 | csr12, ioread32(ioaddr + CSR13), | 34 | csr12, ioread32(ioaddr + CSR13), |
| 35 | ioread32(ioaddr + CSR14), ioread32(ioaddr + CSR15)); | 35 | ioread32(ioaddr + CSR14), ioread32(ioaddr + CSR15)); |
| 36 | } | 36 | } |
| 37 | switch (tp->chip_id) { | 37 | switch (tp->chip_id) { |
| 38 | case DC21140: | 38 | case DC21140: |
| @@ -48,9 +48,9 @@ void tulip_media_task(struct work_struct *work) | |||
| 48 | Assume this a generic MII or SYM transceiver. */ | 48 | Assume this a generic MII or SYM transceiver. */ |
| 49 | next_tick = 60*HZ; | 49 | next_tick = 60*HZ; |
| 50 | if (tulip_debug > 2) | 50 | if (tulip_debug > 2) |
| 51 | printk(KERN_DEBUG "%s: network media monitor CSR6 %08x CSR12 0x%02x\n", | 51 | netdev_dbg(dev, "network media monitor CSR6 %08x CSR12 0x%02x\n", |
| 52 | dev->name, | 52 | ioread32(ioaddr + CSR6), |
| 53 | ioread32(ioaddr + CSR6), csr12 & 0xff); | 53 | csr12 & 0xff); |
| 54 | break; | 54 | break; |
| 55 | } | 55 | } |
| 56 | mleaf = &tp->mtable->mleaf[tp->cur_index]; | 56 | mleaf = &tp->mtable->mleaf[tp->cur_index]; |
| @@ -62,8 +62,8 @@ void tulip_media_task(struct work_struct *work) | |||
| 62 | s8 bitnum = p[offset]; | 62 | s8 bitnum = p[offset]; |
| 63 | if (p[offset+1] & 0x80) { | 63 | if (p[offset+1] & 0x80) { |
| 64 | if (tulip_debug > 1) | 64 | if (tulip_debug > 1) |
| 65 | printk(KERN_DEBUG "%s: Transceiver monitor tick CSR12=%#02x, no media sense\n", | 65 | netdev_dbg(dev, "Transceiver monitor tick CSR12=%#02x, no media sense\n", |
| 66 | dev->name, csr12); | 66 | csr12); |
| 67 | if (mleaf->type == 4) { | 67 | if (mleaf->type == 4) { |
| 68 | if (mleaf->media == 3 && (csr12 & 0x02)) | 68 | if (mleaf->media == 3 && (csr12 & 0x02)) |
| 69 | goto select_next_media; | 69 | goto select_next_media; |
| @@ -71,17 +71,16 @@ void tulip_media_task(struct work_struct *work) | |||
| 71 | break; | 71 | break; |
| 72 | } | 72 | } |
| 73 | if (tulip_debug > 2) | 73 | if (tulip_debug > 2) |
| 74 | printk(KERN_DEBUG "%s: Transceiver monitor tick: CSR12=%#02x bit %d is %d, expecting %d\n", | 74 | netdev_dbg(dev, "Transceiver monitor tick: CSR12=%#02x bit %d is %d, expecting %d\n", |
| 75 | dev->name, csr12, (bitnum >> 1) & 7, | 75 | csr12, (bitnum >> 1) & 7, |
| 76 | (csr12 & (1 << ((bitnum >> 1) & 7))) != 0, | 76 | (csr12 & (1 << ((bitnum >> 1) & 7))) != 0, |
| 77 | (bitnum >= 0)); | 77 | (bitnum >= 0)); |
| 78 | /* Check that the specified bit has the proper value. */ | 78 | /* Check that the specified bit has the proper value. */ |
| 79 | if ((bitnum < 0) != | 79 | if ((bitnum < 0) != |
| 80 | ((csr12 & (1 << ((bitnum >> 1) & 7))) != 0)) { | 80 | ((csr12 & (1 << ((bitnum >> 1) & 7))) != 0)) { |
| 81 | if (tulip_debug > 2) | 81 | if (tulip_debug > 2) |
| 82 | printk(KERN_DEBUG "%s: Link beat detected for %s\n", | 82 | netdev_dbg(dev, "Link beat detected for %s\n", |
| 83 | dev->name, | 83 | medianame[mleaf->media & MEDIA_MASK]); |
| 84 | medianame[mleaf->media & MEDIA_MASK]); | ||
| 85 | if ((p[2] & 0x61) == 0x01) /* Bogus Znyx board. */ | 84 | if ((p[2] & 0x61) == 0x01) /* Bogus Znyx board. */ |
| 86 | goto actually_mii; | 85 | goto actually_mii; |
| 87 | netif_carrier_on(dev); | 86 | netif_carrier_on(dev); |
| @@ -99,10 +98,9 @@ void tulip_media_task(struct work_struct *work) | |||
| 99 | if (tulip_media_cap[dev->if_port] & MediaIsFD) | 98 | if (tulip_media_cap[dev->if_port] & MediaIsFD) |
| 100 | goto select_next_media; /* Skip FD entries. */ | 99 | goto select_next_media; /* Skip FD entries. */ |
| 101 | if (tulip_debug > 1) | 100 | if (tulip_debug > 1) |
| 102 | printk(KERN_DEBUG "%s: No link beat on media %s, trying transceiver type %s\n", | 101 | netdev_dbg(dev, "No link beat on media %s, trying transceiver type %s\n", |
| 103 | dev->name, | 102 | medianame[mleaf->media & MEDIA_MASK], |
| 104 | medianame[mleaf->media & MEDIA_MASK], | 103 | medianame[tp->mtable->mleaf[tp->cur_index].media]); |
| 105 | medianame[tp->mtable->mleaf[tp->cur_index].media]); | ||
| 106 | tulip_select_media(dev, 0); | 104 | tulip_select_media(dev, 0); |
| 107 | /* Restart the transmit process. */ | 105 | /* Restart the transmit process. */ |
| 108 | tulip_restart_rxtx(tp); | 106 | tulip_restart_rxtx(tp); |
| @@ -166,10 +164,9 @@ void comet_timer(unsigned long data) | |||
| 166 | int next_tick = 60*HZ; | 164 | int next_tick = 60*HZ; |
| 167 | 165 | ||
| 168 | if (tulip_debug > 1) | 166 | if (tulip_debug > 1) |
| 169 | printk(KERN_DEBUG "%s: Comet link status %04x partner capability %04x\n", | 167 | netdev_dbg(dev, "Comet link status %04x partner capability %04x\n", |
| 170 | dev->name, | 168 | tulip_mdio_read(dev, tp->phys[0], 1), |
| 171 | tulip_mdio_read(dev, tp->phys[0], 1), | 169 | tulip_mdio_read(dev, tp->phys[0], 5)); |
| 172 | tulip_mdio_read(dev, tp->phys[0], 5)); | ||
| 173 | /* mod_timer synchronizes us with potential add_timer calls | 170 | /* mod_timer synchronizes us with potential add_timer calls |
| 174 | * from interrupts. | 171 | * from interrupts. |
| 175 | */ | 172 | */ |
diff --git a/drivers/net/tulip/tulip.h b/drivers/net/tulip/tulip.h index ed66a16711dc..9db528967da9 100644 --- a/drivers/net/tulip/tulip.h +++ b/drivers/net/tulip/tulip.h | |||
| @@ -547,11 +547,9 @@ static inline void tulip_stop_rxtx(struct tulip_private *tp) | |||
| 547 | udelay(10); | 547 | udelay(10); |
| 548 | 548 | ||
| 549 | if (!i) | 549 | if (!i) |
| 550 | printk(KERN_DEBUG "%s: tulip_stop_rxtx() failed" | 550 | netdev_dbg(tp->dev, "tulip_stop_rxtx() failed (CSR5 0x%x CSR6 0x%x)\n", |
| 551 | " (CSR5 0x%x CSR6 0x%x)\n", | 551 | ioread32(ioaddr + CSR5), |
| 552 | pci_name(tp->pdev), | 552 | ioread32(ioaddr + CSR6)); |
| 553 | ioread32(ioaddr + CSR5), | ||
| 554 | ioread32(ioaddr + CSR6)); | ||
| 555 | } | 553 | } |
| 556 | } | 554 | } |
| 557 | 555 | ||
diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c index f46898a588d1..ebc805893205 100644 --- a/drivers/net/tulip/tulip_core.c +++ b/drivers/net/tulip/tulip_core.c | |||
| @@ -330,8 +330,7 @@ static void tulip_up(struct net_device *dev) | |||
| 330 | udelay(100); | 330 | udelay(100); |
| 331 | 331 | ||
| 332 | if (tulip_debug > 1) | 332 | if (tulip_debug > 1) |
| 333 | printk(KERN_DEBUG "%s: tulip_up(), irq==%d\n", | 333 | netdev_dbg(dev, "tulip_up(), irq==%d\n", dev->irq); |
| 334 | dev->name, dev->irq); | ||
| 335 | 334 | ||
| 336 | iowrite32(tp->rx_ring_dma, ioaddr + CSR3); | 335 | iowrite32(tp->rx_ring_dma, ioaddr + CSR3); |
| 337 | iowrite32(tp->tx_ring_dma, ioaddr + CSR4); | 336 | iowrite32(tp->tx_ring_dma, ioaddr + CSR4); |
| @@ -498,10 +497,10 @@ media_picked: | |||
| 498 | iowrite32(0, ioaddr + CSR2); /* Rx poll demand */ | 497 | iowrite32(0, ioaddr + CSR2); /* Rx poll demand */ |
| 499 | 498 | ||
| 500 | if (tulip_debug > 2) { | 499 | if (tulip_debug > 2) { |
| 501 | printk(KERN_DEBUG "%s: Done tulip_up(), CSR0 %08x, CSR5 %08x CSR6 %08x\n", | 500 | netdev_dbg(dev, "Done tulip_up(), CSR0 %08x, CSR5 %08x CSR6 %08x\n", |
| 502 | dev->name, ioread32(ioaddr + CSR0), | 501 | ioread32(ioaddr + CSR0), |
| 503 | ioread32(ioaddr + CSR5), | 502 | ioread32(ioaddr + CSR5), |
| 504 | ioread32(ioaddr + CSR6)); | 503 | ioread32(ioaddr + CSR6)); |
| 505 | } | 504 | } |
| 506 | 505 | ||
| 507 | /* Set the timer to switch to check for link beat and perhaps switch | 506 | /* Set the timer to switch to check for link beat and perhaps switch |
| @@ -842,8 +841,7 @@ static int tulip_close (struct net_device *dev) | |||
| 842 | tulip_down (dev); | 841 | tulip_down (dev); |
| 843 | 842 | ||
| 844 | if (tulip_debug > 1) | 843 | if (tulip_debug > 1) |
| 845 | dev_printk(KERN_DEBUG, &dev->dev, | 844 | netdev_dbg(dev, "Shutting down ethercard, status was %02x\n", |
| 846 | "Shutting down ethercard, status was %02x\n", | ||
| 847 | ioread32 (ioaddr + CSR5)); | 845 | ioread32 (ioaddr + CSR5)); |
| 848 | 846 | ||
| 849 | free_irq (dev->irq, dev); | 847 | free_irq (dev->irq, dev); |
| @@ -1206,7 +1204,7 @@ static void __devinit tulip_mwi_config (struct pci_dev *pdev, | |||
| 1206 | u32 csr0; | 1204 | u32 csr0; |
| 1207 | 1205 | ||
| 1208 | if (tulip_debug > 3) | 1206 | if (tulip_debug > 3) |
| 1209 | printk(KERN_DEBUG "%s: tulip_mwi_config()\n", pci_name(pdev)); | 1207 | netdev_dbg(dev, "tulip_mwi_config()\n"); |
| 1210 | 1208 | ||
| 1211 | tp->csr0 = csr0 = 0; | 1209 | tp->csr0 = csr0 = 0; |
| 1212 | 1210 | ||
| @@ -1268,8 +1266,8 @@ static void __devinit tulip_mwi_config (struct pci_dev *pdev, | |||
| 1268 | out: | 1266 | out: |
| 1269 | tp->csr0 = csr0; | 1267 | tp->csr0 = csr0; |
| 1270 | if (tulip_debug > 2) | 1268 | if (tulip_debug > 2) |
| 1271 | printk(KERN_DEBUG "%s: MWI config cacheline=%d, csr0=%08x\n", | 1269 | netdev_dbg(dev, "MWI config cacheline=%d, csr0=%08x\n", |
| 1272 | pci_name(pdev), cache, csr0); | 1270 | cache, csr0); |
| 1273 | } | 1271 | } |
| 1274 | #endif | 1272 | #endif |
| 1275 | 1273 | ||
diff --git a/drivers/net/tulip/winbond-840.c b/drivers/net/tulip/winbond-840.c index 939c96e2438a..64e3f01e9980 100644 --- a/drivers/net/tulip/winbond-840.c +++ b/drivers/net/tulip/winbond-840.c | |||
| @@ -645,8 +645,7 @@ static int netdev_open(struct net_device *dev) | |||
| 645 | goto out_err; | 645 | goto out_err; |
| 646 | 646 | ||
| 647 | if (debug > 1) | 647 | if (debug > 1) |
| 648 | printk(KERN_DEBUG "%s: w89c840_open() irq %d\n", | 648 | netdev_dbg(dev, "w89c840_open() irq %d\n", dev->irq); |
| 649 | dev->name, dev->irq); | ||
| 650 | 649 | ||
| 651 | if((i=alloc_ringdesc(dev))) | 650 | if((i=alloc_ringdesc(dev))) |
| 652 | goto out_err; | 651 | goto out_err; |
| @@ -658,7 +657,7 @@ static int netdev_open(struct net_device *dev) | |||
| 658 | 657 | ||
| 659 | netif_start_queue(dev); | 658 | netif_start_queue(dev); |
| 660 | if (debug > 2) | 659 | if (debug > 2) |
| 661 | printk(KERN_DEBUG "%s: Done netdev_open()\n", dev->name); | 660 | netdev_dbg(dev, "Done netdev_open()\n"); |
| 662 | 661 | ||
| 663 | /* Set the timer to check for link beat. */ | 662 | /* Set the timer to check for link beat. */ |
| 664 | init_timer(&np->timer); | 663 | init_timer(&np->timer); |
| @@ -787,9 +786,9 @@ static void netdev_timer(unsigned long data) | |||
| 787 | void __iomem *ioaddr = np->base_addr; | 786 | void __iomem *ioaddr = np->base_addr; |
| 788 | 787 | ||
| 789 | if (debug > 2) | 788 | if (debug > 2) |
| 790 | printk(KERN_DEBUG "%s: Media selection timer tick, status %08x config %08x\n", | 789 | netdev_dbg(dev, "Media selection timer tick, status %08x config %08x\n", |
| 791 | dev->name, ioread32(ioaddr + IntrStatus), | 790 | ioread32(ioaddr + IntrStatus), |
| 792 | ioread32(ioaddr + NetworkConfig)); | 791 | ioread32(ioaddr + NetworkConfig)); |
| 793 | spin_lock_irq(&np->lock); | 792 | spin_lock_irq(&np->lock); |
| 794 | update_csr6(dev, update_link(dev)); | 793 | update_csr6(dev, update_link(dev)); |
| 795 | spin_unlock_irq(&np->lock); | 794 | spin_unlock_irq(&np->lock); |
| @@ -1056,8 +1055,8 @@ static netdev_tx_t start_tx(struct sk_buff *skb, struct net_device *dev) | |||
| 1056 | spin_unlock_irq(&np->lock); | 1055 | spin_unlock_irq(&np->lock); |
| 1057 | 1056 | ||
| 1058 | if (debug > 4) { | 1057 | if (debug > 4) { |
| 1059 | printk(KERN_DEBUG "%s: Transmit frame #%d queued in slot %d\n", | 1058 | netdev_dbg(dev, "Transmit frame #%d queued in slot %d\n", |
| 1060 | dev->name, np->cur_tx, entry); | 1059 | np->cur_tx, entry); |
| 1061 | } | 1060 | } |
| 1062 | return NETDEV_TX_OK; | 1061 | return NETDEV_TX_OK; |
| 1063 | } | 1062 | } |
| @@ -1074,8 +1073,8 @@ static void netdev_tx_done(struct net_device *dev) | |||
| 1074 | if (tx_status & 0x8000) { /* There was an error, log it. */ | 1073 | if (tx_status & 0x8000) { /* There was an error, log it. */ |
| 1075 | #ifndef final_version | 1074 | #ifndef final_version |
| 1076 | if (debug > 1) | 1075 | if (debug > 1) |
| 1077 | printk(KERN_DEBUG "%s: Transmit error, Tx status %08x\n", | 1076 | netdev_dbg(dev, "Transmit error, Tx status %08x\n", |
| 1078 | dev->name, tx_status); | 1077 | tx_status); |
| 1079 | #endif | 1078 | #endif |
| 1080 | np->stats.tx_errors++; | 1079 | np->stats.tx_errors++; |
| 1081 | if (tx_status & 0x0104) np->stats.tx_aborted_errors++; | 1080 | if (tx_status & 0x0104) np->stats.tx_aborted_errors++; |
| @@ -1087,8 +1086,8 @@ static void netdev_tx_done(struct net_device *dev) | |||
| 1087 | } else { | 1086 | } else { |
| 1088 | #ifndef final_version | 1087 | #ifndef final_version |
| 1089 | if (debug > 3) | 1088 | if (debug > 3) |
| 1090 | printk(KERN_DEBUG "%s: Transmit slot %d ok, Tx status %08x\n", | 1089 | netdev_dbg(dev, "Transmit slot %d ok, Tx status %08x\n", |
| 1091 | dev->name, entry, tx_status); | 1090 | entry, tx_status); |
| 1092 | #endif | 1091 | #endif |
| 1093 | np->stats.tx_bytes += np->tx_skbuff[entry]->len; | 1092 | np->stats.tx_bytes += np->tx_skbuff[entry]->len; |
| 1094 | np->stats.collisions += (tx_status >> 3) & 15; | 1093 | np->stats.collisions += (tx_status >> 3) & 15; |
| @@ -1131,8 +1130,7 @@ static irqreturn_t intr_handler(int irq, void *dev_instance) | |||
| 1131 | iowrite32(intr_status & 0x001ffff, ioaddr + IntrStatus); | 1130 | iowrite32(intr_status & 0x001ffff, ioaddr + IntrStatus); |
| 1132 | 1131 | ||
| 1133 | if (debug > 4) | 1132 | if (debug > 4) |
| 1134 | printk(KERN_DEBUG "%s: Interrupt, status %04x\n", | 1133 | netdev_dbg(dev, "Interrupt, status %04x\n", intr_status); |
| 1135 | dev->name, intr_status); | ||
| 1136 | 1134 | ||
| 1137 | if ((intr_status & (NormalIntr|AbnormalIntr)) == 0) | 1135 | if ((intr_status & (NormalIntr|AbnormalIntr)) == 0) |
| 1138 | break; | 1136 | break; |
| @@ -1173,8 +1171,8 @@ static irqreturn_t intr_handler(int irq, void *dev_instance) | |||
| 1173 | } while (1); | 1171 | } while (1); |
| 1174 | 1172 | ||
| 1175 | if (debug > 3) | 1173 | if (debug > 3) |
| 1176 | printk(KERN_DEBUG "%s: exiting interrupt, status=%#4.4x\n", | 1174 | netdev_dbg(dev, "exiting interrupt, status=%#4.4x\n", |
| 1177 | dev->name, ioread32(ioaddr + IntrStatus)); | 1175 | ioread32(ioaddr + IntrStatus)); |
| 1178 | return IRQ_RETVAL(handled); | 1176 | return IRQ_RETVAL(handled); |
| 1179 | } | 1177 | } |
| 1180 | 1178 | ||
| @@ -1187,8 +1185,8 @@ static int netdev_rx(struct net_device *dev) | |||
| 1187 | int work_limit = np->dirty_rx + RX_RING_SIZE - np->cur_rx; | 1185 | int work_limit = np->dirty_rx + RX_RING_SIZE - np->cur_rx; |
| 1188 | 1186 | ||
| 1189 | if (debug > 4) { | 1187 | if (debug > 4) { |
| 1190 | printk(KERN_DEBUG " In netdev_rx(), entry %d status %04x\n", | 1188 | netdev_dbg(dev, " In netdev_rx(), entry %d status %04x\n", |
| 1191 | entry, np->rx_ring[entry].status); | 1189 | entry, np->rx_ring[entry].status); |
| 1192 | } | 1190 | } |
| 1193 | 1191 | ||
| 1194 | /* If EOP is set on the next entry, it's a new packet. Send it up. */ | 1192 | /* If EOP is set on the next entry, it's a new packet. Send it up. */ |
| @@ -1197,8 +1195,8 @@ static int netdev_rx(struct net_device *dev) | |||
| 1197 | s32 status = desc->status; | 1195 | s32 status = desc->status; |
| 1198 | 1196 | ||
| 1199 | if (debug > 4) | 1197 | if (debug > 4) |
| 1200 | printk(KERN_DEBUG " netdev_rx() status was %08x\n", | 1198 | netdev_dbg(dev, " netdev_rx() status was %08x\n", |
| 1201 | status); | 1199 | status); |
| 1202 | if (status < 0) | 1200 | if (status < 0) |
| 1203 | break; | 1201 | break; |
| 1204 | if ((status & 0x38008300) != 0x0300) { | 1202 | if ((status & 0x38008300) != 0x0300) { |
| @@ -1213,8 +1211,8 @@ static int netdev_rx(struct net_device *dev) | |||
| 1213 | } else if (status & 0x8000) { | 1211 | } else if (status & 0x8000) { |
| 1214 | /* There was a fatal error. */ | 1212 | /* There was a fatal error. */ |
| 1215 | if (debug > 2) | 1213 | if (debug > 2) |
| 1216 | printk(KERN_DEBUG "%s: Receive error, Rx status %08x\n", | 1214 | netdev_dbg(dev, "Receive error, Rx status %08x\n", |
| 1217 | dev->name, status); | 1215 | status); |
| 1218 | np->stats.rx_errors++; /* end of a packet.*/ | 1216 | np->stats.rx_errors++; /* end of a packet.*/ |
| 1219 | if (status & 0x0890) np->stats.rx_length_errors++; | 1217 | if (status & 0x0890) np->stats.rx_length_errors++; |
| 1220 | if (status & 0x004C) np->stats.rx_frame_errors++; | 1218 | if (status & 0x004C) np->stats.rx_frame_errors++; |
| @@ -1227,8 +1225,8 @@ static int netdev_rx(struct net_device *dev) | |||
| 1227 | 1225 | ||
| 1228 | #ifndef final_version | 1226 | #ifndef final_version |
| 1229 | if (debug > 4) | 1227 | if (debug > 4) |
| 1230 | printk(KERN_DEBUG " netdev_rx() normal Rx pkt length %d status %x\n", | 1228 | netdev_dbg(dev, " netdev_rx() normal Rx pkt length %d status %x\n", |
| 1231 | pkt_len, status); | 1229 | pkt_len, status); |
| 1232 | #endif | 1230 | #endif |
| 1233 | /* Check if the packet is long enough to accept without copying | 1231 | /* Check if the packet is long enough to accept without copying |
| 1234 | to a minimally-sized skbuff. */ | 1232 | to a minimally-sized skbuff. */ |
| @@ -1253,10 +1251,10 @@ static int netdev_rx(struct net_device *dev) | |||
| 1253 | #ifndef final_version /* Remove after testing. */ | 1251 | #ifndef final_version /* Remove after testing. */ |
| 1254 | /* You will want this info for the initial debug. */ | 1252 | /* You will want this info for the initial debug. */ |
| 1255 | if (debug > 5) | 1253 | if (debug > 5) |
| 1256 | printk(KERN_DEBUG " Rx data %pM %pM %02x%02x %pI4\n", | 1254 | netdev_dbg(dev, " Rx data %pM %pM %02x%02x %pI4\n", |
| 1257 | &skb->data[0], &skb->data[6], | 1255 | &skb->data[0], &skb->data[6], |
| 1258 | skb->data[12], skb->data[13], | 1256 | skb->data[12], skb->data[13], |
| 1259 | &skb->data[14]); | 1257 | &skb->data[14]); |
| 1260 | #endif | 1258 | #endif |
| 1261 | skb->protocol = eth_type_trans(skb, dev); | 1259 | skb->protocol = eth_type_trans(skb, dev); |
| 1262 | netif_rx(skb); | 1260 | netif_rx(skb); |
| @@ -1294,8 +1292,7 @@ static void netdev_error(struct net_device *dev, int intr_status) | |||
| 1294 | void __iomem *ioaddr = np->base_addr; | 1292 | void __iomem *ioaddr = np->base_addr; |
| 1295 | 1293 | ||
| 1296 | if (debug > 2) | 1294 | if (debug > 2) |
| 1297 | printk(KERN_DEBUG "%s: Abnormal event, %08x\n", | 1295 | netdev_dbg(dev, "Abnormal event, %08x\n", intr_status); |
| 1298 | dev->name, intr_status); | ||
| 1299 | if (intr_status == 0xffffffff) | 1296 | if (intr_status == 0xffffffff) |
| 1300 | return; | 1297 | return; |
| 1301 | spin_lock(&np->lock); | 1298 | spin_lock(&np->lock); |
| @@ -1315,8 +1312,7 @@ static void netdev_error(struct net_device *dev, int intr_status) | |||
| 1315 | new = 127; /* load full packet before starting */ | 1312 | new = 127; /* load full packet before starting */ |
| 1316 | new = (np->csr6 & ~(0x7F << 14)) | (new<<14); | 1313 | new = (np->csr6 & ~(0x7F << 14)) | (new<<14); |
| 1317 | #endif | 1314 | #endif |
| 1318 | printk(KERN_DEBUG "%s: Tx underflow, new csr6 %08x\n", | 1315 | netdev_dbg(dev, "Tx underflow, new csr6 %08x\n", new); |
| 1319 | dev->name, new); | ||
| 1320 | update_csr6(dev, new); | 1316 | update_csr6(dev, new); |
| 1321 | } | 1317 | } |
| 1322 | if (intr_status & RxDied) { /* Missed a Rx frame. */ | 1318 | if (intr_status & RxDied) { /* Missed a Rx frame. */ |
| @@ -1489,13 +1485,12 @@ static int netdev_close(struct net_device *dev) | |||
| 1489 | netif_stop_queue(dev); | 1485 | netif_stop_queue(dev); |
| 1490 | 1486 | ||
| 1491 | if (debug > 1) { | 1487 | if (debug > 1) { |
| 1492 | printk(KERN_DEBUG "%s: Shutting down ethercard, status was %08x Config %08x\n", | 1488 | netdev_dbg(dev, "Shutting down ethercard, status was %08x Config %08x\n", |
| 1493 | dev->name, ioread32(ioaddr + IntrStatus), | 1489 | ioread32(ioaddr + IntrStatus), |
| 1494 | ioread32(ioaddr + NetworkConfig)); | 1490 | ioread32(ioaddr + NetworkConfig)); |
| 1495 | printk(KERN_DEBUG "%s: Queue pointers were Tx %d / %d, Rx %d / %d\n", | 1491 | netdev_dbg(dev, "Queue pointers were Tx %d / %d, Rx %d / %d\n", |
| 1496 | dev->name, | 1492 | np->cur_tx, np->dirty_tx, |
| 1497 | np->cur_tx, np->dirty_tx, | 1493 | np->cur_rx, np->dirty_rx); |
| 1498 | np->cur_rx, np->dirty_rx); | ||
| 1499 | } | 1494 | } |
| 1500 | 1495 | ||
| 1501 | /* Stop the chip's Tx and Rx processes. */ | 1496 | /* Stop the chip's Tx and Rx processes. */ |
diff --git a/drivers/net/tulip/xircom_cb.c b/drivers/net/tulip/xircom_cb.c index 7e8287260c2f..988b8eb24d37 100644 --- a/drivers/net/tulip/xircom_cb.c +++ b/drivers/net/tulip/xircom_cb.c | |||
| @@ -333,7 +333,7 @@ static irqreturn_t xircom_interrupt(int irq, void *dev_instance) | |||
| 333 | 333 | ||
| 334 | if (link_status_changed(card)) { | 334 | if (link_status_changed(card)) { |
| 335 | int newlink; | 335 | int newlink; |
| 336 | printk(KERN_DEBUG "xircom_cb: Link status has changed\n"); | 336 | netdev_dbg(dev, "Link status has changed\n"); |
| 337 | newlink = link_status(card); | 337 | newlink = link_status(card); |
| 338 | netdev_info(dev, "Link is %d mbit\n", newlink); | 338 | netdev_info(dev, "Link is %d mbit\n", newlink); |
| 339 | if (newlink) | 339 | if (newlink) |
