Commit 27146c43 authored by Joe Perches's avatar Joe Perches Committed by David S. Miller

tulip/timer.c: Use dev_<level> and pr_<level>

Convert printks to dev_<level> where a dev is available
Convert printks to pr_<level> where not
Coalesce format strings
Change print formats with %d.dx to %0dx
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 22086a11
...@@ -28,10 +28,10 @@ void tulip_media_task(struct work_struct *work) ...@@ -28,10 +28,10 @@ void tulip_media_task(struct work_struct *work)
unsigned long flags; unsigned long flags;
if (tulip_debug > 2) { if (tulip_debug > 2) {
printk(KERN_DEBUG "%s: Media selection tick, %s, status %8.8x mode" printk(KERN_DEBUG "%s: Media selection tick, %s, status %08x mode %08x SIA %08x %08x %08x %08x\n",
" %8.8x SIA %8.8x %8.8x %8.8x %8.8x.\n", dev->name, medianame[dev->if_port],
dev->name, medianame[dev->if_port], ioread32(ioaddr + CSR5), ioread32(ioaddr + CSR5), ioread32(ioaddr + CSR6),
ioread32(ioaddr + CSR6), csr12, ioread32(ioaddr + CSR13), csr12, ioread32(ioaddr + CSR13),
ioread32(ioaddr + CSR14), ioread32(ioaddr + CSR15)); ioread32(ioaddr + CSR14), ioread32(ioaddr + CSR15));
} }
switch (tp->chip_id) { switch (tp->chip_id) {
...@@ -48,9 +48,9 @@ void tulip_media_task(struct work_struct *work) ...@@ -48,9 +48,9 @@ void tulip_media_task(struct work_struct *work)
Assume this a generic MII or SYM transceiver. */ Assume this a generic MII or SYM transceiver. */
next_tick = 60*HZ; next_tick = 60*HZ;
if (tulip_debug > 2) if (tulip_debug > 2)
printk(KERN_DEBUG "%s: network media monitor CSR6 %8.8x " printk(KERN_DEBUG "%s: network media monitor CSR6 %08x CSR12 0x%02x\n",
"CSR12 0x%2.2x.\n", dev->name,
dev->name, ioread32(ioaddr + CSR6), csr12 & 0xff); ioread32(ioaddr + CSR6), csr12 & 0xff);
break; break;
} }
mleaf = &tp->mtable->mleaf[tp->cur_index]; mleaf = &tp->mtable->mleaf[tp->cur_index];
...@@ -62,8 +62,7 @@ void tulip_media_task(struct work_struct *work) ...@@ -62,8 +62,7 @@ void tulip_media_task(struct work_struct *work)
s8 bitnum = p[offset]; s8 bitnum = p[offset];
if (p[offset+1] & 0x80) { if (p[offset+1] & 0x80) {
if (tulip_debug > 1) if (tulip_debug > 1)
printk(KERN_DEBUG"%s: Transceiver monitor tick " printk(KERN_DEBUG "%s: Transceiver monitor tick CSR12=%#02x, no media sense\n",
"CSR12=%#2.2x, no media sense.\n",
dev->name, csr12); dev->name, csr12);
if (mleaf->type == 4) { if (mleaf->type == 4) {
if (mleaf->media == 3 && (csr12 & 0x02)) if (mleaf->media == 3 && (csr12 & 0x02))
...@@ -72,8 +71,7 @@ void tulip_media_task(struct work_struct *work) ...@@ -72,8 +71,7 @@ void tulip_media_task(struct work_struct *work)
break; break;
} }
if (tulip_debug > 2) if (tulip_debug > 2)
printk(KERN_DEBUG "%s: Transceiver monitor tick: CSR12=%#2.2x" printk(KERN_DEBUG "%s: Transceiver monitor tick: CSR12=%#02x bit %d is %d, expecting %d\n",
" bit %d is %d, expecting %d.\n",
dev->name, csr12, (bitnum >> 1) & 7, dev->name, csr12, (bitnum >> 1) & 7,
(csr12 & (1 << ((bitnum >> 1) & 7))) != 0, (csr12 & (1 << ((bitnum >> 1) & 7))) != 0,
(bitnum >= 0)); (bitnum >= 0));
...@@ -81,7 +79,8 @@ void tulip_media_task(struct work_struct *work) ...@@ -81,7 +79,8 @@ void tulip_media_task(struct work_struct *work)
if ((bitnum < 0) != if ((bitnum < 0) !=
((csr12 & (1 << ((bitnum >> 1) & 7))) != 0)) { ((csr12 & (1 << ((bitnum >> 1) & 7))) != 0)) {
if (tulip_debug > 2) if (tulip_debug > 2)
printk(KERN_DEBUG "%s: Link beat detected for %s.\n", dev->name, printk(KERN_DEBUG "%s: Link beat detected for %s\n",
dev->name,
medianame[mleaf->media & MEDIA_MASK]); medianame[mleaf->media & MEDIA_MASK]);
if ((p[2] & 0x61) == 0x01) /* Bogus Znyx board. */ if ((p[2] & 0x61) == 0x01) /* Bogus Znyx board. */
goto actually_mii; goto actually_mii;
...@@ -100,9 +99,9 @@ void tulip_media_task(struct work_struct *work) ...@@ -100,9 +99,9 @@ void tulip_media_task(struct work_struct *work)
if (tulip_media_cap[dev->if_port] & MediaIsFD) if (tulip_media_cap[dev->if_port] & MediaIsFD)
goto select_next_media; /* Skip FD entries. */ goto select_next_media; /* Skip FD entries. */
if (tulip_debug > 1) if (tulip_debug > 1)
printk(KERN_DEBUG "%s: No link beat on media %s," printk(KERN_DEBUG "%s: No link beat on media %s, trying transceiver type %s\n",
" trying transceiver type %s.\n", dev->name,
dev->name, medianame[mleaf->media & MEDIA_MASK], medianame[mleaf->media & MEDIA_MASK],
medianame[tp->mtable->mleaf[tp->cur_index].media]); medianame[tp->mtable->mleaf[tp->cur_index].media]);
tulip_select_media(dev, 0); tulip_select_media(dev, 0);
/* Restart the transmit process. */ /* Restart the transmit process. */
...@@ -151,7 +150,7 @@ void mxic_timer(unsigned long data) ...@@ -151,7 +150,7 @@ void mxic_timer(unsigned long data)
int next_tick = 60*HZ; int next_tick = 60*HZ;
if (tulip_debug > 3) { if (tulip_debug > 3) {
printk(KERN_INFO"%s: MXIC negotiation status %8.8x.\n", dev->name, dev_info(&dev->dev, "MXIC negotiation status %08x\n",
ioread32(ioaddr + CSR12)); ioread32(ioaddr + CSR12));
} }
if (next_tick) { if (next_tick) {
...@@ -167,8 +166,7 @@ void comet_timer(unsigned long data) ...@@ -167,8 +166,7 @@ void comet_timer(unsigned long data)
int next_tick = 60*HZ; int next_tick = 60*HZ;
if (tulip_debug > 1) if (tulip_debug > 1)
printk(KERN_DEBUG "%s: Comet link status %4.4x partner capability " printk(KERN_DEBUG "%s: Comet link status %04x partner capability %04x\n",
"%4.4x.\n",
dev->name, dev->name,
tulip_mdio_read(dev, tp->phys[0], 1), tulip_mdio_read(dev, tp->phys[0], 1),
tulip_mdio_read(dev, tp->phys[0], 5)); tulip_mdio_read(dev, tp->phys[0], 5));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment