amd-xgbe: Use the proper register during PTP initialization
authorLendacky, Thomas <Thomas.Lendacky@amd.com>
Wed, 28 Jun 2017 18:41:49 +0000 (13:41 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 29 Jun 2017 19:14:16 +0000 (15:14 -0400)
During PTP initialization, the Timestamp Control register should be
cleared and not the Tx Configuration register.  While this typo causes
the wrong register to be cleared, the default value of each register and
and the fact that the Tx Configuration register is programmed afterwards
doesn't result in a bug, hence only fixing in net-next.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amd/xgbe/xgbe-ptp.c

index a533a6cc2d530258c3875150565d35aa6fa55fc5..d06d260cf1e28ba32953c0ab9d92fa0ad819fd5a 100644 (file)
@@ -267,7 +267,7 @@ void xgbe_ptp_register(struct xgbe_prv_data *pdata)
                         ktime_to_ns(ktime_get_real()));
 
        /* Disable all timestamping to start */
-       XGMAC_IOWRITE(pdata, MAC_TCR, 0);
+       XGMAC_IOWRITE(pdata, MAC_TSCR, 0);
        pdata->tstamp_config.tx_type = HWTSTAMP_TX_OFF;
        pdata->tstamp_config.rx_filter = HWTSTAMP_FILTER_NONE;
 }