]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/net/bnx2x_link.c
iwlwifi: move agn common code to iwlagn library file
[mv-sheeva.git] / drivers / net / bnx2x_link.c
index 41b9b7bd3d8e065b765ea97461b1da5bd95edb88..32e79c359e8945795ad4a909245223fbcff07ac3 100644 (file)
@@ -14,6 +14,8 @@
  *
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/kernel.h>
 #include <linux/errno.h>
 #include <linux/pci.h>
@@ -2987,11 +2989,8 @@ static u8 bnx2x_verify_sfp_module(struct link_params *params)
        else
                vendor_pn[SFP_EEPROM_PART_NO_SIZE] = '\0';
 
-       printk(KERN_INFO PFX  "Warning: "
-                        "Unqualified SFP+ module "
-                        "detected on %s, Port %d from %s part number %s\n"
-                       , bp->dev->name, params->port,
-                       vendor_name, vendor_pn);
+       netdev_info(bp->dev, "Warning: Unqualified SFP+ module detected, Port %d from %s part number %s\n",
+                   params->port, vendor_name, vendor_pn);
        return -EINVAL;
 }
 
@@ -4717,8 +4716,8 @@ static u8 bnx2x_ext_phy_is_link_up(struct link_params *params,
                                      0xc809, &val1);
 
                        DP(NETIF_MSG_LINK, "8705 1.c809 val=0x%x\n", val1);
-                       ext_phy_link_up = ((rx_sd & 0x1) && (val1 & (1<<9))
-                                          && ((val1 & (1<<8)) == 0));
+                       ext_phy_link_up = ((rx_sd & 0x1) && (val1 & (1<<9)) &&
+                                          ((val1 & (1<<8)) == 0));
                        if (ext_phy_link_up)
                                vars->line_speed = SPEED_10000;
                        break;
@@ -4846,16 +4845,8 @@ static u8 bnx2x_ext_phy_is_link_up(struct link_params *params,
                                                     " has been detected on "
                                                     "port %d\n",
                                                 params->port);
-                                       printk(KERN_ERR PFX  "Error:  Power"
-                                                " fault on %s Port %d has"
-                                                " been detected and the"
-                                                " power to that SFP+ module"
-                                                " has been removed to prevent"
-                                                " failure of the card. Please"
-                                                " remove the SFP+ module and"
-                                                " restart the system to clear"
-                                                " this error.\n"
-                       , bp->dev->name, params->port);
+                                       netdev_err(bp->dev, "Error:  Power fault on Port %d has been detected and the power to that SFP+ module has been removed to prevent failure of the card. Please remove the SFP+ module and restart the system to clear this error.\n",
+                                                  params->port);
                                        /*
                                         * Disable all RX_ALARMs except for
                                         * mod_abs