aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tulip/timer.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-05-09 05:45:22 -0400
committerDavid S. Miller <davem@davemloft.net>2011-05-09 15:51:15 -0400
commit726b65ad444dd142e34d0087fcbba03d16b34ca6 (patch)
treeee4e56b9d7aea7dbb10ce0fe57706232f42d6b74 /drivers/net/tulip/timer.c
parent163ef0b5922b14751e93218bdf2c9fe8f74b9c9d (diff)
tulip: Convert uses of KERN_DEBUG
Convert logging messages to more current styles. Added -DDEBUG to Makefile to maintain current message logging. This could be converted to a specific CONFIG_TULIP_DEBUG option. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tulip/timer.c')
-rw-r--r--drivers/net/tulip/timer.c47
1 files changed, 22 insertions, 25 deletions
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 */