From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793967030; b=5E4xLQAjxJpKiOG+5EDBxCCPhxMjEkAvVV2KozpGa1fttAgLOsqluNdjkQkIR9k+eCWS GZkyWNoU5M+TDP5vZqb1eKp3s0nwSBdiC8wP9RO2pnF9fIMPboLTn7wpv72HDtIzIlez3 D714i9gZspgx6wpi6SJGS5zURVB2mlE4LqG5Dl1J7JBszMIuJLitIcsXrUGMiQ8jH6i2H Q4CMjakiDn1ldyjpyGiMTgqAuvcWME+5p5+jmSVLHR8JC0HeGUlB/Y0sv0n357Nql1b6I /Z5qbs4M/fTFxCZlCQZa78llfAFBmIUr6UgRtb1CVHzTRo8MrldhjcBjCfkdHmKzjxg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793967030; h=DMARC-Filter:DKIM-Signature:Received:X-MC-Unique: X-Mimecast-MFC-AGG-ID:Received:Received:From:To:Cc:Subject:Date: Message-ID:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-Scanned-By; bh=f4YoYCSVK4gZhUunSADNV3O618EXpW3G+wBkhi6O/wU=; b=t66jwwWO9j+FVj15MQzIk7fnobtxe+kaRCqwEiezWdXro8/d6OLxmA3rd4XclvR2isAt CcZuc+wOJxCxBMiBH4EVv0rCkW3YJcmuxMrVcvvvCsjhX95QPEsOd4NC/SekCFFjj6E+B RUouJG2A5/MsAjDvheQ+gPlEiwvEHvZzqDSJBW7Rphmed5mHJmNXmjrEd8qE0eVYl7l7q VzM/hcA32phHSFqbycges4cOCFZYY5oUNAXmEYq4FvNqLlAu1/XmC7id5EEEEHvsmQdMk O+Qhnj8fNb5ZPCUeFiqG4eb2l629zQ22Tu8mAdSaiiORVDZu5WhEzc1oxIuyoJxnssw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Xzs0prAn; arc=none smtp.remote-ip=170.10.133.124 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 842C5606A329 for ; Fri, 6 Nov 2026 12:10:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 842C5606A329 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Xzs0prAn DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1793967028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=f4YoYCSVK4gZhUunSADNV3O618EXpW3G+wBkhi6O/wU=; b=Xzs0prAn733TVwUlZcRqQm/i+LK2yT9PCdF2EkQ+rOuimBmG1DqhcWUkdEOu0NYMfq2Bxi AHwsXH93RVS11mkGjZ7Sk3hj9MeoPrSXcD+CsutVB0iEdGFqemXQjm7DVdtU7Xb2qjLpDU tnq6E7yQBrjOGv4EbOyoa0QHLS9oAZU= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-44-TerawikSOku60RoOmgG7pA-1; Fri, 06 Nov 2026 07:10:23 -0500 X-MC-Unique: TerawikSOku60RoOmgG7pA-1 X-Mimecast-MFC-AGG-ID: TerawikSOku60RoOmgG7pA_1793967020 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6ADE91956057; Fri, 6 Nov 2026 12:10:20 +0000 (UTC) Received: from ivecera-thinkpadp16vgen1.tpbc.csb (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2711318001CA; Fri, 6 Nov 2026 12:10:13 +0000 (UTC) From: Ivan Vecera To: netdev@vger.kernel.org Cc: Vadim Fedorenko , Arkadiusz Kubalewski , Jiri Pirko , Jonathan Corbet , Shuah Khan , Randy Dunlap , Min Li , Tony Nguyen , Przemek Kitszel , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, intel-wired-lan@lists.osuosl.org, Grzegorz Nitka , Karol Kolacinski , Saeed Mahameed , Tariq Toukan , Petr Oros Subject: [PATCH net-next 01/10] ice: dpll: notify TSPLL lock status from the periodic work only Date: Fri, 6 Nov 2026 13:09:56 +0100 Message-ID: <20261106121005.1327603-2-ivecera@redhat.com> In-Reply-To: <20261106121005.1327603-1-ivecera@redhat.com> References: <20261106121005.1327603-1-ivecera@redhat.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 ice_dpll_tspll_state_on_dpll_set() notifies the TSPLL device from a callback of the TIME_REF pin. This pin belongs to an external DPLL and the DPLL core is going to run its callbacks under a lock of the pin's owner, which does not cover the TSPLL device. Only update dpll_state in the callback, so a device get reports the new state right away, and leave prev_dpll_state to ice_dpll_periodic_work_e825(), which then sends the notification. It now arrives up to 500 ms later and after the reply to the request. Refresh dpll_state on every run of the work, as the state written by the callback can be transient and the lock status can return to prev_dpll_state before the next run. No notification is sent in this case. Signed-off-by: Ivan Vecera --- drivers/net/ethernet/intel/ice/ice_dpll.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/ice_dpll.c b/drivers/net/ethernet/intel/ice/ice_dpll.c index ade1fb3dd06743..bdbcf7af296eb4 100644 --- a/drivers/net/ethernet/intel/ice/ice_dpll.c +++ b/drivers/net/ethernet/intel/ice/ice_dpll.c @@ -2914,7 +2914,6 @@ ice_dpll_tspll_state_on_dpll_set(const struct dpll_pin *pin, void *pin_priv, struct ice_dpll_pin *p = pin_priv; struct ice_pf *pf = p->pf; enum ice_clk_src clk_src; - bool changed = false; struct ice_dpll *tp; int ret; @@ -2947,15 +2946,12 @@ ice_dpll_tspll_state_on_dpll_set(const struct dpll_pin *pin, void *pin_priv, WRITE_ONCE(pf->ptp.tspll_locked, new_state == DPLL_LOCK_STATUS_LOCKED); - if (tp->prev_dpll_state != new_state) { - tp->dpll_state = new_state; - tp->prev_dpll_state = new_state; - changed = true; - } + /* ice_dpll_periodic_work_e825() compares the state with + * prev_dpll_state and sends the notification. + */ + tp->dpll_state = new_state; } mutex_unlock(&pf->dplls.lock); - if (changed) - __dpll_device_change_ntf(tp->dpll); /* TSPLL reconfiguration may complete before lock is reacquired. * PTP periodic monitoring tracks and restores the final lock state. */ @@ -3372,8 +3368,8 @@ static void ice_dpll_periodic_work_e825(struct ice_pf *pf) mutex_lock(&pf->dplls.lock); new_state = ice_dpll_tspll_lock_status_get(pf, true); + tp->dpll_state = new_state; if (tp->prev_dpll_state != new_state) { - tp->dpll_state = new_state; tp->prev_dpll_state = new_state; changed = true; } -- 2.56.0