| .. | .. |
|---|
| 1262 | 1262 | return; |
|---|
| 1263 | 1263 | } |
|---|
| 1264 | 1264 | |
|---|
| 1265 | | - spin_lock_init(&adapter->tmreg_lock); |
|---|
| 1266 | | - INIT_WORK(&adapter->ptp_tx_work, igb_ptp_tx_work); |
|---|
| 1267 | | - |
|---|
| 1268 | | - if (adapter->ptp_flags & IGB_PTP_OVERFLOW_CHECK) |
|---|
| 1269 | | - INIT_DELAYED_WORK(&adapter->ptp_overflow_work, |
|---|
| 1270 | | - igb_ptp_overflow_check); |
|---|
| 1271 | | - |
|---|
| 1272 | | - adapter->tstamp_config.rx_filter = HWTSTAMP_FILTER_NONE; |
|---|
| 1273 | | - adapter->tstamp_config.tx_type = HWTSTAMP_TX_OFF; |
|---|
| 1274 | | - |
|---|
| 1275 | | - igb_ptp_reset(adapter); |
|---|
| 1276 | | - |
|---|
| 1277 | 1265 | adapter->ptp_clock = ptp_clock_register(&adapter->ptp_caps, |
|---|
| 1278 | 1266 | &adapter->pdev->dev); |
|---|
| 1279 | 1267 | if (IS_ERR(adapter->ptp_clock)) { |
|---|
| .. | .. |
|---|
| 1283 | 1271 | dev_info(&adapter->pdev->dev, "added PHC on %s\n", |
|---|
| 1284 | 1272 | adapter->netdev->name); |
|---|
| 1285 | 1273 | adapter->ptp_flags |= IGB_PTP_ENABLED; |
|---|
| 1274 | + |
|---|
| 1275 | + spin_lock_init(&adapter->tmreg_lock); |
|---|
| 1276 | + INIT_WORK(&adapter->ptp_tx_work, igb_ptp_tx_work); |
|---|
| 1277 | + |
|---|
| 1278 | + if (adapter->ptp_flags & IGB_PTP_OVERFLOW_CHECK) |
|---|
| 1279 | + INIT_DELAYED_WORK(&adapter->ptp_overflow_work, |
|---|
| 1280 | + igb_ptp_overflow_check); |
|---|
| 1281 | + |
|---|
| 1282 | + adapter->tstamp_config.rx_filter = HWTSTAMP_FILTER_NONE; |
|---|
| 1283 | + adapter->tstamp_config.tx_type = HWTSTAMP_TX_OFF; |
|---|
| 1284 | + |
|---|
| 1285 | + igb_ptp_reset(adapter); |
|---|
| 1286 | 1286 | } |
|---|
| 1287 | 1287 | } |
|---|
| 1288 | 1288 | |
|---|