aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/3c527.c
diff options
context:
space:
mode:
authorAlexander Beregalov <a.beregalov@gmail.com>2009-05-26 08:35:26 -0400
committerDavid S. Miller <davem@davemloft.net>2009-05-26 23:35:03 -0400
commit39738e161f7315bfa8f31a91d2262f93d818a7cd (patch)
tree97777f397e4b2ef76a44d8eb539b2c3e39718337 /drivers/net/3c527.c
parent646cdb32831eebe8c2f742c293d0d266326854d9 (diff)
3c5xx: convert printk() to pr_<foo>()
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/3c527.c')
-rw-r--r--drivers/net/3c527.c46
1 files changed, 21 insertions, 25 deletions
diff --git a/drivers/net/3c527.c b/drivers/net/3c527.c
index b61073c42bf8..c10ca30458f6 100644
--- a/drivers/net/3c527.c
+++ b/drivers/net/3c527.c
@@ -125,8 +125,6 @@ static const char* cardname = DRV_NAME;
125#define NET_DEBUG 2 125#define NET_DEBUG 2
126#endif 126#endif
127 127
128#undef DEBUG_IRQ
129
130static unsigned int mc32_debug = NET_DEBUG; 128static unsigned int mc32_debug = NET_DEBUG;
131 129
132/* The number of low I/O ports used by the ethercard. */ 130/* The number of low I/O ports used by the ethercard. */
@@ -351,15 +349,15 @@ static int __init mc32_probe1(struct net_device *dev, int slot)
351 /* Time to play MCA games */ 349 /* Time to play MCA games */
352 350
353 if (mc32_debug && version_printed++ == 0) 351 if (mc32_debug && version_printed++ == 0)
354 printk(KERN_DEBUG "%s", version); 352 pr_debug("%s", version);
355 353
356 printk(KERN_INFO "%s: %s found in slot %d:", dev->name, cardname, slot); 354 pr_info("%s: %s found in slot %d: ", dev->name, cardname, slot);
357 355
358 POS = mca_read_stored_pos(slot, 2); 356 POS = mca_read_stored_pos(slot, 2);
359 357
360 if(!(POS&1)) 358 if(!(POS&1))
361 { 359 {
362 printk(" disabled.\n"); 360 pr_cont("disabled.\n");
363 return -ENODEV; 361 return -ENODEV;
364 } 362 }
365 363
@@ -370,7 +368,7 @@ static int __init mc32_probe1(struct net_device *dev, int slot)
370 POS = mca_read_stored_pos(slot, 4); 368 POS = mca_read_stored_pos(slot, 4);
371 if(!(POS&1)) 369 if(!(POS&1))
372 { 370 {
373 printk("memory window disabled.\n"); 371 pr_cont("memory window disabled.\n");
374 return -ENODEV; 372 return -ENODEV;
375 } 373 }
376 374
@@ -379,7 +377,7 @@ static int __init mc32_probe1(struct net_device *dev, int slot)
379 i=(POS>>4)&3; 377 i=(POS>>4)&3;
380 if(i==3) 378 if(i==3)
381 { 379 {
382 printk("invalid memory window.\n"); 380 pr_cont("invalid memory window.\n");
383 return -ENODEV; 381 return -ENODEV;
384 } 382 }
385 383
@@ -392,11 +390,11 @@ static int __init mc32_probe1(struct net_device *dev, int slot)
392 390
393 if(!request_region(dev->base_addr, MC32_IO_EXTENT, cardname)) 391 if(!request_region(dev->base_addr, MC32_IO_EXTENT, cardname))
394 { 392 {
395 printk("io 0x%3lX, which is busy.\n", dev->base_addr); 393 pr_cont("io 0x%3lX, which is busy.\n", dev->base_addr);
396 return -EBUSY; 394 return -EBUSY;
397 } 395 }
398 396
399 printk("io 0x%3lX irq %d mem 0x%lX (%dK)\n", 397 pr_cont("io 0x%3lX irq %d mem 0x%lX (%dK)\n",
400 dev->base_addr, dev->irq, dev->mem_start, i/1024); 398 dev->base_addr, dev->irq, dev->mem_start, i/1024);
401 399
402 400
@@ -416,7 +414,7 @@ static int __init mc32_probe1(struct net_device *dev, int slot)
416 dev->dev_addr[i] = mca_read_pos(slot,3); 414 dev->dev_addr[i] = mca_read_pos(slot,3);
417 } 415 }
418 416
419 printk("%s: Address %pM", dev->name, dev->dev_addr); 417 pr_info("%s: Address %pM ", dev->name, dev->dev_addr);
420 418
421 mca_write_pos(slot, 6, 0); 419 mca_write_pos(slot, 6, 0);
422 mca_write_pos(slot, 7, 0); 420 mca_write_pos(slot, 7, 0);
@@ -424,9 +422,9 @@ static int __init mc32_probe1(struct net_device *dev, int slot)
424 POS = mca_read_stored_pos(slot, 4); 422 POS = mca_read_stored_pos(slot, 4);
425 423
426 if(POS&2) 424 if(POS&2)
427 printk(" : BNC port selected.\n"); 425 pr_cont(": BNC port selected.\n");
428 else 426 else
429 printk(" : AUI port selected.\n"); 427 pr_cont(": AUI port selected.\n");
430 428
431 POS=inb(dev->base_addr+HOST_CTRL); 429 POS=inb(dev->base_addr+HOST_CTRL);
432 POS|=HOST_CTRL_ATTN|HOST_CTRL_RESET; 430 POS|=HOST_CTRL_ATTN|HOST_CTRL_RESET;
@@ -447,7 +445,7 @@ static int __init mc32_probe1(struct net_device *dev, int slot)
447 err = request_irq(dev->irq, &mc32_interrupt, IRQF_SHARED | IRQF_SAMPLE_RANDOM, DRV_NAME, dev); 445 err = request_irq(dev->irq, &mc32_interrupt, IRQF_SHARED | IRQF_SAMPLE_RANDOM, DRV_NAME, dev);
448 if (err) { 446 if (err) {
449 release_region(dev->base_addr, MC32_IO_EXTENT); 447 release_region(dev->base_addr, MC32_IO_EXTENT);
450 printk(KERN_ERR "%s: unable to get IRQ %d.\n", DRV_NAME, dev->irq); 448 pr_err("%s: unable to get IRQ %d.\n", DRV_NAME, dev->irq);
451 goto err_exit_ports; 449 goto err_exit_ports;
452 } 450 }
453 451
@@ -463,7 +461,7 @@ static int __init mc32_probe1(struct net_device *dev, int slot)
463 i++; 461 i++;
464 if(i == 1000) 462 if(i == 1000)
465 { 463 {
466 printk(KERN_ERR "%s: failed to boot adapter.\n", dev->name); 464 pr_err("%s: failed to boot adapter.\n", dev->name);
467 err = -ENODEV; 465 err = -ENODEV;
468 goto err_exit_irq; 466 goto err_exit_irq;
469 } 467 }
@@ -475,10 +473,10 @@ static int __init mc32_probe1(struct net_device *dev, int slot)
475 if(base>0) 473 if(base>0)
476 { 474 {
477 if(base < 0x0C) 475 if(base < 0x0C)
478 printk(KERN_ERR "%s: %s%s.\n", dev->name, failures[base-1], 476 pr_err("%s: %s%s.\n", dev->name, failures[base-1],
479 base<0x0A?" test failure":""); 477 base<0x0A?" test failure":"");
480 else 478 else
481 printk(KERN_ERR "%s: unknown failure %d.\n", dev->name, base); 479 pr_err("%s: unknown failure %d.\n", dev->name, base);
482 err = -ENODEV; 480 err = -ENODEV;
483 goto err_exit_irq; 481 goto err_exit_irq;
484 } 482 }
@@ -494,7 +492,7 @@ static int __init mc32_probe1(struct net_device *dev, int slot)
494 udelay(50); 492 udelay(50);
495 if(n>100) 493 if(n>100)
496 { 494 {
497 printk(KERN_ERR "%s: mailbox read fail (%d).\n", dev->name, i); 495 pr_err("%s: mailbox read fail (%d).\n", dev->name, i);
498 err = -ENODEV; 496 err = -ENODEV;
499 goto err_exit_irq; 497 goto err_exit_irq;
500 } 498 }
@@ -527,7 +525,7 @@ static int __init mc32_probe1(struct net_device *dev, int slot)
527 init_completion(&lp->execution_cmd); 525 init_completion(&lp->execution_cmd);
528 init_completion(&lp->xceiver_cmd); 526 init_completion(&lp->xceiver_cmd);
529 527
530 printk("%s: Firmware Rev %d. %d RX buffers, %d TX buffers. Base of 0x%08X.\n", 528 pr_info("%s: Firmware Rev %d. %d RX buffers, %d TX buffers. Base of 0x%08X.\n",
531 dev->name, lp->exec_box->data[12], lp->rx_len, lp->tx_len, lp->base); 529 dev->name, lp->exec_box->data[12], lp->rx_len, lp->tx_len, lp->base);
532 530
533 dev->netdev_ops = &netdev_ops; 531 dev->netdev_ops = &netdev_ops;
@@ -939,7 +937,7 @@ static int mc32_open(struct net_device *dev)
939 */ 937 */
940 938
941 if(mc32_command(dev, 8, descnumbuffs, 4)) { 939 if(mc32_command(dev, 8, descnumbuffs, 4)) {
942 printk("%s: %s rejected our buffer configuration!\n", 940 pr_info("%s: %s rejected our buffer configuration!\n",
943 dev->name, cardname); 941 dev->name, cardname);
944 mc32_close(dev); 942 mc32_close(dev);
945 return -ENOBUFS; 943 return -ENOBUFS;
@@ -995,7 +993,7 @@ static int mc32_open(struct net_device *dev)
995 993
996static void mc32_timeout(struct net_device *dev) 994static void mc32_timeout(struct net_device *dev)
997{ 995{
998 printk(KERN_WARNING "%s: transmit timed out?\n", dev->name); 996 pr_warning("%s: transmit timed out?\n", dev->name);
999 /* Try to restart the adaptor. */ 997 /* Try to restart the adaptor. */
1000 netif_wake_queue(dev); 998 netif_wake_queue(dev);
1001} 999}
@@ -1335,11 +1333,9 @@ static irqreturn_t mc32_interrupt(int irq, void *dev_id)
1335 { 1333 {
1336 status=inb(ioaddr+HOST_CMD); 1334 status=inb(ioaddr+HOST_CMD);
1337 1335
1338#ifdef DEBUG_IRQ 1336 pr_debug("Status TX%d RX%d EX%d OV%d BC%d\n",
1339 printk("Status TX%d RX%d EX%d OV%d BC%d\n",
1340 (status&7), (status>>3)&7, (status>>6)&1, 1337 (status&7), (status>>3)&7, (status>>6)&1,
1341 (status>>7)&1, boguscount); 1338 (status>>7)&1, boguscount);
1342#endif
1343 1339
1344 switch(status&7) 1340 switch(status&7)
1345 { 1341 {
@@ -1354,7 +1350,7 @@ static irqreturn_t mc32_interrupt(int irq, void *dev_id)
1354 complete(&lp->xceiver_cmd); 1350 complete(&lp->xceiver_cmd);
1355 break; 1351 break;
1356 default: 1352 default:
1357 printk("%s: strange tx ack %d\n", dev->name, status&7); 1353 pr_notice("%s: strange tx ack %d\n", dev->name, status&7);
1358 } 1354 }
1359 status>>=3; 1355 status>>=3;
1360 switch(status&7) 1356 switch(status&7)
@@ -1376,7 +1372,7 @@ static irqreturn_t mc32_interrupt(int irq, void *dev_id)
1376 mc32_start_transceiver(dev); 1372 mc32_start_transceiver(dev);
1377 break; 1373 break;
1378 default: 1374 default:
1379 printk("%s: strange rx ack %d\n", 1375 pr_notice("%s: strange rx ack %d\n",
1380 dev->name, status&7); 1376 dev->name, status&7);
1381 } 1377 }
1382 status>>=3; 1378 status>>=3;