aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/myri10ge
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-02-22 11:56:58 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-26 04:38:34 -0500
commit78ca90ea995cb86c72cde9308276d2a701bd3c40 (patch)
treeacec2f1e2fa0d87a17c479fa069facefac2fae9b /drivers/net/myri10ge
parentc1f51212eb809849bdc68a856ae5f424dcf20d9b (diff)
drivers/net/myri10ge: Use pr_<level> and netdev_<level>
Add #define pr_fmt(fmt) Convert logging messages to pr_<level> and netdev_<level> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/myri10ge')
-rw-r--r--drivers/net/myri10ge/myri10ge.c183
1 files changed, 67 insertions, 116 deletions
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index c0884a9cba3c..1d14a8b05fa0 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -38,6 +38,8 @@
38 * Myricom, Inc., 325N Santa Anita Avenue, Arcadia, CA 91006 38 * Myricom, Inc., 325N Santa Anita Avenue, Arcadia, CA 91006
39 *************************************************************************/ 39 *************************************************************************/
40 40
41#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
42
41#include <linux/tcp.h> 43#include <linux/tcp.h>
42#include <linux/netdevice.h> 44#include <linux/netdevice.h>
43#include <linux/skbuff.h> 45#include <linux/skbuff.h>
@@ -819,9 +821,7 @@ static int myri10ge_change_pause(struct myri10ge_priv *mgp, int pause)
819 status = myri10ge_send_cmd(mgp, ctl, &cmd, 0); 821 status = myri10ge_send_cmd(mgp, ctl, &cmd, 0);
820 822
821 if (status) { 823 if (status) {
822 printk(KERN_ERR 824 netdev_err(mgp->dev, "Failed to set flow control mode\n");
823 "myri10ge: %s: Failed to set flow control mode\n",
824 mgp->dev->name);
825 return status; 825 return status;
826 } 826 }
827 mgp->pause = pause; 827 mgp->pause = pause;
@@ -837,8 +837,7 @@ myri10ge_change_promisc(struct myri10ge_priv *mgp, int promisc, int atomic)
837 ctl = promisc ? MXGEFW_ENABLE_PROMISC : MXGEFW_DISABLE_PROMISC; 837 ctl = promisc ? MXGEFW_ENABLE_PROMISC : MXGEFW_DISABLE_PROMISC;
838 status = myri10ge_send_cmd(mgp, ctl, &cmd, atomic); 838 status = myri10ge_send_cmd(mgp, ctl, &cmd, atomic);
839 if (status) 839 if (status)
840 printk(KERN_ERR "myri10ge: %s: Failed to set promisc mode\n", 840 netdev_err(mgp->dev, "Failed to set promisc mode\n");
841 mgp->dev->name);
842} 841}
843 842
844static int myri10ge_dma_test(struct myri10ge_priv *mgp, int test_type) 843static int myri10ge_dma_test(struct myri10ge_priv *mgp, int test_type)
@@ -1482,19 +1481,15 @@ static inline void myri10ge_check_statblock(struct myri10ge_priv *mgp)
1482 1481
1483 if (mgp->link_state == MXGEFW_LINK_UP) { 1482 if (mgp->link_state == MXGEFW_LINK_UP) {
1484 if (netif_msg_link(mgp)) 1483 if (netif_msg_link(mgp))
1485 printk(KERN_INFO 1484 netdev_info(mgp->dev, "link up\n");
1486 "myri10ge: %s: link up\n",
1487 mgp->dev->name);
1488 netif_carrier_on(mgp->dev); 1485 netif_carrier_on(mgp->dev);
1489 mgp->link_changes++; 1486 mgp->link_changes++;
1490 } else { 1487 } else {
1491 if (netif_msg_link(mgp)) 1488 if (netif_msg_link(mgp))
1492 printk(KERN_INFO 1489 netdev_info(mgp->dev, "link %s\n",
1493 "myri10ge: %s: link %s\n", 1490 link_up == MXGEFW_LINK_MYRINET ?
1494 mgp->dev->name, 1491 "mismatch (Myrinet detected)" :
1495 (link_up == MXGEFW_LINK_MYRINET ? 1492 "down");
1496 "mismatch (Myrinet detected)" :
1497 "down"));
1498 netif_carrier_off(mgp->dev); 1493 netif_carrier_off(mgp->dev);
1499 mgp->link_changes++; 1494 mgp->link_changes++;
1500 } 1495 }
@@ -1503,9 +1498,8 @@ static inline void myri10ge_check_statblock(struct myri10ge_priv *mgp)
1503 ntohl(stats->rdma_tags_available)) { 1498 ntohl(stats->rdma_tags_available)) {
1504 mgp->rdma_tags_available = 1499 mgp->rdma_tags_available =
1505 ntohl(stats->rdma_tags_available); 1500 ntohl(stats->rdma_tags_available);
1506 printk(KERN_WARNING "myri10ge: %s: RDMA timed out! " 1501 netdev_warn(mgp->dev, "RDMA timed out! %d tags left\n",
1507 "%d tags left\n", mgp->dev->name, 1502 mgp->rdma_tags_available);
1508 mgp->rdma_tags_available);
1509 } 1503 }
1510 mgp->down_cnt += stats->link_down; 1504 mgp->down_cnt += stats->link_down;
1511 if (stats->link_down) 1505 if (stats->link_down)
@@ -1576,8 +1570,7 @@ static irqreturn_t myri10ge_intr(int irq, void *arg)
1576 if (send_done_count != tx->pkt_done) 1570 if (send_done_count != tx->pkt_done)
1577 myri10ge_tx_done(ss, (int)send_done_count); 1571 myri10ge_tx_done(ss, (int)send_done_count);
1578 if (unlikely(i > myri10ge_max_irq_loops)) { 1572 if (unlikely(i > myri10ge_max_irq_loops)) {
1579 printk(KERN_WARNING "myri10ge: %s: irq stuck?\n", 1573 netdev_err(mgp->dev, "irq stuck?\n");
1580 mgp->dev->name);
1581 stats->valid = 0; 1574 stats->valid = 0;
1582 schedule_work(&mgp->watchdog_work); 1575 schedule_work(&mgp->watchdog_work);
1583 } 1576 }
@@ -1614,16 +1607,14 @@ myri10ge_get_settings(struct net_device *netdev, struct ethtool_cmd *cmd)
1614 */ 1607 */
1615 ptr = mgp->product_code_string; 1608 ptr = mgp->product_code_string;
1616 if (ptr == NULL) { 1609 if (ptr == NULL) {
1617 printk(KERN_ERR "myri10ge: %s: Missing product code\n", 1610 netdev_err(netdev, "Missing product code\n");
1618 netdev->name);
1619 return 0; 1611 return 0;
1620 } 1612 }
1621 for (i = 0; i < 3; i++, ptr++) { 1613 for (i = 0; i < 3; i++, ptr++) {
1622 ptr = strchr(ptr, '-'); 1614 ptr = strchr(ptr, '-');
1623 if (ptr == NULL) { 1615 if (ptr == NULL) {
1624 printk(KERN_ERR "myri10ge: %s: Invalid product " 1616 netdev_err(netdev, "Invalid product code %s\n",
1625 "code %s\n", netdev->name, 1617 mgp->product_code_string);
1626 mgp->product_code_string);
1627 return 0; 1618 return 0;
1628 } 1619 }
1629 } 1620 }
@@ -2009,17 +2000,15 @@ static int myri10ge_allocate_rings(struct myri10ge_slice_state *ss)
2009 mgp->small_bytes + MXGEFW_PAD, 0); 2000 mgp->small_bytes + MXGEFW_PAD, 0);
2010 2001
2011 if (ss->rx_small.fill_cnt < ss->rx_small.mask + 1) { 2002 if (ss->rx_small.fill_cnt < ss->rx_small.mask + 1) {
2012 printk(KERN_ERR 2003 netdev_err(dev, "slice-%d: alloced only %d small bufs\n",
2013 "myri10ge: %s:slice-%d: alloced only %d small bufs\n", 2004 slice, ss->rx_small.fill_cnt);
2014 dev->name, slice, ss->rx_small.fill_cnt);
2015 goto abort_with_rx_small_ring; 2005 goto abort_with_rx_small_ring;
2016 } 2006 }
2017 2007
2018 myri10ge_alloc_rx_pages(mgp, &ss->rx_big, mgp->big_bytes, 0); 2008 myri10ge_alloc_rx_pages(mgp, &ss->rx_big, mgp->big_bytes, 0);
2019 if (ss->rx_big.fill_cnt < ss->rx_big.mask + 1) { 2009 if (ss->rx_big.fill_cnt < ss->rx_big.mask + 1) {
2020 printk(KERN_ERR 2010 netdev_err(dev, "slice-%d: alloced only %d big bufs\n",
2021 "myri10ge: %s:slice-%d: alloced only %d big bufs\n", 2011 slice, ss->rx_big.fill_cnt);
2022 dev->name, slice, ss->rx_big.fill_cnt);
2023 goto abort_with_rx_big_ring; 2012 goto abort_with_rx_big_ring;
2024 } 2013 }
2025 2014
@@ -2358,7 +2347,7 @@ static int myri10ge_open(struct net_device *dev)
2358 mgp->running = MYRI10GE_ETH_STARTING; 2347 mgp->running = MYRI10GE_ETH_STARTING;
2359 status = myri10ge_reset(mgp); 2348 status = myri10ge_reset(mgp);
2360 if (status != 0) { 2349 if (status != 0) {
2361 printk(KERN_ERR "myri10ge: %s: failed reset\n", dev->name); 2350 netdev_err(dev, "failed reset\n");
2362 goto abort_with_nothing; 2351 goto abort_with_nothing;
2363 } 2352 }
2364 2353
@@ -2370,9 +2359,7 @@ static int myri10ge_open(struct net_device *dev)
2370 status = myri10ge_send_cmd(mgp, MXGEFW_CMD_ENABLE_RSS_QUEUES, 2359 status = myri10ge_send_cmd(mgp, MXGEFW_CMD_ENABLE_RSS_QUEUES,
2371 &cmd, 0); 2360 &cmd, 0);
2372 if (status != 0) { 2361 if (status != 0) {
2373 printk(KERN_ERR 2362 netdev_err(dev, "failed to set number of slices\n");
2374 "myri10ge: %s: failed to set number of slices\n",
2375 dev->name);
2376 goto abort_with_nothing; 2363 goto abort_with_nothing;
2377 } 2364 }
2378 /* setup the indirection table */ 2365 /* setup the indirection table */
@@ -2384,9 +2371,7 @@ static int myri10ge_open(struct net_device *dev)
2384 MXGEFW_CMD_GET_RSS_TABLE_OFFSET, 2371 MXGEFW_CMD_GET_RSS_TABLE_OFFSET,
2385 &cmd, 0); 2372 &cmd, 0);
2386 if (status != 0) { 2373 if (status != 0) {
2387 printk(KERN_ERR 2374 netdev_err(dev, "failed to setup rss tables\n");
2388 "myri10ge: %s: failed to setup rss tables\n",
2389 dev->name);
2390 goto abort_with_nothing; 2375 goto abort_with_nothing;
2391 } 2376 }
2392 2377
@@ -2400,9 +2385,7 @@ static int myri10ge_open(struct net_device *dev)
2400 status = myri10ge_send_cmd(mgp, MXGEFW_CMD_SET_RSS_ENABLE, 2385 status = myri10ge_send_cmd(mgp, MXGEFW_CMD_SET_RSS_ENABLE,
2401 &cmd, 0); 2386 &cmd, 0);
2402 if (status != 0) { 2387 if (status != 0) {
2403 printk(KERN_ERR 2388 netdev_err(dev, "failed to enable slices\n");
2404 "myri10ge: %s: failed to enable slices\n",
2405 dev->name);
2406 goto abort_with_nothing; 2389 goto abort_with_nothing;
2407 } 2390 }
2408 } 2391 }
@@ -2450,9 +2433,7 @@ static int myri10ge_open(struct net_device *dev)
2450 2433
2451 status = myri10ge_get_txrx(mgp, slice); 2434 status = myri10ge_get_txrx(mgp, slice);
2452 if (status != 0) { 2435 if (status != 0) {
2453 printk(KERN_ERR 2436 netdev_err(dev, "failed to get ring sizes or locations\n");
2454 "myri10ge: %s: failed to get ring sizes or locations\n",
2455 dev->name);
2456 goto abort_with_rings; 2437 goto abort_with_rings;
2457 } 2438 }
2458 status = myri10ge_allocate_rings(ss); 2439 status = myri10ge_allocate_rings(ss);
@@ -2465,9 +2446,7 @@ static int myri10ge_open(struct net_device *dev)
2465 if (slice == 0 || mgp->dev->real_num_tx_queues > 1) 2446 if (slice == 0 || mgp->dev->real_num_tx_queues > 1)
2466 status = myri10ge_set_stats(mgp, slice); 2447 status = myri10ge_set_stats(mgp, slice);
2467 if (status) { 2448 if (status) {
2468 printk(KERN_ERR 2449 netdev_err(dev, "Couldn't set stats DMA\n");
2469 "myri10ge: %s: Couldn't set stats DMA\n",
2470 dev->name);
2471 goto abort_with_rings; 2450 goto abort_with_rings;
2472 } 2451 }
2473 2452
@@ -2498,8 +2477,7 @@ static int myri10ge_open(struct net_device *dev)
2498 status |= 2477 status |=
2499 myri10ge_send_cmd(mgp, MXGEFW_CMD_SET_BIG_BUFFER_SIZE, &cmd, 0); 2478 myri10ge_send_cmd(mgp, MXGEFW_CMD_SET_BIG_BUFFER_SIZE, &cmd, 0);
2500 if (status) { 2479 if (status) {
2501 printk(KERN_ERR "myri10ge: %s: Couldn't set buffer sizes\n", 2480 netdev_err(dev, "Couldn't set buffer sizes\n");
2502 dev->name);
2503 goto abort_with_rings; 2481 goto abort_with_rings;
2504 } 2482 }
2505 2483
@@ -2511,8 +2489,7 @@ static int myri10ge_open(struct net_device *dev)
2511 cmd.data0 = 0; 2489 cmd.data0 = 0;
2512 status = myri10ge_send_cmd(mgp, MXGEFW_CMD_SET_TSO_MODE, &cmd, 0); 2490 status = myri10ge_send_cmd(mgp, MXGEFW_CMD_SET_TSO_MODE, &cmd, 0);
2513 if (status && status != -ENOSYS) { 2491 if (status && status != -ENOSYS) {
2514 printk(KERN_ERR "myri10ge: %s: Couldn't set TSO mode\n", 2492 netdev_err(dev, "Couldn't set TSO mode\n");
2515 dev->name);
2516 goto abort_with_rings; 2493 goto abort_with_rings;
2517 } 2494 }
2518 2495
@@ -2521,8 +2498,7 @@ static int myri10ge_open(struct net_device *dev)
2521 2498
2522 status = myri10ge_send_cmd(mgp, MXGEFW_CMD_ETHERNET_UP, &cmd, 0); 2499 status = myri10ge_send_cmd(mgp, MXGEFW_CMD_ETHERNET_UP, &cmd, 0);
2523 if (status) { 2500 if (status) {
2524 printk(KERN_ERR "myri10ge: %s: Couldn't bring up link\n", 2501 netdev_err(dev, "Couldn't bring up link\n");
2525 dev->name);
2526 goto abort_with_rings; 2502 goto abort_with_rings;
2527 } 2503 }
2528 2504
@@ -2575,15 +2551,12 @@ static int myri10ge_close(struct net_device *dev)
2575 status = 2551 status =
2576 myri10ge_send_cmd(mgp, MXGEFW_CMD_ETHERNET_DOWN, &cmd, 0); 2552 myri10ge_send_cmd(mgp, MXGEFW_CMD_ETHERNET_DOWN, &cmd, 0);
2577 if (status) 2553 if (status)
2578 printk(KERN_ERR 2554 netdev_err(dev, "Couldn't bring down link\n");
2579 "myri10ge: %s: Couldn't bring down link\n",
2580 dev->name);
2581 2555
2582 wait_event_timeout(mgp->down_wq, old_down_cnt != mgp->down_cnt, 2556 wait_event_timeout(mgp->down_wq, old_down_cnt != mgp->down_cnt,
2583 HZ); 2557 HZ);
2584 if (old_down_cnt == mgp->down_cnt) 2558 if (old_down_cnt == mgp->down_cnt)
2585 printk(KERN_ERR "myri10ge: %s never got down irq\n", 2559 netdev_err(dev, "never got down irq\n");
2586 dev->name);
2587 } 2560 }
2588 netif_tx_disable(dev); 2561 netif_tx_disable(dev);
2589 myri10ge_free_irq(mgp); 2562 myri10ge_free_irq(mgp);
@@ -2944,9 +2917,7 @@ abort_linearize:
2944 idx = (idx + 1) & tx->mask; 2917 idx = (idx + 1) & tx->mask;
2945 } while (idx != last_idx); 2918 } while (idx != last_idx);
2946 if (skb_is_gso(skb)) { 2919 if (skb_is_gso(skb)) {
2947 printk(KERN_ERR 2920 netdev_err(mgp->dev, "TSO but wanted to linearize?!?!?\n");
2948 "myri10ge: %s: TSO but wanted to linearize?!?!?\n",
2949 mgp->dev->name);
2950 goto drop; 2921 goto drop;
2951 } 2922 }
2952 2923
@@ -3043,8 +3014,8 @@ static void myri10ge_set_multicast_list(struct net_device *dev)
3043 3014
3044 err = myri10ge_send_cmd(mgp, MXGEFW_ENABLE_ALLMULTI, &cmd, 1); 3015 err = myri10ge_send_cmd(mgp, MXGEFW_ENABLE_ALLMULTI, &cmd, 1);
3045 if (err != 0) { 3016 if (err != 0) {
3046 printk(KERN_ERR "myri10ge: %s: Failed MXGEFW_ENABLE_ALLMULTI," 3017 netdev_err(dev, "Failed MXGEFW_ENABLE_ALLMULTI, error status: %d\n",
3047 " error status: %d\n", dev->name, err); 3018 err);
3048 goto abort; 3019 goto abort;
3049 } 3020 }
3050 3021
@@ -3058,9 +3029,8 @@ static void myri10ge_set_multicast_list(struct net_device *dev)
3058 err = myri10ge_send_cmd(mgp, MXGEFW_LEAVE_ALL_MULTICAST_GROUPS, 3029 err = myri10ge_send_cmd(mgp, MXGEFW_LEAVE_ALL_MULTICAST_GROUPS,
3059 &cmd, 1); 3030 &cmd, 1);
3060 if (err != 0) { 3031 if (err != 0) {
3061 printk(KERN_ERR 3032 netdev_err(dev, "Failed MXGEFW_LEAVE_ALL_MULTICAST_GROUPS, error status: %d\n",
3062 "myri10ge: %s: Failed MXGEFW_LEAVE_ALL_MULTICAST_GROUPS" 3033 err);
3063 ", error status: %d\n", dev->name, err);
3064 goto abort; 3034 goto abort;
3065 } 3035 }
3066 3036
@@ -3073,18 +3043,16 @@ static void myri10ge_set_multicast_list(struct net_device *dev)
3073 &cmd, 1); 3043 &cmd, 1);
3074 3044
3075 if (err != 0) { 3045 if (err != 0) {
3076 printk(KERN_ERR "myri10ge: %s: Failed " 3046 netdev_err(dev, "Failed MXGEFW_JOIN_MULTICAST_GROUP, error status:%d %pM\n",
3077 "MXGEFW_JOIN_MULTICAST_GROUP, error status:" 3047 err, mc_list->dmi_addr);
3078 "%d\t", dev->name, err);
3079 printk(KERN_ERR "MAC %pM\n", mc_list->dmi_addr);
3080 goto abort; 3048 goto abort;
3081 } 3049 }
3082 } 3050 }
3083 /* Enable multicast filtering */ 3051 /* Enable multicast filtering */
3084 err = myri10ge_send_cmd(mgp, MXGEFW_DISABLE_ALLMULTI, &cmd, 1); 3052 err = myri10ge_send_cmd(mgp, MXGEFW_DISABLE_ALLMULTI, &cmd, 1);
3085 if (err != 0) { 3053 if (err != 0) {
3086 printk(KERN_ERR "myri10ge: %s: Failed MXGEFW_DISABLE_ALLMULTI," 3054 netdev_err(dev, "Failed MXGEFW_DISABLE_ALLMULTI, error status: %d\n",
3087 "error status: %d\n", dev->name, err); 3055 err);
3088 goto abort; 3056 goto abort;
3089 } 3057 }
3090 3058
@@ -3105,9 +3073,8 @@ static int myri10ge_set_mac_address(struct net_device *dev, void *addr)
3105 3073
3106 status = myri10ge_update_mac_address(mgp, sa->sa_data); 3074 status = myri10ge_update_mac_address(mgp, sa->sa_data);
3107 if (status != 0) { 3075 if (status != 0) {
3108 printk(KERN_ERR 3076 netdev_err(dev, "changing mac address failed with %d\n",
3109 "myri10ge: %s: changing mac address failed with %d\n", 3077 status);
3110 dev->name, status);
3111 return status; 3078 return status;
3112 } 3079 }
3113 3080
@@ -3122,12 +3089,10 @@ static int myri10ge_change_mtu(struct net_device *dev, int new_mtu)
3122 int error = 0; 3089 int error = 0;
3123 3090
3124 if ((new_mtu < 68) || (ETH_HLEN + new_mtu > MYRI10GE_MAX_ETHER_MTU)) { 3091 if ((new_mtu < 68) || (ETH_HLEN + new_mtu > MYRI10GE_MAX_ETHER_MTU)) {
3125 printk(KERN_ERR "myri10ge: %s: new mtu (%d) is not valid\n", 3092 netdev_err(dev, "new mtu (%d) is not valid\n", new_mtu);
3126 dev->name, new_mtu);
3127 return -EINVAL; 3093 return -EINVAL;
3128 } 3094 }
3129 printk(KERN_INFO "%s: changing mtu from %d to %d\n", 3095 netdev_info(dev, "changing mtu from %d to %d\n", dev->mtu, new_mtu);
3130 dev->name, dev->mtu, new_mtu);
3131 if (mgp->running) { 3096 if (mgp->running) {
3132 /* if we change the mtu on an active device, we must 3097 /* if we change the mtu on an active device, we must
3133 * reset the device so the firmware sees the change */ 3098 * reset the device so the firmware sees the change */
@@ -3356,7 +3321,7 @@ static int myri10ge_suspend(struct pci_dev *pdev, pm_message_t state)
3356 3321
3357 netif_device_detach(netdev); 3322 netif_device_detach(netdev);
3358 if (netif_running(netdev)) { 3323 if (netif_running(netdev)) {
3359 printk(KERN_INFO "myri10ge: closing %s\n", netdev->name); 3324 netdev_info(netdev, "closing\n");
3360 rtnl_lock(); 3325 rtnl_lock();
3361 myri10ge_close(netdev); 3326 myri10ge_close(netdev);
3362 rtnl_unlock(); 3327 rtnl_unlock();
@@ -3383,8 +3348,7 @@ static int myri10ge_resume(struct pci_dev *pdev)
3383 msleep(5); /* give card time to respond */ 3348 msleep(5); /* give card time to respond */
3384 pci_read_config_word(mgp->pdev, PCI_VENDOR_ID, &vendor); 3349 pci_read_config_word(mgp->pdev, PCI_VENDOR_ID, &vendor);
3385 if (vendor == 0xffff) { 3350 if (vendor == 0xffff) {
3386 printk(KERN_ERR "myri10ge: %s: device disappeared!\n", 3351 netdev_err(mgp->dev, "device disappeared!\n");
3387 mgp->dev->name);
3388 return -EIO; 3352 return -EIO;
3389 } 3353 }
3390 3354
@@ -3463,10 +3427,9 @@ static void myri10ge_watchdog(struct work_struct *work)
3463 * if the card rebooted due to a parity error 3427 * if the card rebooted due to a parity error
3464 * For now, just report it */ 3428 * For now, just report it */
3465 reboot = myri10ge_read_reboot(mgp); 3429 reboot = myri10ge_read_reboot(mgp);
3466 printk(KERN_ERR 3430 netdev_err(mgp->dev, "NIC rebooted (0x%x),%s resetting\n",
3467 "myri10ge: %s: NIC rebooted (0x%x),%s resetting\n", 3431 reboot,
3468 mgp->dev->name, reboot, 3432 myri10ge_reset_recover ? "" : " not");
3469 myri10ge_reset_recover ? " " : " not");
3470 if (myri10ge_reset_recover == 0) 3433 if (myri10ge_reset_recover == 0)
3471 return; 3434 return;
3472 rtnl_lock(); 3435 rtnl_lock();
@@ -3494,31 +3457,26 @@ static void myri10ge_watchdog(struct work_struct *work)
3494 if (cmd == 0xffff) { 3457 if (cmd == 0xffff) {
3495 pci_read_config_word(mgp->pdev, PCI_VENDOR_ID, &vendor); 3458 pci_read_config_word(mgp->pdev, PCI_VENDOR_ID, &vendor);
3496 if (vendor == 0xffff) { 3459 if (vendor == 0xffff) {
3497 printk(KERN_ERR 3460 netdev_err(mgp->dev, "device disappeared!\n");
3498 "myri10ge: %s: device disappeared!\n",
3499 mgp->dev->name);
3500 return; 3461 return;
3501 } 3462 }
3502 } 3463 }
3503 /* Perhaps it is a software error. Try to reset */ 3464 /* Perhaps it is a software error. Try to reset */
3504 3465
3505 printk(KERN_ERR "myri10ge: %s: device timeout, resetting\n", 3466 netdev_err(mgp->dev, "device timeout, resetting\n");
3506 mgp->dev->name);
3507 for (i = 0; i < mgp->num_slices; i++) { 3467 for (i = 0; i < mgp->num_slices; i++) {
3508 tx = &mgp->ss[i].tx; 3468 tx = &mgp->ss[i].tx;
3509 printk(KERN_INFO 3469 netdev_err(mgp->dev, "(%d): %d %d %d %d %d %d\n",
3510 "myri10ge: %s: (%d): %d %d %d %d %d %d\n", 3470 i, tx->queue_active, tx->req,
3511 mgp->dev->name, i, tx->queue_active, tx->req, 3471 tx->done, tx->pkt_start, tx->pkt_done,
3512 tx->done, tx->pkt_start, tx->pkt_done, 3472 (int)ntohl(mgp->ss[i].fw_stats->
3513 (int)ntohl(mgp->ss[i].fw_stats-> 3473 send_done_count));
3514 send_done_count));
3515 msleep(2000); 3474 msleep(2000);
3516 printk(KERN_INFO 3475 netdev_info(mgp->dev, "(%d): %d %d %d %d %d %d\n",
3517 "myri10ge: %s: (%d): %d %d %d %d %d %d\n", 3476 i, tx->queue_active, tx->req,
3518 mgp->dev->name, i, tx->queue_active, tx->req, 3477 tx->done, tx->pkt_start, tx->pkt_done,
3519 tx->done, tx->pkt_start, tx->pkt_done, 3478 (int)ntohl(mgp->ss[i].fw_stats->
3520 (int)ntohl(mgp->ss[i].fw_stats-> 3479 send_done_count));
3521 send_done_count));
3522 } 3480 }
3523 } 3481 }
3524 3482
@@ -3528,8 +3486,7 @@ static void myri10ge_watchdog(struct work_struct *work)
3528 } 3486 }
3529 status = myri10ge_load_firmware(mgp, 1); 3487 status = myri10ge_load_firmware(mgp, 1);
3530 if (status != 0) 3488 if (status != 0)
3531 printk(KERN_ERR "myri10ge: %s: failed to load firmware\n", 3489 netdev_err(mgp->dev, "failed to load firmware\n");
3532 mgp->dev->name);
3533 else 3490 else
3534 myri10ge_open(mgp->dev); 3491 myri10ge_open(mgp->dev);
3535 rtnl_unlock(); 3492 rtnl_unlock();
@@ -3580,14 +3537,10 @@ static void myri10ge_watchdog_timer(unsigned long arg)
3580 /* nic seems like it might be stuck.. */ 3537 /* nic seems like it might be stuck.. */
3581 if (rx_pause_cnt != mgp->watchdog_pause) { 3538 if (rx_pause_cnt != mgp->watchdog_pause) {
3582 if (net_ratelimit()) 3539 if (net_ratelimit())
3583 printk(KERN_WARNING 3540 netdev_err(mgp->dev, "slice %d: TX paused, check link partner\n",
3584 "myri10ge %s slice %d:" 3541 i);
3585 "TX paused, check link partner\n",
3586 mgp->dev->name, i);
3587 } else { 3542 } else {
3588 printk(KERN_WARNING 3543 netdev_warn(mgp->dev, "slice %d stuck:", i);
3589 "myri10ge %s slice %d stuck:",
3590 mgp->dev->name, i);
3591 reset_needed = 1; 3544 reset_needed = 1;
3592 } 3545 }
3593 } 3546 }
@@ -4127,13 +4080,11 @@ static struct notifier_block myri10ge_dca_notifier = {
4127 4080
4128static __init int myri10ge_init_module(void) 4081static __init int myri10ge_init_module(void)
4129{ 4082{
4130 printk(KERN_INFO "%s: Version %s\n", myri10ge_driver.name, 4083 pr_info("Version %s\n", MYRI10GE_VERSION_STR);
4131 MYRI10GE_VERSION_STR);
4132 4084
4133 if (myri10ge_rss_hash > MXGEFW_RSS_HASH_TYPE_MAX) { 4085 if (myri10ge_rss_hash > MXGEFW_RSS_HASH_TYPE_MAX) {
4134 printk(KERN_ERR 4086 pr_err("Illegal rssh hash type %d, defaulting to source port\n",
4135 "%s: Illegal rssh hash type %d, defaulting to source port\n", 4087 myri10ge_rss_hash);
4136 myri10ge_driver.name, myri10ge_rss_hash);
4137 myri10ge_rss_hash = MXGEFW_RSS_HASH_TYPE_SRC_PORT; 4088 myri10ge_rss_hash = MXGEFW_RSS_HASH_TYPE_SRC_PORT;
4138 } 4089 }
4139#ifdef CONFIG_MYRI10GE_DCA 4090#ifdef CONFIG_MYRI10GE_DCA