aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel
diff options
context:
space:
mode:
authorMatthew Vick <matthew.vick@intel.com>2012-08-10 01:40:46 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2012-09-17 05:04:20 -0400
commit201987e3d03fadf0d87980981b7421198e3e5922 (patch)
tree4946aedac484ae3b6c2ac79f100fe61f9b9f3023 /drivers/net/ethernet/intel
parenta9188028fd8a446413be48e7f6490f2d18a8d07e (diff)
igb: Store the MAC address in the name in the PTP struct.
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>
Diffstat (limited to 'drivers/net/ethernet/intel')
-rw-r--r--drivers/net/ethernet/intel/igb/igb_ptp.c7
1 files 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 34e0d698cbb4..e69555f1f73e 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,
547void igb_ptp_init(struct igb_adapter *adapter) 547void igb_ptp_init(struct igb_adapter *adapter)
548{ 548{
549 struct e1000_hw *hw = &adapter->hw; 549 struct e1000_hw *hw = &adapter->hw;
550 struct net_device *netdev = adapter->netdev;
550 551
551 switch (hw->mac.type) { 552 switch (hw->mac.type) {
552 case e1000_i210: 553 case e1000_i210:
553 case e1000_i211: 554 case e1000_i211:
554 case e1000_i350: 555 case e1000_i350:
555 case e1000_82580: 556 case e1000_82580:
557 snprintf(adapter->ptp_caps.name, 16, "%pm", netdev->dev_addr);
556 adapter->ptp_caps.owner = THIS_MODULE; 558 adapter->ptp_caps.owner = THIS_MODULE;
557 strcpy(adapter->ptp_caps.name, "igb-82580");
558 adapter->ptp_caps.max_adj = 62499999; 559 adapter->ptp_caps.max_adj = 62499999;
559 adapter->ptp_caps.n_ext_ts = 0; 560 adapter->ptp_caps.n_ext_ts = 0;
560 adapter->ptp_caps.pps = 0; 561 adapter->ptp_caps.pps = 0;
@@ -570,10 +571,9 @@ void igb_ptp_init(struct igb_adapter *adapter)
570 /* Enable the timer functions by clearing bit 31. */ 571 /* Enable the timer functions by clearing bit 31. */
571 wr32(E1000_TSAUXC, 0x0); 572 wr32(E1000_TSAUXC, 0x0);
572 break; 573 break;
573
574 case e1000_82576: 574 case e1000_82576:
575 snprintf(adapter->ptp_caps.name, 16, "%pm", netdev->dev_addr);
575 adapter->ptp_caps.owner = THIS_MODULE; 576 adapter->ptp_caps.owner = THIS_MODULE;
576 strcpy(adapter->ptp_caps.name, "igb-82576");
577 adapter->ptp_caps.max_adj = 1000000000; 577 adapter->ptp_caps.max_adj = 1000000000;
578 adapter->ptp_caps.n_ext_ts = 0; 578 adapter->ptp_caps.n_ext_ts = 0;
579 adapter->ptp_caps.pps = 0; 579 adapter->ptp_caps.pps = 0;
@@ -589,7 +589,6 @@ void igb_ptp_init(struct igb_adapter *adapter)
589 /* Dial the nominal frequency. */ 589 /* Dial the nominal frequency. */
590 wr32(E1000_TIMINCA, INCPERIOD_82576 | INCVALUE_82576); 590 wr32(E1000_TIMINCA, INCPERIOD_82576 | INCVALUE_82576);
591 break; 591 break;
592
593 default: 592 default:
594 adapter->ptp_clock = NULL; 593 adapter->ptp_clock = NULL;
595 return; 594 return;