diff options
author | Joe Perches <joe@perches.com> | 2012-05-18 08:56:28 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-18 23:48:07 -0400 |
commit | dd92b9ade4390783fdb64eec92dc5150a918e9a6 (patch) | |
tree | 4a7a421528dd10e1eb8d164efb83eba812738ca9 /drivers/net/ethernet/cirrus | |
parent | 204a38ab2fd2fffaf003f6a5a021a1662caca37d (diff) |
cirrus: cs89x0: Convert printks to pr_<level>
Use more current logging styles.
Add pr_fmt.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cirrus')
-rw-r--r-- | drivers/net/ethernet/cirrus/cs89x0.c | 116 |
1 files changed, 61 insertions, 55 deletions
diff --git a/drivers/net/ethernet/cirrus/cs89x0.c b/drivers/net/ethernet/cirrus/cs89x0.c index 41c8ac92080b..b6120400d080 100644 --- a/drivers/net/ethernet/cirrus/cs89x0.c +++ b/drivers/net/ethernet/cirrus/cs89x0.c | |||
@@ -46,6 +46,8 @@ | |||
46 | * Crystal Semiconductor data sheets. | 46 | * Crystal Semiconductor data sheets. |
47 | */ | 47 | */ |
48 | 48 | ||
49 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
50 | |||
49 | #include <linux/module.h> | 51 | #include <linux/module.h> |
50 | #include <linux/printk.h> | 52 | #include <linux/printk.h> |
51 | #include <linux/errno.h> | 53 | #include <linux/errno.h> |
@@ -385,15 +387,15 @@ cs89x0_probe1(struct net_device *dev, void __iomem *ioaddr, int modular) | |||
385 | #endif | 387 | #endif |
386 | } | 388 | } |
387 | 389 | ||
388 | printk(KERN_DEBUG "PP_addr at %p[%x]: 0x%x\n", | 390 | pr_debug("PP_addr at %p[%x]: 0x%x\n", |
389 | ioaddr, ADD_PORT, ioread16(ioaddr + ADD_PORT)); | 391 | ioaddr, ADD_PORT, ioread16(ioaddr + ADD_PORT)); |
390 | iowrite16(PP_ChipID, ioaddr + ADD_PORT); | 392 | iowrite16(PP_ChipID, ioaddr + ADD_PORT); |
391 | 393 | ||
392 | tmp = ioread16(ioaddr + DATA_PORT); | 394 | tmp = ioread16(ioaddr + DATA_PORT); |
393 | if (tmp != CHIP_EISA_ID_SIG) { | 395 | if (tmp != CHIP_EISA_ID_SIG) { |
394 | printk(KERN_DEBUG "%s: incorrect signature at %p[%x]: 0x%x!=" | 396 | pr_debug("%s: incorrect signature at %p[%x]: 0x%x!=" |
395 | CHIP_EISA_ID_SIG_STR "\n", | 397 | CHIP_EISA_ID_SIG_STR "\n", |
396 | dev->name, ioaddr, DATA_PORT, tmp); | 398 | dev->name, ioaddr, DATA_PORT, tmp); |
397 | retval = -ENODEV; | 399 | retval = -ENODEV; |
398 | goto out1; | 400 | goto out1; |
399 | } | 401 | } |
@@ -416,12 +418,12 @@ cs89x0_probe1(struct net_device *dev, void __iomem *ioaddr, int modular) | |||
416 | if (net_debug && version_printed++ == 0) | 418 | if (net_debug && version_printed++ == 0) |
417 | printk(version); | 419 | printk(version); |
418 | 420 | ||
419 | printk(KERN_INFO "%s: cs89%c0%s rev %c found at %p ", | 421 | pr_info("%s: cs89%c0%s rev %c found at %p ", |
420 | dev->name, | 422 | dev->name, |
421 | lp->chip_type == CS8900 ? '0' : '2', | 423 | lp->chip_type == CS8900 ? '0' : '2', |
422 | lp->chip_type == CS8920M ? "M" : "", | 424 | lp->chip_type == CS8920M ? "M" : "", |
423 | lp->chip_revision, | 425 | lp->chip_revision, |
424 | lp->virt_addr); | 426 | lp->virt_addr); |
425 | 427 | ||
426 | reset_chip(dev); | 428 | reset_chip(dev); |
427 | 429 | ||
@@ -474,8 +476,8 @@ cs89x0_probe1(struct net_device *dev, void __iomem *ioaddr, int modular) | |||
474 | A_CNF_MEDIA_AUI | A_CNF_MEDIA_10B_T | A_CNF_MEDIA_AUTO; | 476 | A_CNF_MEDIA_AUI | A_CNF_MEDIA_10B_T | A_CNF_MEDIA_AUTO; |
475 | 477 | ||
476 | if (net_debug > 1) | 478 | if (net_debug > 1) |
477 | printk(KERN_INFO "%s: PP_LineCTL=0x%x, adapter_cnf=0x%x\n", | 479 | pr_info("%s: PP_LineCTL=0x%x, adapter_cnf=0x%x\n", |
478 | dev->name, i, lp->adapter_cnf); | 480 | dev->name, i, lp->adapter_cnf); |
479 | 481 | ||
480 | /* IRQ. Other chips already probe, see below. */ | 482 | /* IRQ. Other chips already probe, see below. */ |
481 | if (lp->chip_type == CS8900) | 483 | if (lp->chip_type == CS8900) |
@@ -489,15 +491,15 @@ cs89x0_probe1(struct net_device *dev, void __iomem *ioaddr, int modular) | |||
489 | /* First check to see if an EEPROM is attached. */ | 491 | /* First check to see if an EEPROM is attached. */ |
490 | 492 | ||
491 | if ((readreg(dev, PP_SelfST) & EEPROM_PRESENT) == 0) | 493 | if ((readreg(dev, PP_SelfST) & EEPROM_PRESENT) == 0) |
492 | printk(KERN_WARNING "cs89x0: No EEPROM, relying on command line....\n"); | 494 | pr_warn("No EEPROM, relying on command line....\n"); |
493 | else if (get_eeprom_data(dev, START_EEPROM_DATA, CHKSUM_LEN, eeprom_buff) < 0) { | 495 | else if (get_eeprom_data(dev, START_EEPROM_DATA, CHKSUM_LEN, eeprom_buff) < 0) { |
494 | printk(KERN_WARNING "\ncs89x0: EEPROM read failed, relying on command line.\n"); | 496 | pr_warn("EEPROM read failed, relying on command line\n"); |
495 | } else if (get_eeprom_cksum(START_EEPROM_DATA, CHKSUM_LEN, eeprom_buff) < 0) { | 497 | } else if (get_eeprom_cksum(START_EEPROM_DATA, CHKSUM_LEN, eeprom_buff) < 0) { |
496 | /* Check if the chip was able to read its own configuration starting | 498 | /* Check if the chip was able to read its own configuration starting |
497 | at 0 in the EEPROM*/ | 499 | at 0 in the EEPROM*/ |
498 | if ((readreg(dev, PP_SelfST) & (EEPROM_OK | EEPROM_PRESENT)) != | 500 | if ((readreg(dev, PP_SelfST) & (EEPROM_OK | EEPROM_PRESENT)) != |
499 | (EEPROM_OK | EEPROM_PRESENT)) | 501 | (EEPROM_OK | EEPROM_PRESENT)) |
500 | printk(KERN_WARNING "cs89x0: Extended EEPROM checksum bad and no Cirrus EEPROM, relying on command line\n"); | 502 | pr_warn("Extended EEPROM checksum bad and no Cirrus EEPROM, relying on command line\n"); |
501 | 503 | ||
502 | } else { | 504 | } else { |
503 | /* This reads an extended EEPROM that is not documented | 505 | /* This reads an extended EEPROM that is not documented |
@@ -519,8 +521,8 @@ cs89x0_probe1(struct net_device *dev, void __iomem *ioaddr, int modular) | |||
519 | dev->dev_addr[i * 2 + 1] = eeprom_buff[i] >> 8; | 521 | dev->dev_addr[i * 2 + 1] = eeprom_buff[i] >> 8; |
520 | } | 522 | } |
521 | if (net_debug > 1) | 523 | if (net_debug > 1) |
522 | printk(KERN_DEBUG "%s: new adapter_cnf: 0x%x\n", | 524 | pr_debug("%s: new adapter_cnf: 0x%x\n", |
523 | dev->name, lp->adapter_cnf); | 525 | dev->name, lp->adapter_cnf); |
524 | } | 526 | } |
525 | 527 | ||
526 | /* allow them to force multiple transceivers. If they force multiple, autosense */ | 528 | /* allow them to force multiple transceivers. If they force multiple, autosense */ |
@@ -536,8 +538,8 @@ cs89x0_probe1(struct net_device *dev, void __iomem *ioaddr, int modular) | |||
536 | } | 538 | } |
537 | 539 | ||
538 | if (net_debug > 1) | 540 | if (net_debug > 1) |
539 | printk(KERN_DEBUG "%s: after force 0x%x, adapter_cnf=0x%x\n", | 541 | pr_debug("%s: after force 0x%x, adapter_cnf=0x%x\n", |
540 | dev->name, lp->force, lp->adapter_cnf); | 542 | dev->name, lp->force, lp->adapter_cnf); |
541 | 543 | ||
542 | /* FIXME: We don't let you set dc-dc polarity or low RX squelch from the command line: add it here */ | 544 | /* FIXME: We don't let you set dc-dc polarity or low RX squelch from the command line: add it here */ |
543 | 545 | ||
@@ -547,10 +549,10 @@ cs89x0_probe1(struct net_device *dev, void __iomem *ioaddr, int modular) | |||
547 | * ifconfig IFACE hw ether AABBCCDDEEFF | 549 | * ifconfig IFACE hw ether AABBCCDDEEFF |
548 | */ | 550 | */ |
549 | 551 | ||
550 | printk(KERN_INFO "cs89x0 media %s%s%s", | 552 | pr_info("media %s%s%s", |
551 | (lp->adapter_cnf & A_CNF_10B_T) ? "RJ-45," : "", | 553 | (lp->adapter_cnf & A_CNF_10B_T) ? "RJ-45," : "", |
552 | (lp->adapter_cnf & A_CNF_AUI) ? "AUI," : "", | 554 | (lp->adapter_cnf & A_CNF_AUI) ? "AUI," : "", |
553 | (lp->adapter_cnf & A_CNF_10B_2) ? "BNC," : ""); | 555 | (lp->adapter_cnf & A_CNF_10B_2) ? "BNC," : ""); |
554 | 556 | ||
555 | lp->irq_map = 0xffff; | 557 | lp->irq_map = 0xffff; |
556 | 558 | ||
@@ -570,7 +572,7 @@ cs89x0_probe1(struct net_device *dev, void __iomem *ioaddr, int modular) | |||
570 | #else | 572 | #else |
571 | /* Translate the IRQ using the IRQ mapping table. */ | 573 | /* Translate the IRQ using the IRQ mapping table. */ |
572 | if (i >= ARRAY_SIZE(cs8900_irq_map)) | 574 | if (i >= ARRAY_SIZE(cs8900_irq_map)) |
573 | printk("\ncs89x0: invalid ISA interrupt number %d\n", i); | 575 | pr_err("invalid ISA interrupt number %d\n", i); |
574 | else | 576 | else |
575 | i = cs8900_irq_map[i]; | 577 | i = cs8900_irq_map[i]; |
576 | 578 | ||
@@ -660,15 +662,12 @@ cs89x0_ioport_probe(struct net_device *dev, unsigned long ioport, int modular) | |||
660 | */ | 662 | */ |
661 | if (ioport & 1) { | 663 | if (ioport & 1) { |
662 | if (net_debug > 1) | 664 | if (net_debug > 1) |
663 | printk(KERN_INFO "%s: odd ioaddr 0x%lx\n", | 665 | pr_info("%s: odd ioaddr 0x%lx\n", dev->name, ioport); |
664 | dev->name, | ||
665 | ioport); | ||
666 | if ((ioport & 2) != 2) | 666 | if ((ioport & 2) != 2) |
667 | if ((ioread16(io_mem + ADD_PORT) & ADD_MASK) != | 667 | if ((ioread16(io_mem + ADD_PORT) & ADD_MASK) != |
668 | ADD_SIG) { | 668 | ADD_SIG) { |
669 | printk(KERN_ERR "%s: bad signature 0x%x\n", | 669 | pr_err("%s: bad signature 0x%x\n", |
670 | dev->name, | 670 | dev->name, ioread16(io_mem + ADD_PORT)); |
671 | ioread16(io_mem + ADD_PORT)); | ||
672 | ret = -ENODEV; | 671 | ret = -ENODEV; |
673 | goto unmap; | 672 | goto unmap; |
674 | } | 673 | } |
@@ -711,7 +710,7 @@ struct net_device * __init cs89x0_probe(int unit) | |||
711 | irq = dev->irq; | 710 | irq = dev->irq; |
712 | 711 | ||
713 | if (net_debug) | 712 | if (net_debug) |
714 | printk(KERN_INFO "cs89x0:cs89x0_probe(0x%x)\n", io); | 713 | pr_info("cs89x0_probe(0x%x)\n", io); |
715 | 714 | ||
716 | if (io > 0x1ff) { /* Check a single specified location. */ | 715 | if (io > 0x1ff) { /* Check a single specified location. */ |
717 | err = cs89x0_ioport_probe(dev, io, 0); | 716 | err = cs89x0_ioport_probe(dev, io, 0); |
@@ -731,7 +730,7 @@ struct net_device * __init cs89x0_probe(int unit) | |||
731 | return dev; | 730 | return dev; |
732 | out: | 731 | out: |
733 | free_netdev(dev); | 732 | free_netdev(dev); |
734 | printk(KERN_WARNING "cs89x0: no cs8900 or cs8920 detected. Be sure to disable PnP with SETUP\n"); | 733 | pr_warn("no cs8900 or cs8920 detected. Be sure to disable PnP with SETUP\n"); |
735 | return ERR_PTR(err); | 734 | return ERR_PTR(err); |
736 | } | 735 | } |
737 | #endif | 736 | #endif |
@@ -1012,10 +1011,10 @@ detect_tp(struct net_device *dev) | |||
1012 | writereg(dev, PP_AutoNegCTL, lp->auto_neg_cnf & AUTO_NEG_MASK); | 1011 | writereg(dev, PP_AutoNegCTL, lp->auto_neg_cnf & AUTO_NEG_MASK); |
1013 | 1012 | ||
1014 | if ((lp->auto_neg_cnf & AUTO_NEG_BITS) == AUTO_NEG_ENABLE) { | 1013 | if ((lp->auto_neg_cnf & AUTO_NEG_BITS) == AUTO_NEG_ENABLE) { |
1015 | printk(KERN_INFO "%s: negotiating duplex...\n", dev->name); | 1014 | pr_info("%s: negotiating duplex...\n", dev->name); |
1016 | while (readreg(dev, PP_AutoNegST) & AUTO_NEG_BUSY) { | 1015 | while (readreg(dev, PP_AutoNegST) & AUTO_NEG_BUSY) { |
1017 | if (jiffies - timenow > 4000) { | 1016 | if (jiffies - timenow > 4000) { |
1018 | printk(KERN_ERR "**** Full / half duplex auto-negotiation timed out ****\n"); | 1017 | pr_err("**** Full / half duplex auto-negotiation timed out ****\n"); |
1019 | break; | 1018 | break; |
1020 | } | 1019 | } |
1021 | } | 1020 | } |
@@ -1167,7 +1166,7 @@ net_open(struct net_device *dev) | |||
1167 | 1166 | ||
1168 | if (i >= CS8920_NO_INTS) { | 1167 | if (i >= CS8920_NO_INTS) { |
1169 | writereg(dev, PP_BusCTL, 0); /* disable interrupts. */ | 1168 | writereg(dev, PP_BusCTL, 0); /* disable interrupts. */ |
1170 | printk(KERN_ERR "cs89x0: can't get an interrupt\n"); | 1169 | pr_err("can't get an interrupt\n"); |
1171 | ret = -EAGAIN; | 1170 | ret = -EAGAIN; |
1172 | goto bad_out; | 1171 | goto bad_out; |
1173 | } | 1172 | } |
@@ -1176,7 +1175,7 @@ net_open(struct net_device *dev) | |||
1176 | { | 1175 | { |
1177 | #if !defined(CS89x0_NONISA_IRQ) && !defined(CONFIG_CS89x0_PLATFORM) | 1176 | #if !defined(CS89x0_NONISA_IRQ) && !defined(CONFIG_CS89x0_PLATFORM) |
1178 | if (((1 << dev->irq) & lp->irq_map) == 0) { | 1177 | if (((1 << dev->irq) & lp->irq_map) == 0) { |
1179 | printk(KERN_ERR "%s: IRQ %d is not in our map of allowable IRQs, which is %x\n", | 1178 | pr_err("%s: IRQ %d is not in our map of allowable IRQs, which is %x\n", |
1180 | dev->name, dev->irq, lp->irq_map); | 1179 | dev->name, dev->irq, lp->irq_map); |
1181 | ret = -EAGAIN; | 1180 | ret = -EAGAIN; |
1182 | goto bad_out; | 1181 | goto bad_out; |
@@ -1191,7 +1190,7 @@ net_open(struct net_device *dev) | |||
1191 | write_irq(dev, lp->chip_type, dev->irq); | 1190 | write_irq(dev, lp->chip_type, dev->irq); |
1192 | ret = request_irq(dev->irq, net_interrupt, 0, dev->name, dev); | 1191 | ret = request_irq(dev->irq, net_interrupt, 0, dev->name, dev); |
1193 | if (ret) { | 1192 | if (ret) { |
1194 | printk(KERN_ERR "cs89x0: request_irq(%d) failed\n", dev->irq); | 1193 | pr_err("request_irq(%d) failed\n", dev->irq); |
1195 | goto bad_out; | 1194 | goto bad_out; |
1196 | } | 1195 | } |
1197 | } | 1196 | } |
@@ -1204,7 +1203,8 @@ net_open(struct net_device *dev) | |||
1204 | get_order(lp->dmasize * 1024)); | 1203 | get_order(lp->dmasize * 1024)); |
1205 | 1204 | ||
1206 | if (!lp->dma_buff) { | 1205 | if (!lp->dma_buff) { |
1207 | printk(KERN_ERR "%s: cannot get %dK memory for DMA\n", dev->name, lp->dmasize); | 1206 | pr_err("%s: cannot get %dK memory for DMA\n", |
1207 | dev->name, lp->dmasize); | ||
1208 | goto release_irq; | 1208 | goto release_irq; |
1209 | } | 1209 | } |
1210 | if (net_debug > 1) { | 1210 | if (net_debug > 1) { |
@@ -1215,12 +1215,14 @@ net_open(struct net_device *dev) | |||
1215 | } | 1215 | } |
1216 | if ((unsigned long) lp->dma_buff >= MAX_DMA_ADDRESS || | 1216 | if ((unsigned long) lp->dma_buff >= MAX_DMA_ADDRESS || |
1217 | !dma_page_eq(lp->dma_buff, lp->dma_buff+lp->dmasize*1024-1)) { | 1217 | !dma_page_eq(lp->dma_buff, lp->dma_buff+lp->dmasize*1024-1)) { |
1218 | printk(KERN_ERR "%s: not usable as DMA buffer\n", dev->name); | 1218 | pr_err("%s: not usable as DMA buffer\n", |
1219 | dev->name); | ||
1219 | goto release_irq; | 1220 | goto release_irq; |
1220 | } | 1221 | } |
1221 | memset(lp->dma_buff, 0, lp->dmasize * 1024); /* Why? */ | 1222 | memset(lp->dma_buff, 0, lp->dmasize * 1024); /* Why? */ |
1222 | if (request_dma(dev->dma, dev->name)) { | 1223 | if (request_dma(dev->dma, dev->name)) { |
1223 | printk(KERN_ERR "%s: cannot get dma channel %d\n", dev->name, dev->dma); | 1224 | pr_err("%s: cannot get dma channel %d\n", |
1225 | dev->name, dev->dma); | ||
1224 | goto release_irq; | 1226 | goto release_irq; |
1225 | } | 1227 | } |
1226 | write_dma(dev, lp->chip_type, dev->dma); | 1228 | write_dma(dev, lp->chip_type, dev->dma); |
@@ -1259,7 +1261,8 @@ net_open(struct net_device *dev) | |||
1259 | default: result = lp->adapter_cnf & (A_CNF_10B_T | A_CNF_AUI | A_CNF_10B_2); | 1261 | default: result = lp->adapter_cnf & (A_CNF_10B_T | A_CNF_AUI | A_CNF_10B_2); |
1260 | } | 1262 | } |
1261 | if (!result) { | 1263 | if (!result) { |
1262 | printk(KERN_ERR "%s: EEPROM is configured for unavailable media\n", dev->name); | 1264 | pr_err("%s: EEPROM is configured for unavailable media\n", |
1265 | dev->name); | ||
1263 | release_dma: | 1266 | release_dma: |
1264 | #if ALLOW_DMA | 1267 | #if ALLOW_DMA |
1265 | free_dma(dev->dma); | 1268 | free_dma(dev->dma); |
@@ -1277,7 +1280,8 @@ release_irq: | |||
1277 | case A_CNF_MEDIA_10B_T: | 1280 | case A_CNF_MEDIA_10B_T: |
1278 | result = detect_tp(dev); | 1281 | result = detect_tp(dev); |
1279 | if (result == DETECTED_NONE) { | 1282 | if (result == DETECTED_NONE) { |
1280 | printk(KERN_WARNING "%s: 10Base-T (RJ-45) has no cable\n", dev->name); | 1283 | pr_warn("%s: 10Base-T (RJ-45) has no cable\n", |
1284 | dev->name); | ||
1281 | if (lp->auto_neg_cnf & IMM_BIT) /* check "ignore missing media" bit */ | 1285 | if (lp->auto_neg_cnf & IMM_BIT) /* check "ignore missing media" bit */ |
1282 | result = DETECTED_RJ45H; /* Yes! I don't care if I see a link pulse */ | 1286 | result = DETECTED_RJ45H; /* Yes! I don't care if I see a link pulse */ |
1283 | } | 1287 | } |
@@ -1285,7 +1289,7 @@ release_irq: | |||
1285 | case A_CNF_MEDIA_AUI: | 1289 | case A_CNF_MEDIA_AUI: |
1286 | result = detect_aui(dev); | 1290 | result = detect_aui(dev); |
1287 | if (result == DETECTED_NONE) { | 1291 | if (result == DETECTED_NONE) { |
1288 | printk(KERN_WARNING "%s: 10Base-5 (AUI) has no cable\n", dev->name); | 1292 | pr_warn("%s: 10Base-5 (AUI) has no cable\n", dev->name); |
1289 | if (lp->auto_neg_cnf & IMM_BIT) /* check "ignore missing media" bit */ | 1293 | if (lp->auto_neg_cnf & IMM_BIT) /* check "ignore missing media" bit */ |
1290 | result = DETECTED_AUI; /* Yes! I don't care if I see a carrrier */ | 1294 | result = DETECTED_AUI; /* Yes! I don't care if I see a carrrier */ |
1291 | } | 1295 | } |
@@ -1293,7 +1297,7 @@ release_irq: | |||
1293 | case A_CNF_MEDIA_10B_2: | 1297 | case A_CNF_MEDIA_10B_2: |
1294 | result = detect_bnc(dev); | 1298 | result = detect_bnc(dev); |
1295 | if (result == DETECTED_NONE) { | 1299 | if (result == DETECTED_NONE) { |
1296 | printk(KERN_WARNING "%s: 10Base-2 (BNC) has no cable\n", dev->name); | 1300 | pr_warn("%s: 10Base-2 (BNC) has no cable\n", dev->name); |
1297 | if (lp->auto_neg_cnf & IMM_BIT) /* check "ignore missing media" bit */ | 1301 | if (lp->auto_neg_cnf & IMM_BIT) /* check "ignore missing media" bit */ |
1298 | result = DETECTED_BNC; /* Yes! I don't care if I can xmit a packet */ | 1302 | result = DETECTED_BNC; /* Yes! I don't care if I can xmit a packet */ |
1299 | } | 1303 | } |
@@ -1309,24 +1313,25 @@ release_irq: | |||
1309 | if (lp->adapter_cnf & A_CNF_10B_2) | 1313 | if (lp->adapter_cnf & A_CNF_10B_2) |
1310 | if ((result = detect_bnc(dev)) != DETECTED_NONE) | 1314 | if ((result = detect_bnc(dev)) != DETECTED_NONE) |
1311 | break; | 1315 | break; |
1312 | printk(KERN_ERR "%s: no media detected\n", dev->name); | 1316 | pr_err("%s: no media detected\n", dev->name); |
1313 | goto release_dma; | 1317 | goto release_dma; |
1314 | } | 1318 | } |
1315 | switch (result) { | 1319 | switch (result) { |
1316 | case DETECTED_NONE: | 1320 | case DETECTED_NONE: |
1317 | printk(KERN_ERR "%s: no network cable attached to configured media\n", dev->name); | 1321 | pr_err("%s: no network cable attached to configured media\n", |
1322 | dev->name); | ||
1318 | goto release_dma; | 1323 | goto release_dma; |
1319 | case DETECTED_RJ45H: | 1324 | case DETECTED_RJ45H: |
1320 | printk(KERN_INFO "%s: using half-duplex 10Base-T (RJ-45)\n", dev->name); | 1325 | pr_info("%s: using half-duplex 10Base-T (RJ-45)\n", dev->name); |
1321 | break; | 1326 | break; |
1322 | case DETECTED_RJ45F: | 1327 | case DETECTED_RJ45F: |
1323 | printk(KERN_INFO "%s: using full-duplex 10Base-T (RJ-45)\n", dev->name); | 1328 | pr_info("%s: using full-duplex 10Base-T (RJ-45)\n", dev->name); |
1324 | break; | 1329 | break; |
1325 | case DETECTED_AUI: | 1330 | case DETECTED_AUI: |
1326 | printk(KERN_INFO "%s: using 10Base-5 (AUI)\n", dev->name); | 1331 | pr_info("%s: using 10Base-5 (AUI)\n", dev->name); |
1327 | break; | 1332 | break; |
1328 | case DETECTED_BNC: | 1333 | case DETECTED_BNC: |
1329 | printk(KERN_INFO "%s: using 10Base-2 (BNC)\n", dev->name); | 1334 | pr_info("%s: using 10Base-2 (BNC)\n", dev->name); |
1330 | break; | 1335 | break; |
1331 | } | 1336 | } |
1332 | 1337 | ||
@@ -1566,7 +1571,7 @@ net_rx(struct net_device *dev) | |||
1566 | skb = netdev_alloc_skb(dev, length + 2); | 1571 | skb = netdev_alloc_skb(dev, length + 2); |
1567 | if (skb == NULL) { | 1572 | if (skb == NULL) { |
1568 | #if 0 /* Again, this seems a cruel thing to do */ | 1573 | #if 0 /* Again, this seems a cruel thing to do */ |
1569 | printk(KERN_WARNING "%s: Memory squeeze, dropping packet.\n", dev->name); | 1574 | pr_warn("%s: Memory squeeze, dropping packet\n", dev->name); |
1570 | #endif | 1575 | #endif |
1571 | dev->stats.rx_dropped++; | 1576 | dev->stats.rx_dropped++; |
1572 | return; | 1577 | return; |
@@ -1808,8 +1813,8 @@ int __init init_module(void) | |||
1808 | lp->auto_neg_cnf = AUTO_NEG_ENABLE; | 1813 | lp->auto_neg_cnf = AUTO_NEG_ENABLE; |
1809 | 1814 | ||
1810 | if (io == 0) { | 1815 | if (io == 0) { |
1811 | printk(KERN_ERR "cs89x0.c: Module autoprobing not allowed.\n"); | 1816 | pr_err("Module autoprobing not allowed\n"); |
1812 | printk(KERN_ERR "cs89x0.c: Append io=0xNNN\n"); | 1817 | pr_err("Append io=0xNNN\n"); |
1813 | ret = -EPERM; | 1818 | ret = -EPERM; |
1814 | goto out; | 1819 | goto out; |
1815 | } else if (io <= 0x1ff) { | 1820 | } else if (io <= 0x1ff) { |
@@ -1819,7 +1824,8 @@ int __init init_module(void) | |||
1819 | 1824 | ||
1820 | #if ALLOW_DMA | 1825 | #if ALLOW_DMA |
1821 | if (use_dma && dmasize != 16 && dmasize != 64) { | 1826 | if (use_dma && dmasize != 16 && dmasize != 64) { |
1822 | printk(KERN_ERR "cs89x0.c: dma size must be either 16K or 64K, not %dK\n", dmasize); | 1827 | pr_err("dma size must be either 16K or 64K, not %dK\n", |
1828 | dmasize); | ||
1823 | ret = -EPERM; | 1829 | ret = -EPERM; |
1824 | goto out; | 1830 | goto out; |
1825 | } | 1831 | } |