]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
ixgbe: prevent ptp_rx_hang from running when in FILTER_ALL mode
authorJacob Keller <jacob.e.keller@intel.com>
Mon, 29 Jan 2018 23:57:48 +0000 (15:57 -0800)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 27 Aug 2018 14:40:05 +0000 (16:40 +0200)
BugLink: http://bugs.launchpad.net/bugs/1786352
[ Upstream commit 6704a3abf4cf4181a1ee64f5db4969347b88ca1d ]

On hardware which supports timestamping all packets, the timestamps are
recorded in the packet buffer, and the driver no longer uses or reads
the registers. This makes the logic for checking and clearing Rx
timestamp hangs meaningless.

If we run the ixgbe_ptp_rx_hang() function in this case, then the driver
will continuously spam the log output with "Clearing Rx timestamp hang".
These messages are spurious, and confusing to end users.

The original code in commit a9763f3cb54c ("ixgbe: Update PTP to support
X550EM_x devices", 2015-12-03) did have a flag PTP_RX_TIMESTAMP_IN_REGISTER
which was intended to be used to avoid the Rx timestamp hang check,
however it did not actually check the flag before calling the function.

Do so now in order to stop the checks and prevent the spurious log
messages.

Fixes: a9763f3cb54c ("ixgbe: Update PTP to support X550EM_x devices", 2015-12-03)
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c

index e1326c0603afee97b1144a8dab3b941050e5dffc..f249f242fd7dc63307d85696203c7fd8ca974a4d 100644 (file)
@@ -7794,7 +7794,8 @@ static void ixgbe_service_task(struct work_struct *work)
 
        if (test_bit(__IXGBE_PTP_RUNNING, &adapter->state)) {
                ixgbe_ptp_overflow_check(adapter);
-               ixgbe_ptp_rx_hang(adapter);
+               if (adapter->flags & IXGBE_FLAG_RX_HWTSTAMP_IN_REGISTER)
+                       ixgbe_ptp_rx_hang(adapter);
                ixgbe_ptp_tx_hang(adapter);
        }