diff options
author | Joe Perches <joe@perches.com> | 2010-01-28 15:59:24 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-01 02:26:55 -0500 |
commit | 1df8bbd1420705277cd382b1386cda724d61a678 (patch) | |
tree | 9eacee6d068cd77a9e07d269dd997104add9cded /drivers/net/tulip | |
parent | fa0b9a4c41490d550ebd3bd418f4551c989fec5d (diff) |
tulip/pnic.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: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tulip')
-rw-r--r-- | drivers/net/tulip/pnic.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/drivers/net/tulip/pnic.c b/drivers/net/tulip/pnic.c index d3253ed09dfc..966efa1a27d7 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 %8.8x, %s.\n", | 43 | printk(KERN_DEBUG "%s: PNIC autonegotiated status %08x, %s\n", |
44 | dev->name, phy_reg, medianame[dev->if_port]); | 44 | dev->name, 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 %8.8x, CSR5 %8.8x.\n", | 61 | printk(KERN_DEBUG "%s: PNIC link changed state %08x, CSR5 %08x\n", |
62 | dev->name, phy_reg, csr5); | 62 | dev->name, 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,9 +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 %8.8x, %s " | 117 | printk(KERN_DEBUG "%s: PNIC timer PHY status %08x, %s CSR5 %08x\n", |
118 | "CSR5 %8.8x.\n", | 118 | dev->name, phy_reg, medianame[dev->if_port], csr5); |
119 | dev->name, phy_reg, medianame[dev->if_port], csr5); | ||
120 | if (phy_reg & 0x04000000) { /* Remote link fault */ | 119 | if (phy_reg & 0x04000000) { /* Remote link fault */ |
121 | iowrite32(0x0201F078, ioaddr + 0xB8); | 120 | iowrite32(0x0201F078, ioaddr + 0xB8); |
122 | next_tick = 1*HZ; | 121 | next_tick = 1*HZ; |
@@ -126,10 +125,11 @@ void pnic_timer(unsigned long data) | |||
126 | next_tick = 60*HZ; | 125 | next_tick = 60*HZ; |
127 | } else if (csr5 & TPLnkFail) { /* 100baseTx link beat */ | 126 | } else if (csr5 & TPLnkFail) { /* 100baseTx link beat */ |
128 | if (tulip_debug > 1) | 127 | if (tulip_debug > 1) |
129 | printk(KERN_DEBUG "%s: %s link beat failed, CSR12 %4.4x, " | 128 | printk(KERN_DEBUG "%s: %s link beat failed, CSR12 %04x, CSR5 %08x, PHY %03x\n", |
130 | "CSR5 %8.8x, PHY %3.3x.\n", | 129 | dev->name, medianame[dev->if_port], |
131 | dev->name, medianame[dev->if_port], csr12, | 130 | csr12, |
132 | ioread32(ioaddr + CSR5), ioread32(ioaddr + 0xB8)); | 131 | ioread32(ioaddr + CSR5), |
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)) { |
@@ -151,10 +151,11 @@ void pnic_timer(unsigned long data) | |||
151 | tulip_restart_rxtx(tp); | 151 | tulip_restart_rxtx(tp); |
152 | dev->trans_start = jiffies; | 152 | dev->trans_start = jiffies; |
153 | if (tulip_debug > 1) | 153 | if (tulip_debug > 1) |
154 | printk(KERN_INFO "%s: Changing PNIC configuration to %s " | 154 | dev_info(&dev->dev, |
155 | "%s-duplex, CSR6 %8.8x.\n", | 155 | "Changing PNIC configuration to %s %s-duplex, CSR6 %08x\n", |
156 | dev->name, medianame[dev->if_port], | 156 | medianame[dev->if_port], |
157 | tp->full_duplex ? "full" : "half", new_csr6); | 157 | tp->full_duplex ? "full" : "half", |
158 | new_csr6); | ||
158 | } | 159 | } |
159 | } | 160 | } |
160 | } | 161 | } |
@@ -162,7 +163,7 @@ too_good_connection: | |||
162 | mod_timer(&tp->timer, RUN_AT(next_tick)); | 163 | mod_timer(&tp->timer, RUN_AT(next_tick)); |
163 | if(!ioread32(ioaddr + CSR7)) { | 164 | if(!ioread32(ioaddr + CSR7)) { |
164 | if (tulip_debug > 1) | 165 | if (tulip_debug > 1) |
165 | printk(KERN_INFO "%s: sw timer wakeup.\n", dev->name); | 166 | dev_info(&dev->dev, "sw timer wakeup\n"); |
166 | disable_irq(dev->irq); | 167 | disable_irq(dev->irq); |
167 | tulip_refill_rx(dev); | 168 | tulip_refill_rx(dev); |
168 | enable_irq(dev->irq); | 169 | enable_irq(dev->irq); |