]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
i40e: generate fewer startup messages
authorShannon Nelson <shannon.nelson@intel.com>
Mon, 28 Sep 2015 18:12:30 +0000 (14:12 -0400)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 16 Oct 2015 11:36:13 +0000 (04:36 -0700)
Cut down on the number of startup log entries by putting a couple behind
debug flags and combining a couple others into a single line.

Change-ID: I708089f086308f84d43f8b6f0e8a634a02d058fb
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e.h
drivers/net/ethernet/intel/i40e/i40e_ethtool.c
drivers/net/ethernet/intel/i40e/i40e_main.c
drivers/net/ethernet/intel/i40e/i40e_ptp.c

index 91f8cbffa6a8d4b3475ecb6cf8b9e0778964a71a..7aaead358b8c374161df14184e3f704cc2231a7c 100644 (file)
@@ -582,10 +582,10 @@ struct i40e_device {
 };
 
 /**
- * i40e_fw_version_str - format the FW and NVM version strings
+ * i40e_nvm_version_str - format the NVM version strings
  * @hw: ptr to the hardware info
  **/
-static inline char *i40e_fw_version_str(struct i40e_hw *hw)
+static inline char *i40e_nvm_version_str(struct i40e_hw *hw)
 {
        static char buf[32];
 
index e7fd84c5b9f32ed93ceb25818885a894c81dcea1..e994f4a13be1cfedfbfd07db6c9dd0a3f6a0bc14 100644 (file)
@@ -1122,7 +1122,7 @@ static void i40e_get_drvinfo(struct net_device *netdev,
        strlcpy(drvinfo->driver, i40e_driver_name, sizeof(drvinfo->driver));
        strlcpy(drvinfo->version, i40e_driver_version_str,
                sizeof(drvinfo->version));
-       strlcpy(drvinfo->fw_version, i40e_fw_version_str(&pf->hw),
+       strlcpy(drvinfo->fw_version, i40e_nvm_version_str(&pf->hw),
                sizeof(drvinfo->fw_version));
        strlcpy(drvinfo->bus_info, pci_name(pf->pdev),
                sizeof(drvinfo->bus_info));
index 389f110ee734140f629463c9390bc425143f1f07..d7310955bcc83ce6b9f14ac3ad7bfff5c0441cc9 100644 (file)
@@ -6218,8 +6218,9 @@ static void i40e_config_bridge_mode(struct i40e_veb *veb)
 {
        struct i40e_pf *pf = veb->pf;
 
-       dev_info(&pf->pdev->dev, "enabling bridge mode: %s\n",
-                veb->bridge_mode == BRIDGE_MODE_VEPA ? "VEPA" : "VEB");
+       if (pf->hw.debug_mask & I40E_DEBUG_LAN)
+               dev_info(&pf->pdev->dev, "enabling bridge mode: %s\n",
+                        veb->bridge_mode == BRIDGE_MODE_VEPA ? "VEPA" : "VEB");
        if (veb->bridge_mode & BRIDGE_MODE_VEPA)
                i40e_disable_pf_switch_lb(pf);
        else
@@ -9923,6 +9924,10 @@ static void i40e_print_features(struct i40e_pf *pf)
        if (pf->flags & I40E_FLAG_FCOE_ENABLED)
                buf += sprintf(buf, "FCOE ");
 #endif
+       if (pf->flags & I40E_FLAG_VEB_MODE_ENABLED)
+               buf += sprintf(buf, "VEB ");
+       else
+               buf += sprintf(buf, "VEPA ");
 
        BUG_ON(buf > (string + INFO_STRING_LEN));
        dev_info(&pf->pdev->dev, "%s\n", string);
@@ -10062,13 +10067,12 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        pf->hw.fc.requested_mode = I40E_FC_NONE;
 
        err = i40e_init_adminq(hw);
-       dev_info(&pdev->dev, "%s\n", i40e_fw_version_str(hw));
 
-       /* provide additional fw info, like api and ver */
-       dev_info(&pdev->dev, "fw_version:%d.%d.%05d\n",
-                hw->aq.fw_maj_ver, hw->aq.fw_min_ver, hw->aq.fw_build);
-       dev_info(&pdev->dev, "fw api version:%d.%d\n",
-                hw->aq.api_maj_ver, hw->aq.api_min_ver);
+       /* provide nvm, fw, api versions */
+       dev_info(&pdev->dev, "fw %d.%d.%05d api %d.%d nvm %s\n",
+                hw->aq.fw_maj_ver, hw->aq.fw_min_ver, hw->aq.fw_build,
+                hw->aq.api_maj_ver, hw->aq.api_min_ver,
+                i40e_nvm_version_str(hw));
 
        if (err) {
                dev_info(&pdev->dev,
index 552c84e2e05d7ee0b5ff0b90a07203786830c49a..565ca7c835bc3989459065e129254e0a16eadba6 100644 (file)
@@ -674,8 +674,8 @@ void i40e_ptp_init(struct i40e_pf *pf)
                struct timespec64 ts;
                u32 regval;
 
-               dev_info(&pf->pdev->dev, "%s: added PHC on %s\n", __func__,
-                        netdev->name);
+               if (pf->hw.debug_mask & I40E_DEBUG_LAN)
+                       dev_info(&pf->pdev->dev, "PHC enabled\n");
                pf->flags |= I40E_FLAG_PTP;
 
                /* Ensure the clocks are running. */