From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Matthew Vick <matthew.vick@intel.com>,
netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com,
Richard Cochran <richardcochran@gmail.com>,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 4/6] igb: Store the MAC address in the name in the PTP struct.
Date: Mon, 17 Sep 2012 02:21:47 -0700 [thread overview]
Message-ID: <1347873709-2190-5-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1347873709-2190-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Matthew Vick <matthew.vick@intel.com>
Change the name of the adapter in the PTP struct to enable easier
correlation between interface and PTP device.
Cc: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Matthew Vick <matthew.vick@intel.com>
Acked-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/igb/igb_ptp.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/igb_ptp.c b/drivers/net/ethernet/intel/igb/igb_ptp.c
index 34e0d69..e69555f 100644
--- a/drivers/net/ethernet/intel/igb/igb_ptp.c
+++ b/drivers/net/ethernet/intel/igb/igb_ptp.c
@@ -547,14 +547,15 @@ int igb_ptp_hwtstamp_ioctl(struct net_device *netdev,
void igb_ptp_init(struct igb_adapter *adapter)
{
struct e1000_hw *hw = &adapter->hw;
+ struct net_device *netdev = adapter->netdev;
switch (hw->mac.type) {
case e1000_i210:
case e1000_i211:
case e1000_i350:
case e1000_82580:
+ snprintf(adapter->ptp_caps.name, 16, "%pm", netdev->dev_addr);
adapter->ptp_caps.owner = THIS_MODULE;
- strcpy(adapter->ptp_caps.name, "igb-82580");
adapter->ptp_caps.max_adj = 62499999;
adapter->ptp_caps.n_ext_ts = 0;
adapter->ptp_caps.pps = 0;
@@ -570,10 +571,9 @@ void igb_ptp_init(struct igb_adapter *adapter)
/* Enable the timer functions by clearing bit 31. */
wr32(E1000_TSAUXC, 0x0);
break;
-
case e1000_82576:
+ snprintf(adapter->ptp_caps.name, 16, "%pm", netdev->dev_addr);
adapter->ptp_caps.owner = THIS_MODULE;
- strcpy(adapter->ptp_caps.name, "igb-82576");
adapter->ptp_caps.max_adj = 1000000000;
adapter->ptp_caps.n_ext_ts = 0;
adapter->ptp_caps.pps = 0;
@@ -589,7 +589,6 @@ void igb_ptp_init(struct igb_adapter *adapter)
/* Dial the nominal frequency. */
wr32(E1000_TIMINCA, INCPERIOD_82576 | INCVALUE_82576);
break;
-
default:
adapter->ptp_clock = NULL;
return;
--
1.7.11.4
next prev parent reply other threads:[~2012-09-17 9:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-17 9:21 [net-next 0/6][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2012-09-17 9:21 ` [net-next 1/6] igb: Tidy up wrapping for CONFIG_IGB_PTP Jeff Kirsher
2012-09-17 9:21 ` [net-next 2/6] igb: Update PTP function names/variables and locations Jeff Kirsher
2012-09-17 9:21 ` [net-next 3/6] igb: Correct PTP support query from ethtool Jeff Kirsher
2012-09-17 9:21 ` Jeff Kirsher [this message]
2012-09-17 9:21 ` [net-next 5/6] igb: Prevent dropped Tx timestamps via work items and interrupts Jeff Kirsher
2012-09-17 9:21 ` [net-next 6/6] igb: Add 1588 support to I210/I211 Jeff Kirsher
2012-09-17 16:44 ` [net-next 0/6][pull request] Intel Wired LAN Driver Updates David Miller
-- strict thread matches above, loose matches on Subject: below --
2012-09-05 23:35 Jeff Kirsher
2012-09-05 23:35 ` [net-next 4/6] igb: Store the MAC address in the name in the PTP struct Jeff Kirsher
2012-09-06 8:06 ` Richard Cochran
2012-09-06 22:59 ` Keller, Jacob E
2012-09-06 23:23 ` Ben Hutchings
2012-09-06 23:24 ` Keller, Jacob E
2012-09-06 23:39 ` Ben Hutchings
2012-09-06 23:40 ` Keller, Jacob E
2012-09-07 5:51 ` Richard Cochran
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=1347873709-2190-5-git-send-email-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=davem@davemloft.net \
--cc=gospo@redhat.com \
--cc=matthew.vick@intel.com \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=sassmann@redhat.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;
as well as URLs for NNTP newsgroup(s).