Subject: Re: [PATCH] igc: Avoid possible deadlock during suspend/resume

From: Vinicius Costa Gomes <[email-masked]>
Date: Fri, 10 Dec 2021 16:41:32 -0800

Hi Stefan,

Stefan Dietrich <[email-masked]> writes:

> Agreed and thanks for the pointers; please see the log files and
> .config attached as requested.
>

Thanks for the logs.

Very interesting that the initialization of the device is fine, so it's
something that happens later.

Can you test the attached patch?

If the patch works, I would also be interested if you notice any loss of
functionality with your NIC. (I wouldn't think so, as far as I know,
i225-V models have PTM support but don't have any PTP support).

>
> Cheers,
> Stefan
>
>
> On Fri, 2021-12-10 at 15:01 +0100, Thorsten Leemhuis wrote:
>> On 10.12.21 14:45, Stefan Dietrich wrote:
>> > thanks for keeping an eye on the issue. I've sent the files in
>> > private
>> > because I did not want to spam the mailing lists with them. Please
>> > let
>> > me know if this is the correct procedure.
>>

Cheers,
-- 
Vinicius

>From bc78a215cd3a68375ec62a05080070876e31d733 Mon Sep 17 00:00:00 2001
From: Vinicius Costa Gomes <[email-masked]>
Date: Fri, 10 Dec 2021 16:23:42 -0800
Subject: [TEST ONLY] igc: Do not enable crosstimestamping for i225-V models

WIP WIP WIP

Signed-off-by: Vinicius Costa Gomes <[email-masked]>
---
 drivers/net/ethernet/intel/igc/igc_ptp.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/igc/igc_ptp.c b/drivers/net/ethernet/intel/igc/igc_ptp.c
index 30568e3544cd..b525035a8a2b 100644
--- a/drivers/net/ethernet/intel/igc/igc_ptp.c
+++ b/drivers/net/ethernet/intel/igc/igc_ptp.c
@@ -768,7 +768,13 @@ int igc_ptp_get_ts_config(struct net_device *netdev, struct ifreq *ifr)
  */
 static bool igc_is_crosststamp_supported(struct igc_adapter *adapter)
 {
-	return IS_ENABLED(CONFIG_X86_TSC) ? pcie_ptm_enabled(adapter->pdev) : false;
+	if (!IS_ENABLED(CONFIG_X86_TSC))
+		return false;
+
+	if (adapter->pdev->device == IGC_DEV_ID_I225_V)
+		return false;
+
+	return pcie_ptm_enabled(adapter->pdev);
 }
 
 static struct system_counterval_t igc_device_tstamp_to_system(u64 tstamp)
-- 
2.33.1