aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tlan.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-03-01 01:56:33 -0500
committerDavid S. Miller <davem@davemloft.net>2011-03-03 16:02:31 -0500
commit50624aab5304cb8167ead32af46ac9de54e6e8ad (patch)
tree1269cc0d2b7a101f340ea358e71d3d9d68809213 /drivers/net/tlan.c
parenta576cd8700271273a572976df4f06db44a0652f3 (diff)
tlan: Use pr_fmt, pr_<level> and netdev_<level>
Neatening and standardization to the current logging mechanisms. Miscellaneous speen/speed typo correction. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tlan.c')
-rw-r--r--drivers/net/tlan.c164
1 files changed, 77 insertions, 87 deletions
diff --git a/drivers/net/tlan.c b/drivers/net/tlan.c
index 7721e6cf96f8..ace6404e2fac 100644
--- a/drivers/net/tlan.c
+++ b/drivers/net/tlan.c
@@ -27,6 +27,8 @@
27 * 27 *
28 ******************************************************************************/ 28 ******************************************************************************/
29 29
30#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
31
30#include <linux/module.h> 32#include <linux/module.h>
31#include <linux/init.h> 33#include <linux/init.h>
32#include <linux/ioport.h> 34#include <linux/ioport.h>
@@ -59,7 +61,7 @@ module_param_array(speed, int, NULL, 0);
59MODULE_PARM_DESC(aui, "ThunderLAN use AUI port(s) (0-1)"); 61MODULE_PARM_DESC(aui, "ThunderLAN use AUI port(s) (0-1)");
60MODULE_PARM_DESC(duplex, 62MODULE_PARM_DESC(duplex,
61 "ThunderLAN duplex setting(s) (0-default, 1-half, 2-full)"); 63 "ThunderLAN duplex setting(s) (0-default, 1-half, 2-full)");
62MODULE_PARM_DESC(speed, "ThunderLAN port speen setting(s) (0,10,100)"); 64MODULE_PARM_DESC(speed, "ThunderLAN port speed setting(s) (0,10,100)");
63 65
64MODULE_AUTHOR("Maintainer: Samuel Chessman <chessman@tux.org>"); 66MODULE_AUTHOR("Maintainer: Samuel Chessman <chessman@tux.org>");
65MODULE_DESCRIPTION("Driver for TI ThunderLAN based ethernet PCI adapters"); 67MODULE_DESCRIPTION("Driver for TI ThunderLAN based ethernet PCI adapters");
@@ -397,7 +399,7 @@ static int __init tlan_probe(void)
397{ 399{
398 int rc = -ENODEV; 400 int rc = -ENODEV;
399 401
400 printk(KERN_INFO "%s", tlan_banner); 402 pr_info("%s", tlan_banner);
401 403
402 TLAN_DBG(TLAN_DEBUG_PROBE, "Starting PCI Probe....\n"); 404 TLAN_DBG(TLAN_DEBUG_PROBE, "Starting PCI Probe....\n");
403 405
@@ -406,16 +408,16 @@ static int __init tlan_probe(void)
406 rc = pci_register_driver(&tlan_driver); 408 rc = pci_register_driver(&tlan_driver);
407 409
408 if (rc != 0) { 410 if (rc != 0) {
409 printk(KERN_ERR "TLAN: Could not register pci driver.\n"); 411 pr_err("Could not register pci driver\n");
410 goto err_out_pci_free; 412 goto err_out_pci_free;
411 } 413 }
412 414
413 TLAN_DBG(TLAN_DEBUG_PROBE, "Starting EISA Probe....\n"); 415 TLAN_DBG(TLAN_DEBUG_PROBE, "Starting EISA Probe....\n");
414 tlan_eisa_probe(); 416 tlan_eisa_probe();
415 417
416 printk(KERN_INFO "TLAN: %d device%s installed, PCI: %d EISA: %d\n", 418 pr_info("%d device%s installed, PCI: %d EISA: %d\n",
417 tlan_devices_installed, tlan_devices_installed == 1 ? "" : "s", 419 tlan_devices_installed, tlan_devices_installed == 1 ? "" : "s",
418 tlan_have_pci, tlan_have_eisa); 420 tlan_have_pci, tlan_have_eisa);
419 421
420 if (tlan_devices_installed == 0) { 422 if (tlan_devices_installed == 0) {
421 rc = -ENODEV; 423 rc = -ENODEV;
@@ -474,7 +476,7 @@ static int __devinit tlan_probe1(struct pci_dev *pdev,
474 476
475 rc = pci_request_regions(pdev, tlan_signature); 477 rc = pci_request_regions(pdev, tlan_signature);
476 if (rc) { 478 if (rc) {
477 printk(KERN_ERR "TLAN: Could not reserve IO regions\n"); 479 pr_err("Could not reserve IO regions\n");
478 goto err_out; 480 goto err_out;
479 } 481 }
480 } 482 }
@@ -482,7 +484,7 @@ static int __devinit tlan_probe1(struct pci_dev *pdev,
482 484
483 dev = alloc_etherdev(sizeof(struct tlan_priv)); 485 dev = alloc_etherdev(sizeof(struct tlan_priv));
484 if (dev == NULL) { 486 if (dev == NULL) {
485 printk(KERN_ERR "TLAN: Could not allocate memory for device.\n"); 487 pr_err("Could not allocate memory for device\n");
486 rc = -ENOMEM; 488 rc = -ENOMEM;
487 goto err_out_regions; 489 goto err_out_regions;
488 } 490 }
@@ -501,8 +503,7 @@ static int __devinit tlan_probe1(struct pci_dev *pdev,
501 503
502 rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); 504 rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
503 if (rc) { 505 if (rc) {
504 printk(KERN_ERR 506 pr_err("No suitable PCI mapping available\n");
505 "TLAN: No suitable PCI mapping available.\n");
506 goto err_out_free_dev; 507 goto err_out_free_dev;
507 } 508 }
508 509
@@ -516,7 +517,7 @@ static int __devinit tlan_probe1(struct pci_dev *pdev,
516 } 517 }
517 } 518 }
518 if (!pci_io_base) { 519 if (!pci_io_base) {
519 printk(KERN_ERR "TLAN: No IO mappings available\n"); 520 pr_err("No IO mappings available\n");
520 rc = -EIO; 521 rc = -EIO;
521 goto err_out_free_dev; 522 goto err_out_free_dev;
522 } 523 }
@@ -572,13 +573,13 @@ static int __devinit tlan_probe1(struct pci_dev *pdev,
572 573
573 rc = tlan_init(dev); 574 rc = tlan_init(dev);
574 if (rc) { 575 if (rc) {
575 printk(KERN_ERR "TLAN: Could not set up device.\n"); 576 pr_err("Could not set up device\n");
576 goto err_out_free_dev; 577 goto err_out_free_dev;
577 } 578 }
578 579
579 rc = register_netdev(dev); 580 rc = register_netdev(dev);
580 if (rc) { 581 if (rc) {
581 printk(KERN_ERR "TLAN: Could not register device.\n"); 582 pr_err("Could not register device\n");
582 goto err_out_uninit; 583 goto err_out_uninit;
583 } 584 }
584 585
@@ -595,12 +596,11 @@ static int __devinit tlan_probe1(struct pci_dev *pdev,
595 tlan_have_eisa++; 596 tlan_have_eisa++;
596 } 597 }
597 598
598 printk(KERN_INFO "TLAN: %s irq=%2d, io=%04x, %s, Rev. %d\n", 599 netdev_info(dev, "irq=%2d, io=%04x, %s, Rev. %d\n",
599 dev->name, 600 (int)dev->irq,
600 (int) dev->irq, 601 (int)dev->base_addr,
601 (int) dev->base_addr, 602 priv->adapter->device_label,
602 priv->adapter->device_label, 603 priv->adapter_rev);
603 priv->adapter_rev);
604 return 0; 604 return 0;
605 605
606err_out_uninit: 606err_out_uninit:
@@ -716,7 +716,7 @@ static void __init tlan_eisa_probe(void)
716 } 716 }
717 717
718 if (debug == 0x10) 718 if (debug == 0x10)
719 printk(KERN_INFO "Found one\n"); 719 pr_info("Found one\n");
720 720
721 721
722 /* Get irq from board */ 722 /* Get irq from board */
@@ -745,12 +745,12 @@ static void __init tlan_eisa_probe(void)
745 745
746out: 746out:
747 if (debug == 0x10) 747 if (debug == 0x10)
748 printk(KERN_INFO "None found\n"); 748 pr_info("None found\n");
749 continue; 749 continue;
750 750
751out2: 751out2:
752 if (debug == 0x10) 752 if (debug == 0x10)
753 printk(KERN_INFO "Card found but it is not enabled, skipping\n"); 753 pr_info("Card found but it is not enabled, skipping\n");
754 continue; 754 continue;
755 755
756 } 756 }
@@ -818,8 +818,7 @@ static int tlan_init(struct net_device *dev)
818 priv->dma_size = dma_size; 818 priv->dma_size = dma_size;
819 819
820 if (priv->dma_storage == NULL) { 820 if (priv->dma_storage == NULL) {
821 printk(KERN_ERR 821 pr_err("Could not allocate lists and buffers for %s\n",
822 "TLAN: Could not allocate lists and buffers for %s.\n",
823 dev->name); 822 dev->name);
824 return -ENOMEM; 823 return -ENOMEM;
825 } 824 }
@@ -837,9 +836,8 @@ static int tlan_init(struct net_device *dev)
837 (u8) priv->adapter->addr_ofs + i, 836 (u8) priv->adapter->addr_ofs + i,
838 (u8 *) &dev->dev_addr[i]); 837 (u8 *) &dev->dev_addr[i]);
839 if (err) { 838 if (err) {
840 printk(KERN_ERR "TLAN: %s: Error reading MAC from eeprom: %d\n", 839 pr_err("%s: Error reading MAC from eeprom: %d\n",
841 dev->name, 840 dev->name, err);
842 err);
843 } 841 }
844 dev->addr_len = 6; 842 dev->addr_len = 6;
845 843
@@ -883,8 +881,8 @@ static int tlan_open(struct net_device *dev)
883 dev->name, dev); 881 dev->name, dev);
884 882
885 if (err) { 883 if (err) {
886 pr_err("TLAN: Cannot open %s because IRQ %d is already in use.\n", 884 netdev_err(dev, "Cannot open because IRQ %d is already in use\n",
887 dev->name, dev->irq); 885 dev->irq);
888 return err; 886 return err;
889 } 887 }
890 888
@@ -1367,8 +1365,8 @@ static u32 tlan_handle_tx_eof(struct net_device *dev, u16 host_int)
1367 } 1365 }
1368 1366
1369 if (!ack) 1367 if (!ack)
1370 printk(KERN_INFO 1368 netdev_info(dev,
1371 "TLAN: Received interrupt for uncompleted TX frame.\n"); 1369 "Received interrupt for uncompleted TX frame\n");
1372 1370
1373 if (eoc) { 1371 if (eoc) {
1374 TLAN_DBG(TLAN_DEBUG_TX, 1372 TLAN_DBG(TLAN_DEBUG_TX,
@@ -1522,8 +1520,8 @@ drop_and_reuse:
1522 } 1520 }
1523 1521
1524 if (!ack) 1522 if (!ack)
1525 printk(KERN_INFO 1523 netdev_info(dev,
1526 "TLAN: Received interrupt for uncompleted RX frame.\n"); 1524 "Received interrupt for uncompleted RX frame\n");
1527 1525
1528 1526
1529 if (eoc) { 1527 if (eoc) {
@@ -1579,7 +1577,7 @@ drop_and_reuse:
1579 1577
1580static u32 tlan_handle_dummy(struct net_device *dev, u16 host_int) 1578static u32 tlan_handle_dummy(struct net_device *dev, u16 host_int)
1581{ 1579{
1582 pr_info("TLAN: Test interrupt on %s.\n", dev->name); 1580 netdev_info(dev, "Test interrupt\n");
1583 return 1; 1581 return 1;
1584 1582
1585} 1583}
@@ -1673,7 +1671,7 @@ static u32 tlan_handle_status_check(struct net_device *dev, u16 host_int)
1673 if (host_int & TLAN_HI_IV_MASK) { 1671 if (host_int & TLAN_HI_IV_MASK) {
1674 netif_stop_queue(dev); 1672 netif_stop_queue(dev);
1675 error = inl(dev->base_addr + TLAN_CH_PARM); 1673 error = inl(dev->base_addr + TLAN_CH_PARM);
1676 pr_info("TLAN: %s: Adaptor Error = 0x%x\n", dev->name, error); 1674 netdev_info(dev, "Adaptor Error = 0x%x\n", error);
1677 tlan_read_and_clear_stats(dev, TLAN_RECORD); 1675 tlan_read_and_clear_stats(dev, TLAN_RECORD);
1678 outl(TLAN_HC_AD_RST, dev->base_addr + TLAN_HOST_CMD); 1676 outl(TLAN_HC_AD_RST, dev->base_addr + TLAN_HOST_CMD);
1679 1677
@@ -1914,7 +1912,7 @@ static void tlan_reset_lists(struct net_device *dev)
1914 list->buffer[0].count = TLAN_MAX_FRAME_SIZE | TLAN_LAST_BUFFER; 1912 list->buffer[0].count = TLAN_MAX_FRAME_SIZE | TLAN_LAST_BUFFER;
1915 skb = netdev_alloc_skb_ip_align(dev, TLAN_MAX_FRAME_SIZE + 5); 1913 skb = netdev_alloc_skb_ip_align(dev, TLAN_MAX_FRAME_SIZE + 5);
1916 if (!skb) { 1914 if (!skb) {
1917 pr_err("TLAN: out of memory for received data.\n"); 1915 netdev_err(dev, "Out of memory for received data\n");
1918 break; 1916 break;
1919 } 1917 }
1920 1918
@@ -1998,13 +1996,13 @@ static void tlan_print_dio(u16 io_base)
1998 u32 data0, data1; 1996 u32 data0, data1;
1999 int i; 1997 int i;
2000 1998
2001 pr_info("TLAN: Contents of internal registers for io base 0x%04hx.\n", 1999 pr_info("Contents of internal registers for io base 0x%04hx\n",
2002 io_base); 2000 io_base);
2003 pr_info("TLAN: Off. +0 +4\n"); 2001 pr_info("Off. +0 +4\n");
2004 for (i = 0; i < 0x4C; i += 8) { 2002 for (i = 0; i < 0x4C; i += 8) {
2005 data0 = tlan_dio_read32(io_base, i); 2003 data0 = tlan_dio_read32(io_base, i);
2006 data1 = tlan_dio_read32(io_base, i + 0x4); 2004 data1 = tlan_dio_read32(io_base, i + 0x4);
2007 pr_info("TLAN: 0x%02x 0x%08x 0x%08x\n", i, data0, data1); 2005 pr_info("0x%02x 0x%08x 0x%08x\n", i, data0, data1);
2008 } 2006 }
2009 2007
2010} 2008}
@@ -2033,14 +2031,14 @@ static void tlan_print_list(struct tlan_list *list, char *type, int num)
2033{ 2031{
2034 int i; 2032 int i;
2035 2033
2036 pr_info("TLAN: %s List %d at %p\n", type, num, list); 2034 pr_info("%s List %d at %p\n", type, num, list);
2037 pr_info("TLAN: Forward = 0x%08x\n", list->forward); 2035 pr_info(" Forward = 0x%08x\n", list->forward);
2038 pr_info("TLAN: CSTAT = 0x%04hx\n", list->c_stat); 2036 pr_info(" CSTAT = 0x%04hx\n", list->c_stat);
2039 pr_info("TLAN: Frame Size = 0x%04hx\n", list->frame_size); 2037 pr_info(" Frame Size = 0x%04hx\n", list->frame_size);
2040 /* for (i = 0; i < 10; i++) { */ 2038 /* for (i = 0; i < 10; i++) { */
2041 for (i = 0; i < 2; i++) { 2039 for (i = 0; i < 2; i++) {
2042 pr_info("TLAN: Buffer[%d].count, addr = 0x%08x, 0x%08x\n", 2040 pr_info(" Buffer[%d].count, addr = 0x%08x, 0x%08x\n",
2043 i, list->buffer[i].count, list->buffer[i].address); 2041 i, list->buffer[i].count, list->buffer[i].address);
2044 } 2042 }
2045 2043
2046} 2044}
@@ -2255,7 +2253,7 @@ tlan_finish_reset(struct net_device *dev)
2255 if ((priv->adapter->flags & TLAN_ADAPTER_UNMANAGED_PHY) || 2253 if ((priv->adapter->flags & TLAN_ADAPTER_UNMANAGED_PHY) ||
2256 (priv->aui)) { 2254 (priv->aui)) {
2257 status = MII_GS_LINK; 2255 status = MII_GS_LINK;
2258 pr_info("TLAN: %s: Link forced.\n", dev->name); 2256 netdev_info(dev, "Link forced\n");
2259 } else { 2257 } else {
2260 tlan_mii_read_reg(dev, phy, MII_GEN_STS, &status); 2258 tlan_mii_read_reg(dev, phy, MII_GEN_STS, &status);
2261 udelay(1000); 2259 udelay(1000);
@@ -2267,24 +2265,21 @@ tlan_finish_reset(struct net_device *dev)
2267 tlan_mii_read_reg(dev, phy, MII_AN_LPA, &partner); 2265 tlan_mii_read_reg(dev, phy, MII_AN_LPA, &partner);
2268 tlan_mii_read_reg(dev, phy, TLAN_TLPHY_PAR, &tlphy_par); 2266 tlan_mii_read_reg(dev, phy, TLAN_TLPHY_PAR, &tlphy_par);
2269 2267
2270 pr_info("TLAN: %s: Link active with ", dev->name); 2268 netdev_info(dev,
2271 if (!(tlphy_par & TLAN_PHY_AN_EN_STAT)) { 2269 "Link active with %s %uMbps %s-Duplex\n",
2272 pr_info("forced 10%sMbps %s-Duplex\n", 2270 !(tlphy_par & TLAN_PHY_AN_EN_STAT)
2273 tlphy_par & TLAN_PHY_SPEED_100 2271 ? "forced" : "Autonegotiation enabled,",
2274 ? "" : "0", 2272 tlphy_par & TLAN_PHY_SPEED_100
2275 tlphy_par & TLAN_PHY_DUPLEX_FULL 2273 ? 100 : 10,
2276 ? "Full" : "Half"); 2274 tlphy_par & TLAN_PHY_DUPLEX_FULL
2277 } else { 2275 ? "Full" : "Half");
2278 pr_info("Autonegotiation enabled, at 10%sMbps %s-Duplex\n", 2276
2279 tlphy_par & TLAN_PHY_SPEED_100 2277 if (tlphy_par & TLAN_PHY_AN_EN_STAT) {
2280 ? "" : "0", 2278 netdev_info(dev, "Partner capability:");
2281 tlphy_par & TLAN_PHY_DUPLEX_FULL 2279 for (i = 5; i < 10; i++)
2282 ? "Full" : "half"); 2280 if (partner & (1 << i))
2283 pr_info("TLAN: Partner capability: "); 2281 pr_cont(" %s", media[i-5]);
2284 for (i = 5; i <= 10; i++) 2282 pr_cont("\n");
2285 if (partner & (1<<i))
2286 printk("%s", media[i-5]);
2287 printk("\n");
2288 } 2283 }
2289 2284
2290 tlan_dio_write8(dev->base_addr, TLAN_LED_REG, 2285 tlan_dio_write8(dev->base_addr, TLAN_LED_REG,
@@ -2296,7 +2291,7 @@ tlan_finish_reset(struct net_device *dev)
2296 tlan_set_timer(dev, (10*HZ), TLAN_TIMER_LINK_BEAT); 2291 tlan_set_timer(dev, (10*HZ), TLAN_TIMER_LINK_BEAT);
2297#endif 2292#endif
2298 } else if (status & MII_GS_LINK) { 2293 } else if (status & MII_GS_LINK) {
2299 pr_info("TLAN: %s: Link active\n", dev->name); 2294 netdev_info(dev, "Link active\n");
2300 tlan_dio_write8(dev->base_addr, TLAN_LED_REG, 2295 tlan_dio_write8(dev->base_addr, TLAN_LED_REG,
2301 TLAN_LED_LINK); 2296 TLAN_LED_LINK);
2302 } 2297 }
@@ -2322,8 +2317,7 @@ tlan_finish_reset(struct net_device *dev)
2322 outl(TLAN_HC_GO | TLAN_HC_RT, dev->base_addr + TLAN_HOST_CMD); 2317 outl(TLAN_HC_GO | TLAN_HC_RT, dev->base_addr + TLAN_HOST_CMD);
2323 netif_carrier_on(dev); 2318 netif_carrier_on(dev);
2324 } else { 2319 } else {
2325 pr_info("TLAN: %s: Link inactive, will retry in 10 secs...\n", 2320 netdev_info(dev, "Link inactive, will retry in 10 secs...\n");
2326 dev->name);
2327 tlan_set_timer(dev, (10*HZ), TLAN_TIMER_FINISH_RESET); 2321 tlan_set_timer(dev, (10*HZ), TLAN_TIMER_FINISH_RESET);
2328 return; 2322 return;
2329 } 2323 }
@@ -2407,23 +2401,20 @@ static void tlan_phy_print(struct net_device *dev)
2407 phy = priv->phy[priv->phy_num]; 2401 phy = priv->phy[priv->phy_num];
2408 2402
2409 if (priv->adapter->flags & TLAN_ADAPTER_UNMANAGED_PHY) { 2403 if (priv->adapter->flags & TLAN_ADAPTER_UNMANAGED_PHY) {
2410 pr_info("TLAN: Device %s, Unmanaged PHY.\n", dev->name); 2404 netdev_info(dev, "Unmanaged PHY\n");
2411 } else if (phy <= TLAN_PHY_MAX_ADDR) { 2405 } else if (phy <= TLAN_PHY_MAX_ADDR) {
2412 pr_info("TLAN: Device %s, PHY 0x%02x.\n", dev->name, phy); 2406 netdev_info(dev, "PHY 0x%02x\n", phy);
2413 pr_info("TLAN: Off. +0 +1 +2 +3\n"); 2407 pr_info(" Off. +0 +1 +2 +3\n");
2414 for (i = 0; i < 0x20; i += 4) { 2408 for (i = 0; i < 0x20; i += 4) {
2415 pr_info("TLAN: 0x%02x", i);
2416 tlan_mii_read_reg(dev, phy, i, &data0); 2409 tlan_mii_read_reg(dev, phy, i, &data0);
2417 printk(" 0x%04hx", data0);
2418 tlan_mii_read_reg(dev, phy, i + 1, &data1); 2410 tlan_mii_read_reg(dev, phy, i + 1, &data1);
2419 printk(" 0x%04hx", data1);
2420 tlan_mii_read_reg(dev, phy, i + 2, &data2); 2411 tlan_mii_read_reg(dev, phy, i + 2, &data2);
2421 printk(" 0x%04hx", data2);
2422 tlan_mii_read_reg(dev, phy, i + 3, &data3); 2412 tlan_mii_read_reg(dev, phy, i + 3, &data3);
2423 printk(" 0x%04hx\n", data3); 2413 pr_info(" 0x%02x 0x%04hx 0x%04hx 0x%04hx 0x%04hx\n",
2414 i, data0, data1, data2, data3);
2424 } 2415 }
2425 } else { 2416 } else {
2426 pr_info("TLAN: Device %s, Invalid PHY.\n", dev->name); 2417 netdev_info(dev, "Invalid PHY\n");
2427 } 2418 }
2428 2419
2429} 2420}
@@ -2490,7 +2481,7 @@ static void tlan_phy_detect(struct net_device *dev)
2490 else if (priv->phy[0] != TLAN_PHY_NONE) 2481 else if (priv->phy[0] != TLAN_PHY_NONE)
2491 priv->phy_num = 0; 2482 priv->phy_num = 0;
2492 else 2483 else
2493 pr_info("TLAN: Cannot initialize device, no PHY was found!\n"); 2484 netdev_info(dev, "Cannot initialize device, no PHY was found!\n");
2494 2485
2495} 2486}
2496 2487
@@ -2618,8 +2609,7 @@ static void tlan_phy_start_link(struct net_device *dev)
2618 * but the card need additional time to start AN. 2609 * but the card need additional time to start AN.
2619 * .5 sec should be plenty extra. 2610 * .5 sec should be plenty extra.
2620 */ 2611 */
2621 pr_info("TLAN: %s: Starting autonegotiation.\n", 2612 netdev_info(dev, "Starting autonegotiation\n");
2622 dev->name);
2623 tlan_set_timer(dev, (2*HZ), TLAN_TIMER_PHY_FINISH_AN); 2613 tlan_set_timer(dev, (2*HZ), TLAN_TIMER_PHY_FINISH_AN);
2624 return; 2614 return;
2625 } 2615 }
@@ -2682,16 +2672,16 @@ static void tlan_phy_finish_auto_neg(struct net_device *dev)
2682 * more time. Perhaps we should fail after a while. 2672 * more time. Perhaps we should fail after a while.
2683 */ 2673 */
2684 if (!priv->neg_be_verbose++) { 2674 if (!priv->neg_be_verbose++) {
2685 pr_info("TLAN: Giving autonegotiation more time.\n"); 2675 pr_info("Giving autonegotiation more time.\n");
2686 pr_info("TLAN: Please check that your adapter has\n"); 2676 pr_info("Please check that your adapter has\n");
2687 pr_info("TLAN: been properly connected to a HUB or Switch.\n"); 2677 pr_info("been properly connected to a HUB or Switch.\n");
2688 pr_info("TLAN: Trying to establish link in the background...\n"); 2678 pr_info("Trying to establish link in the background...\n");
2689 } 2679 }
2690 tlan_set_timer(dev, (8*HZ), TLAN_TIMER_PHY_FINISH_AN); 2680 tlan_set_timer(dev, (8*HZ), TLAN_TIMER_PHY_FINISH_AN);
2691 return; 2681 return;
2692 } 2682 }
2693 2683
2694 pr_info("TLAN: %s: Autonegotiation complete.\n", dev->name); 2684 netdev_info(dev, "Autonegotiation complete\n");
2695 tlan_mii_read_reg(dev, phy, MII_AN_ADV, &an_adv); 2685 tlan_mii_read_reg(dev, phy, MII_AN_ADV, &an_adv);
2696 tlan_mii_read_reg(dev, phy, MII_AN_LPA, &an_lpa); 2686 tlan_mii_read_reg(dev, phy, MII_AN_LPA, &an_lpa);
2697 mode = an_adv & an_lpa & 0x03E0; 2687 mode = an_adv & an_lpa & 0x03E0;
@@ -2716,11 +2706,11 @@ static void tlan_phy_finish_auto_neg(struct net_device *dev)
2716 (an_adv & an_lpa & 0x0040)) { 2706 (an_adv & an_lpa & 0x0040)) {
2717 tlan_mii_write_reg(dev, phy, MII_GEN_CTL, 2707 tlan_mii_write_reg(dev, phy, MII_GEN_CTL,
2718 MII_GC_AUTOENB | MII_GC_DUPLEX); 2708 MII_GC_AUTOENB | MII_GC_DUPLEX);
2719 pr_info("TLAN: Starting internal PHY with FULL-DUPLEX\n"); 2709 netdev_info(dev, "Starting internal PHY with FULL-DUPLEX\n");
2720 } else { 2710 } else {
2721 tlan_mii_write_reg(dev, phy, MII_GEN_CTL, 2711 tlan_mii_write_reg(dev, phy, MII_GEN_CTL,
2722 MII_GC_AUTOENB); 2712 MII_GC_AUTOENB);
2723 pr_info("TLAN: Starting internal PHY with HALF-DUPLEX\n"); 2713 netdev_info(dev, "Starting internal PHY with HALF-DUPLEX\n");
2724 } 2714 }
2725 } 2715 }
2726 2716