diff options
-rw-r--r-- | drivers/net/xen-netback/netback.c | 7 | ||||
-rw-r--r-- | drivers/net/xen-netfront.c | 28 |
2 files changed, 16 insertions, 19 deletions
diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c index 130bcb217d2c..64828de25d9a 100644 --- a/drivers/net/xen-netback/netback.c +++ b/drivers/net/xen-netback/netback.c | |||
@@ -1890,9 +1890,8 @@ static int __init netback_init(void) | |||
1890 | return -ENODEV; | 1890 | return -ENODEV; |
1891 | 1891 | ||
1892 | if (fatal_skb_slots < XEN_NETBK_LEGACY_SLOTS_MAX) { | 1892 | if (fatal_skb_slots < XEN_NETBK_LEGACY_SLOTS_MAX) { |
1893 | printk(KERN_INFO | 1893 | pr_info("fatal_skb_slots too small (%d), bump it to XEN_NETBK_LEGACY_SLOTS_MAX (%d)\n", |
1894 | "xen-netback: fatal_skb_slots too small (%d), bump it to XEN_NETBK_LEGACY_SLOTS_MAX (%d)\n", | 1894 | fatal_skb_slots, XEN_NETBK_LEGACY_SLOTS_MAX); |
1895 | fatal_skb_slots, XEN_NETBK_LEGACY_SLOTS_MAX); | ||
1896 | fatal_skb_slots = XEN_NETBK_LEGACY_SLOTS_MAX; | 1895 | fatal_skb_slots = XEN_NETBK_LEGACY_SLOTS_MAX; |
1897 | } | 1896 | } |
1898 | 1897 | ||
@@ -1921,7 +1920,7 @@ static int __init netback_init(void) | |||
1921 | "netback/%u", group); | 1920 | "netback/%u", group); |
1922 | 1921 | ||
1923 | if (IS_ERR(netbk->task)) { | 1922 | if (IS_ERR(netbk->task)) { |
1924 | printk(KERN_ALERT "kthread_create() fails at netback\n"); | 1923 | pr_alert("kthread_create() fails at netback\n"); |
1925 | del_timer(&netbk->net_timer); | 1924 | del_timer(&netbk->net_timer); |
1926 | rc = PTR_ERR(netbk->task); | 1925 | rc = PTR_ERR(netbk->task); |
1927 | goto failed_init; | 1926 | goto failed_init; |
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c index 76a22365d4e9..ff7f111fffee 100644 --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c | |||
@@ -29,6 +29,8 @@ | |||
29 | * IN THE SOFTWARE. | 29 | * IN THE SOFTWARE. |
30 | */ | 30 | */ |
31 | 31 | ||
32 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
33 | |||
32 | #include <linux/module.h> | 34 | #include <linux/module.h> |
33 | #include <linux/kernel.h> | 35 | #include <linux/kernel.h> |
34 | #include <linux/netdevice.h> | 36 | #include <linux/netdevice.h> |
@@ -385,9 +387,8 @@ static void xennet_tx_buf_gc(struct net_device *dev) | |||
385 | skb = np->tx_skbs[id].skb; | 387 | skb = np->tx_skbs[id].skb; |
386 | if (unlikely(gnttab_query_foreign_access( | 388 | if (unlikely(gnttab_query_foreign_access( |
387 | np->grant_tx_ref[id]) != 0)) { | 389 | np->grant_tx_ref[id]) != 0)) { |
388 | printk(KERN_ALERT "xennet_tx_buf_gc: warning " | 390 | pr_alert("%s: warning -- grant still in use by backend domain\n", |
389 | "-- grant still in use by backend " | 391 | __func__); |
390 | "domain.\n"); | ||
391 | BUG(); | 392 | BUG(); |
392 | } | 393 | } |
393 | gnttab_end_foreign_access_ref( | 394 | gnttab_end_foreign_access_ref( |
@@ -804,14 +805,14 @@ static int xennet_set_skb_gso(struct sk_buff *skb, | |||
804 | { | 805 | { |
805 | if (!gso->u.gso.size) { | 806 | if (!gso->u.gso.size) { |
806 | if (net_ratelimit()) | 807 | if (net_ratelimit()) |
807 | printk(KERN_WARNING "GSO size must not be zero.\n"); | 808 | pr_warn("GSO size must not be zero\n"); |
808 | return -EINVAL; | 809 | return -EINVAL; |
809 | } | 810 | } |
810 | 811 | ||
811 | /* Currently only TCPv4 S.O. is supported. */ | 812 | /* Currently only TCPv4 S.O. is supported. */ |
812 | if (gso->u.gso.type != XEN_NETIF_GSO_TYPE_TCPV4) { | 813 | if (gso->u.gso.type != XEN_NETIF_GSO_TYPE_TCPV4) { |
813 | if (net_ratelimit()) | 814 | if (net_ratelimit()) |
814 | printk(KERN_WARNING "Bad GSO type %d.\n", gso->u.gso.type); | 815 | pr_warn("Bad GSO type %d\n", gso->u.gso.type); |
815 | return -EINVAL; | 816 | return -EINVAL; |
816 | } | 817 | } |
817 | 818 | ||
@@ -910,9 +911,8 @@ static int checksum_setup(struct net_device *dev, struct sk_buff *skb) | |||
910 | break; | 911 | break; |
911 | default: | 912 | default: |
912 | if (net_ratelimit()) | 913 | if (net_ratelimit()) |
913 | printk(KERN_ERR "Attempting to checksum a non-" | 914 | pr_err("Attempting to checksum a non-TCP/UDP packet, dropping a protocol %d packet\n", |
914 | "TCP/UDP packet, dropping a protocol" | 915 | iph->protocol); |
915 | " %d packet", iph->protocol); | ||
916 | goto out; | 916 | goto out; |
917 | } | 917 | } |
918 | 918 | ||
@@ -1359,14 +1359,14 @@ static struct net_device *xennet_create_dev(struct xenbus_device *dev) | |||
1359 | /* A grant for every tx ring slot */ | 1359 | /* A grant for every tx ring slot */ |
1360 | if (gnttab_alloc_grant_references(TX_MAX_TARGET, | 1360 | if (gnttab_alloc_grant_references(TX_MAX_TARGET, |
1361 | &np->gref_tx_head) < 0) { | 1361 | &np->gref_tx_head) < 0) { |
1362 | printk(KERN_ALERT "#### netfront can't alloc tx grant refs\n"); | 1362 | pr_alert("can't alloc tx grant refs\n"); |
1363 | err = -ENOMEM; | 1363 | err = -ENOMEM; |
1364 | goto exit_free_stats; | 1364 | goto exit_free_stats; |
1365 | } | 1365 | } |
1366 | /* A grant for every rx ring slot */ | 1366 | /* A grant for every rx ring slot */ |
1367 | if (gnttab_alloc_grant_references(RX_MAX_TARGET, | 1367 | if (gnttab_alloc_grant_references(RX_MAX_TARGET, |
1368 | &np->gref_rx_head) < 0) { | 1368 | &np->gref_rx_head) < 0) { |
1369 | printk(KERN_ALERT "#### netfront can't alloc rx grant refs\n"); | 1369 | pr_alert("can't alloc rx grant refs\n"); |
1370 | err = -ENOMEM; | 1370 | err = -ENOMEM; |
1371 | goto exit_free_tx; | 1371 | goto exit_free_tx; |
1372 | } | 1372 | } |
@@ -1430,16 +1430,14 @@ static int netfront_probe(struct xenbus_device *dev, | |||
1430 | 1430 | ||
1431 | err = register_netdev(info->netdev); | 1431 | err = register_netdev(info->netdev); |
1432 | if (err) { | 1432 | if (err) { |
1433 | printk(KERN_WARNING "%s: register_netdev err=%d\n", | 1433 | pr_warn("%s: register_netdev err=%d\n", __func__, err); |
1434 | __func__, err); | ||
1435 | goto fail; | 1434 | goto fail; |
1436 | } | 1435 | } |
1437 | 1436 | ||
1438 | err = xennet_sysfs_addif(info->netdev); | 1437 | err = xennet_sysfs_addif(info->netdev); |
1439 | if (err) { | 1438 | if (err) { |
1440 | unregister_netdev(info->netdev); | 1439 | unregister_netdev(info->netdev); |
1441 | printk(KERN_WARNING "%s: add sysfs failed err=%d\n", | 1440 | pr_warn("%s: add sysfs failed err=%d\n", __func__, err); |
1442 | __func__, err); | ||
1443 | goto fail; | 1441 | goto fail; |
1444 | } | 1442 | } |
1445 | 1443 | ||
@@ -2116,7 +2114,7 @@ static int __init netif_init(void) | |||
2116 | if (xen_hvm_domain() && !xen_platform_pci_unplug) | 2114 | if (xen_hvm_domain() && !xen_platform_pci_unplug) |
2117 | return -ENODEV; | 2115 | return -ENODEV; |
2118 | 2116 | ||
2119 | printk(KERN_INFO "Initialising Xen virtual ethernet driver.\n"); | 2117 | pr_info("Initialising Xen virtual ethernet driver\n"); |
2120 | 2118 | ||
2121 | return xenbus_register_frontend(&netfront_driver); | 2119 | return xenbus_register_frontend(&netfront_driver); |
2122 | } | 2120 | } |