aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/vxge
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-07-27 07:47:03 -0400
committerDavid S. Miller <davem@davemloft.net>2010-07-31 02:27:57 -0400
commit75f5e1c6f6cef2c201da688b2279cf15156db56d (patch)
treeafda7a2900c4424b3bb857b7f9178c3e2fdbc4d4 /drivers/net/vxge
parent19de1e389bddb89c4cc1e4d29bb99194b50cb487 (diff)
drivers/net/vxge/vxge-main.c: Use pr_<level> and netdev_<level>
Use pr_fmt, pr_<level> and netdev_<level> where appropriate. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Jon Mason <jon.mason@exar.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vxge')
-rw-r--r--drivers/net/vxge/vxge-main.c27
1 files changed, 11 insertions, 16 deletions
diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c
index 94d87e80abcd..c7c5605b3728 100644
--- a/drivers/net/vxge/vxge-main.c
+++ b/drivers/net/vxge/vxge-main.c
@@ -41,6 +41,8 @@
41* 41*
42******************************************************************************/ 42******************************************************************************/
43 43
44#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
45
44#include <linux/if_vlan.h> 46#include <linux/if_vlan.h>
45#include <linux/pci.h> 47#include <linux/pci.h>
46#include <linux/slab.h> 48#include <linux/slab.h>
@@ -144,7 +146,7 @@ vxge_callback_link_up(struct __vxge_hw_device *hldev)
144 146
145 vxge_debug_entryexit(VXGE_TRACE, "%s: %s:%d", 147 vxge_debug_entryexit(VXGE_TRACE, "%s: %s:%d",
146 vdev->ndev->name, __func__, __LINE__); 148 vdev->ndev->name, __func__, __LINE__);
147 printk(KERN_NOTICE "%s: Link Up\n", vdev->ndev->name); 149 netdev_notice(vdev->ndev, "Link Up\n");
148 vdev->stats.link_up++; 150 vdev->stats.link_up++;
149 151
150 netif_carrier_on(vdev->ndev); 152 netif_carrier_on(vdev->ndev);
@@ -168,7 +170,7 @@ vxge_callback_link_down(struct __vxge_hw_device *hldev)
168 170
169 vxge_debug_entryexit(VXGE_TRACE, 171 vxge_debug_entryexit(VXGE_TRACE,
170 "%s: %s:%d", vdev->ndev->name, __func__, __LINE__); 172 "%s: %s:%d", vdev->ndev->name, __func__, __LINE__);
171 printk(KERN_NOTICE "%s: Link Down\n", vdev->ndev->name); 173 netdev_notice(vdev->ndev, "Link Down\n");
172 174
173 vdev->stats.link_down++; 175 vdev->stats.link_down++;
174 netif_carrier_off(vdev->ndev); 176 netif_carrier_off(vdev->ndev);
@@ -2679,7 +2681,7 @@ vxge_open(struct net_device *dev)
2679 2681
2680 if (vxge_hw_device_link_state_get(vdev->devh) == VXGE_HW_LINK_UP) { 2682 if (vxge_hw_device_link_state_get(vdev->devh) == VXGE_HW_LINK_UP) {
2681 netif_carrier_on(vdev->ndev); 2683 netif_carrier_on(vdev->ndev);
2682 printk(KERN_NOTICE "%s: Link Up\n", vdev->ndev->name); 2684 netdev_notice(vdev->ndev, "Link Up\n");
2683 vdev->stats.link_up++; 2685 vdev->stats.link_up++;
2684 } 2686 }
2685 2687
@@ -2817,7 +2819,7 @@ int do_vxge_close(struct net_device *dev, int do_io)
2817 } 2819 }
2818 2820
2819 netif_carrier_off(vdev->ndev); 2821 netif_carrier_off(vdev->ndev);
2820 printk(KERN_NOTICE "%s: Link Down\n", vdev->ndev->name); 2822 netdev_notice(vdev->ndev, "Link Down\n");
2821 netif_tx_stop_all_queues(vdev->ndev); 2823 netif_tx_stop_all_queues(vdev->ndev);
2822 2824
2823 /* Note that at this point xmit() is stopped by upper layer */ 2825 /* Note that at this point xmit() is stopped by upper layer */
@@ -3844,9 +3846,7 @@ static pci_ers_result_t vxge_io_slot_reset(struct pci_dev *pdev)
3844 struct vxgedev *vdev = netdev_priv(netdev); 3846 struct vxgedev *vdev = netdev_priv(netdev);
3845 3847
3846 if (pci_enable_device(pdev)) { 3848 if (pci_enable_device(pdev)) {
3847 printk(KERN_ERR "%s: " 3849 netdev_err(netdev, "Cannot re-enable device after reset\n");
3848 "Cannot re-enable device after reset\n",
3849 VXGE_DRIVER_NAME);
3850 return PCI_ERS_RESULT_DISCONNECT; 3850 return PCI_ERS_RESULT_DISCONNECT;
3851 } 3851 }
3852 3852
@@ -3871,9 +3871,8 @@ static void vxge_io_resume(struct pci_dev *pdev)
3871 3871
3872 if (netif_running(netdev)) { 3872 if (netif_running(netdev)) {
3873 if (vxge_open(netdev)) { 3873 if (vxge_open(netdev)) {
3874 printk(KERN_ERR "%s: " 3874 netdev_err(netdev,
3875 "Can't bring device back up after reset\n", 3875 "Can't bring device back up after reset\n");
3876 VXGE_DRIVER_NAME);
3877 return; 3876 return;
3878 } 3877 }
3879 } 3878 }
@@ -4430,13 +4429,9 @@ static int __init
4430vxge_starter(void) 4429vxge_starter(void)
4431{ 4430{
4432 int ret = 0; 4431 int ret = 0;
4433 char version[32];
4434 snprintf(version, 32, "%s", DRV_VERSION);
4435 4432
4436 printk(KERN_INFO "%s: Copyright(c) 2002-2010 Exar Corp.\n", 4433 pr_info("Copyright(c) 2002-2010 Exar Corp.\n");
4437 VXGE_DRIVER_NAME); 4434 pr_info("Driver version: %s\n", DRV_VERSION);
4438 printk(KERN_INFO "%s: Driver version: %s\n",
4439 VXGE_DRIVER_NAME, version);
4440 4435
4441 verify_bandwidth(); 4436 verify_bandwidth();
4442 4437