From: Alexander Duyck <alexander.duyck@gmail.com>
To: joe@perches.com, jeffrey.t.kirsher@intel.com, davem@davemloft.net
Cc: zdai@linux.vnet.ibm.com, nhorman@redhat.com,
netdev@vger.kernel.org, smorumu1@in.ibm.com,
intel-wired-lan@lists.osuosl.org, aaron.f.brown@intel.com,
sassmann@redhat.com
Subject: [next-queue/net-next PATCH] e1000e: Use netdev_info instead of pr_info for link messages
Date: Thu, 31 Oct 2019 09:58:51 -0700 [thread overview]
Message-ID: <20191031165537.24154.48242.stgit@localhost.localdomain> (raw)
In-Reply-To: <cf197ef61703cbaa64ac522cf5d191b4b74f64d6.camel@linux.intel.com>
From: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Replace the pr_info calls with netdev_info in all cases related to the
netdevice link state.
As a result of this patch the link messages will change as shown below.
Before:
e1000e: ens3 NIC Link is Down
e1000e: ens3 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx
After:
e1000e 0000:00:03.0 ens3: NIC Link is Down
e1000e 0000:00:03.0 ens3: NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx
Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
---
Since Joe hasn't gotten back to me on if he wanted to do the patch or if
he wanted me to do it I just went ahead and did it. This should address the
concerns he had about the message formatting in "e1000e: Use rtnl_lock to
prevent race".
drivers/net/ethernet/intel/e1000e/netdev.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index ef8ca0c134b0..a1aa48168855 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -4720,7 +4720,7 @@ int e1000e_close(struct net_device *netdev)
e1000_free_irq(adapter);
/* Link status message must follow this format */
- pr_info("%s NIC Link is Down\n", netdev->name);
+ netdev_info(netdev, "NIC Link is Down\n");
}
napi_disable(&adapter->napi);
@@ -5070,8 +5070,9 @@ static void e1000_print_link_info(struct e1000_adapter *adapter)
u32 ctrl = er32(CTRL);
/* Link status message must follow this format for user tools */
- pr_info("%s NIC Link is Up %d Mbps %s Duplex, Flow Control: %s\n",
- adapter->netdev->name, adapter->link_speed,
+ netdev_info(adapter->netdev,
+ "NIC Link is Up %d Mbps %s Duplex, Flow Control: %s\n",
+ adapter->link_speed,
adapter->link_duplex == FULL_DUPLEX ? "Full" : "Half",
(ctrl & E1000_CTRL_TFCE) && (ctrl & E1000_CTRL_RFCE) ? "Rx/Tx" :
(ctrl & E1000_CTRL_RFCE) ? "Rx" :
@@ -5304,7 +5305,7 @@ static void e1000_watchdog_task(struct work_struct *work)
adapter->link_speed = 0;
adapter->link_duplex = 0;
/* Link status message must follow this format */
- pr_info("%s NIC Link is Down\n", adapter->netdev->name);
+ netdev_info(netdev, "NIC Link is Down\n");
netif_carrier_off(netdev);
netif_stop_queue(netdev);
if (!test_bit(__E1000_DOWN, &adapter->state))
next prev parent reply other threads:[~2019-10-31 16:58 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-30 4:36 [net-next 0/8][pull request] 1GbE Intel Wired LAN Driver Updates 2019-10-29 Jeff Kirsher
2019-10-30 4:36 ` [net-next 1/8] e1000e: Add support for Comet Lake Jeff Kirsher
2019-10-30 4:36 ` [net-next 2/8] e1000e: Use rtnl_lock to prevent race conditions between net and pci/pm Jeff Kirsher
2019-10-30 5:50 ` Joe Perches
2019-10-30 15:48 ` Alexander Duyck
2019-10-31 16:58 ` Alexander Duyck [this message]
2019-10-31 17:48 ` [next-queue/net-next PATCH] e1000e: Use netdev_info instead of pr_info for link messages Neil Horman
2019-11-20 2:55 ` Brown, Aaron F
2019-10-30 4:36 ` [net-next 3/8] e1000e: Drop unnecessary __E1000_DOWN bit twiddling Jeff Kirsher
2019-10-30 4:36 ` [net-next 4/8] igb: Add UDP segmentation offload support Jeff Kirsher
2019-10-30 4:36 ` [net-next 5/8] ixgbe: " Jeff Kirsher
2019-10-30 4:36 ` [net-next 6/8] i40e: " Jeff Kirsher
2019-10-30 4:36 ` [net-next 7/8] e1000e: Add support for Tiger Lake Jeff Kirsher
2019-10-30 4:36 ` [net-next 8/8] e1000e: Fix compiler warning when CONFIG_PM_SLEEP is not set Jeff Kirsher
2019-10-31 0:51 ` [net-next 0/8][pull request] 1GbE Intel Wired LAN Driver Updates 2019-10-29 David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191031165537.24154.48242.stgit@localhost.localdomain \
--to=alexander.duyck@gmail.com \
--cc=aaron.f.brown@intel.com \
--cc=davem@davemloft.net \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jeffrey.t.kirsher@intel.com \
--cc=joe@perches.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@redhat.com \
--cc=sassmann@redhat.com \
--cc=smorumu1@in.ibm.com \
--cc=zdai@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox