diff options
author | Joe Perches <joe@perches.com> | 2010-01-28 15:59:25 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-01 02:26:56 -0500 |
commit | 22086a1172b69b9f6200e169dc99a252a204affb (patch) | |
tree | 1de2239071846dd355a92df1d88d4d14dab94aff /drivers/net/tulip | |
parent | 1df8bbd1420705277cd382b1386cda724d61a678 (diff) |
tulip/pnic2.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/pnic2.c | 59 |
1 files changed, 30 insertions, 29 deletions
diff --git a/drivers/net/tulip/pnic2.c b/drivers/net/tulip/pnic2.c index d8418694bf46..b8197666021e 100644 --- a/drivers/net/tulip/pnic2.c +++ b/drivers/net/tulip/pnic2.c | |||
@@ -87,8 +87,8 @@ void pnic2_timer(unsigned long data) | |||
87 | int next_tick = 60*HZ; | 87 | int next_tick = 60*HZ; |
88 | 88 | ||
89 | if (tulip_debug > 3) | 89 | if (tulip_debug > 3) |
90 | printk(KERN_INFO"%s: PNIC2 negotiation status %8.8x.\n", | 90 | dev_info(&dev->dev, "PNIC2 negotiation status %08x\n", |
91 | dev->name,ioread32(ioaddr + CSR12)); | 91 | ioread32(ioaddr + CSR12)); |
92 | 92 | ||
93 | if (next_tick) { | 93 | if (next_tick) { |
94 | mod_timer(&tp->timer, RUN_AT(next_tick)); | 94 | mod_timer(&tp->timer, RUN_AT(next_tick)); |
@@ -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, " | 128 | printk(KERN_DEBUG "%s: Restarting PNIC2 autonegotiation, csr14=%08x\n", |
129 | "csr14=%8.8x.\n", dev->name, csr14); | 129 | dev->name, 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,8 @@ 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, " | 140 | printk(KERN_DEBUG "%s: On Entry to Nway, csr6=%08x\n", |
141 | "csr6=%8.8x.\n", dev->name, tp->csr6); | 141 | dev->name, tp->csr6); |
142 | 142 | ||
143 | /* mask off any bits not to touch | 143 | /* mask off any bits not to touch |
144 | * comment at top of file explains mask value | 144 | * comment at top of file explains mask value |
@@ -181,9 +181,9 @@ void pnic2_lnk_change(struct net_device *dev, int csr5) | |||
181 | int csr12 = ioread32(ioaddr + CSR12); | 181 | int csr12 = ioread32(ioaddr + CSR12); |
182 | 182 | ||
183 | if (tulip_debug > 1) | 183 | if (tulip_debug > 1) |
184 | printk(KERN_INFO"%s: PNIC2 link status interrupt %8.8x, " | 184 | dev_info(&dev->dev, |
185 | " CSR5 %x, %8.8x.\n", dev->name, csr12, | 185 | "PNIC2 link status interrupt %08x, CSR5 %x, %08x\n", |
186 | csr5, ioread32(ioaddr + CSR14)); | 186 | csr12, csr5, ioread32(ioaddr + CSR14)); |
187 | 187 | ||
188 | /* If NWay finished and we have a negotiated partner capability. | 188 | /* If NWay finished and we have a negotiated partner capability. |
189 | * check bits 14:12 for bit pattern 101 - all is good | 189 | * check bits 14:12 for bit pattern 101 - all is good |
@@ -215,9 +215,9 @@ void pnic2_lnk_change(struct net_device *dev, int csr5) | |||
215 | else if (negotiated & 0x0020) dev->if_port = 0; | 215 | else if (negotiated & 0x0020) dev->if_port = 0; |
216 | else { | 216 | else { |
217 | if (tulip_debug > 1) | 217 | if (tulip_debug > 1) |
218 | printk(KERN_INFO "%s: funny autonegotiate result " | 218 | dev_info(&dev->dev, |
219 | "csr12 %8.8x advertising %4.4x\n", | 219 | "funny autonegotiate result csr12 %08x advertising %04x\n", |
220 | dev->name, csr12, tp->sym_advertise); | 220 | csr12, tp->sym_advertise); |
221 | tp->nwayset = 0; | 221 | tp->nwayset = 0; |
222 | /* so check if 100baseTx link state is okay */ | 222 | /* so check if 100baseTx link state is okay */ |
223 | if ((csr12 & 2) == 0 && (tp->sym_advertise & 0x0180)) | 223 | if ((csr12 & 2) == 0 && (tp->sym_advertise & 0x0180)) |
@@ -231,10 +231,11 @@ void pnic2_lnk_change(struct net_device *dev, int csr5) | |||
231 | 231 | ||
232 | if (tulip_debug > 1) { | 232 | if (tulip_debug > 1) { |
233 | if (tp->nwayset) | 233 | if (tp->nwayset) |
234 | printk(KERN_INFO "%s: Switching to %s based on link " | 234 | dev_info(&dev->dev, |
235 | "negotiation %4.4x & %4.4x = %4.4x.\n", | 235 | "Switching to %s based on link negotiation %04x & %04x = %04x\n", |
236 | dev->name, medianame[dev->if_port], | 236 | medianame[dev->if_port], |
237 | tp->sym_advertise, tp->lpar, negotiated); | 237 | tp->sym_advertise, tp->lpar, |
238 | negotiated); | ||
238 | } | 239 | } |
239 | 240 | ||
240 | /* remember to turn off bit 7 - autonegotiate | 241 | /* remember to turn off bit 7 - autonegotiate |
@@ -270,9 +271,9 @@ void pnic2_lnk_change(struct net_device *dev, int csr5) | |||
270 | iowrite32(1, ioaddr + CSR13); | 271 | iowrite32(1, ioaddr + CSR13); |
271 | 272 | ||
272 | if (tulip_debug > 2) | 273 | if (tulip_debug > 2) |
273 | printk(KERN_DEBUG "%s: Setting CSR6 %8.8x/%x CSR12 " | 274 | printk(KERN_DEBUG "%s: Setting CSR6 %08x/%x CSR12 %08x\n", |
274 | "%8.8x.\n", dev->name, tp->csr6, | 275 | dev->name, tp->csr6, |
275 | ioread32(ioaddr + CSR6), ioread32(ioaddr + CSR12)); | 276 | ioread32(ioaddr + CSR6), ioread32(ioaddr + CSR12)); |
276 | 277 | ||
277 | /* now the following actually writes out the | 278 | /* now the following actually writes out the |
278 | * new csr6 values | 279 | * new csr6 values |
@@ -282,9 +283,9 @@ void pnic2_lnk_change(struct net_device *dev, int csr5) | |||
282 | return; | 283 | return; |
283 | 284 | ||
284 | } else { | 285 | } else { |
285 | printk(KERN_INFO "%s: Autonegotiation failed, " | 286 | dev_info(&dev->dev, |
286 | "using %s, link beat status %4.4x.\n", | 287 | "Autonegotiation failed, using %s, link beat status %04x\n", |
287 | dev->name, medianame[dev->if_port], csr12); | 288 | medianame[dev->if_port], csr12); |
288 | 289 | ||
289 | /* remember to turn off bit 7 - autonegotiate | 290 | /* remember to turn off bit 7 - autonegotiate |
290 | * enable so we don't forget | 291 | * enable so we don't forget |
@@ -339,9 +340,9 @@ void pnic2_lnk_change(struct net_device *dev, int csr5) | |||
339 | /* we are at 100mb and a potential link change occurred */ | 340 | /* we are at 100mb and a potential link change occurred */ |
340 | 341 | ||
341 | if (tulip_debug > 1) | 342 | if (tulip_debug > 1) |
342 | printk(KERN_INFO"%s: PNIC2 %s link beat %s.\n", | 343 | dev_info(&dev->dev, "PNIC2 %s link beat %s\n", |
343 | dev->name, medianame[dev->if_port], | 344 | medianame[dev->if_port], |
344 | (csr12 & 2) ? "failed" : "good"); | 345 | (csr12 & 2) ? "failed" : "good"); |
345 | 346 | ||
346 | /* check 100 link beat */ | 347 | /* check 100 link beat */ |
347 | 348 | ||
@@ -364,9 +365,9 @@ void pnic2_lnk_change(struct net_device *dev, int csr5) | |||
364 | /* we are at 10mb and a potential link change occurred */ | 365 | /* we are at 10mb and a potential link change occurred */ |
365 | 366 | ||
366 | if (tulip_debug > 1) | 367 | if (tulip_debug > 1) |
367 | printk(KERN_INFO"%s: PNIC2 %s link beat %s.\n", | 368 | dev_info(&dev->dev, "PNIC2 %s link beat %s\n", |
368 | dev->name, medianame[dev->if_port], | 369 | medianame[dev->if_port], |
369 | (csr12 & 4) ? "failed" : "good"); | 370 | (csr12 & 4) ? "failed" : "good"); |
370 | 371 | ||
371 | 372 | ||
372 | tp->nway = 0; | 373 | tp->nway = 0; |
@@ -385,7 +386,7 @@ void pnic2_lnk_change(struct net_device *dev, int csr5) | |||
385 | 386 | ||
386 | 387 | ||
387 | if (tulip_debug > 1) | 388 | if (tulip_debug > 1) |
388 | printk(KERN_INFO"%s: PNIC2 Link Change Default?\n",dev->name); | 389 | dev_info(&dev->dev, "PNIC2 Link Change Default?\n"); |
389 | 390 | ||
390 | /* if all else fails default to trying 10baseT-HD */ | 391 | /* if all else fails default to trying 10baseT-HD */ |
391 | dev->if_port = 0; | 392 | dev->if_port = 0; |