From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 89B8E3446B7; Mon, 20 Apr 2026 15:50:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776700248; cv=none; b=JFqKqfCFuqebifEVW1cm3xYbkzhUJZuOiqPIl0ypCJanFQsgjimPZiuB6w1sRMDhR5P92h4ergZUw7F3ns2VToleXt3hmQKaQEys7UCIW+nwEZSe4kgVexo3uEkpSOr/9LJl7awTonAzp2fEw+S/pItzeCkFpUQv3ILWZnVDWHc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776700248; c=relaxed/simple; bh=j09I7Q4VOmB/U3ZyWvvK+S1al5s+QLwyQUG2LHAIQoM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tW2CgOYvMeNsDAt78L4ZJwWw1gcFZhLYNUymOC4NiW70AXQ0o7tHeJsm5e/UrC1VpANo93ixUwr+MSmpYO3W5yF5gfaA6pCATKBOWcvPQFh7u243SQcg5W1OjWVDsqZyqSKnKGRNdXUvfOxeBFk7uNg1WJRfNUZo2/2hrlLpnA0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=xHAlMghA; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="xHAlMghA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 203F0C19425; Mon, 20 Apr 2026 15:50:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1776700248; bh=j09I7Q4VOmB/U3ZyWvvK+S1al5s+QLwyQUG2LHAIQoM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xHAlMghATX7A/qLDqL5UzaHxvlOW63hod2uAUuq9eZ+eqMhaLHfPD6ycQ6k78g61S klYUtd3p1m1EnmZSoa+mYODvsV1vtVzEVHQo4Vb8g7kixS72pv8HNiQao94HrIYWui zCEX1/tvGFz+a6cU4ZljkiI1/l5RIz13VRwLTs3I= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Kohei Enju , Aleksandr Loktionov , Tony Nguyen , Sasha Levin Subject: [PATCH 6.19 098/220] ice: ptp: dont WARN when controlling PF is unavailable Date: Mon, 20 Apr 2026 17:40:39 +0200 Message-ID: <20260420153937.562523716@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260420153934.013228280@linuxfoundation.org> References: <20260420153934.013228280@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Kohei Enju [ Upstream commit bb3f21edc7056cdf44a7f7bd7ba65af40741838c ] In VFIO passthrough setups, it is possible to pass through only a PF which doesn't own the source timer. In that case the PTP controlling PF (adapter->ctrl_pf) is never initialized in the VM, so ice_get_ctrl_ptp() returns NULL and triggers WARN_ON() in ice_ptp_setup_pf(). Since this is an expected behavior in that configuration, replace WARN_ON() with an informational message and return -EOPNOTSUPP. Fixes: e800654e85b5 ("ice: Use ice_adapter for PTP shared data instead of auxdev") Signed-off-by: Kohei Enju Reviewed-by: Aleksandr Loktionov Signed-off-by: Tony Nguyen Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/ice/ice_ptp.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.c b/drivers/net/ethernet/intel/ice/ice_ptp.c index 2726830014762..082313023024c 100644 --- a/drivers/net/ethernet/intel/ice/ice_ptp.c +++ b/drivers/net/ethernet/intel/ice/ice_ptp.c @@ -3048,7 +3048,13 @@ static int ice_ptp_setup_pf(struct ice_pf *pf) struct ice_ptp *ctrl_ptp = ice_get_ctrl_ptp(pf); struct ice_ptp *ptp = &pf->ptp; - if (WARN_ON(!ctrl_ptp) || pf->hw.mac_type == ICE_MAC_UNKNOWN) + if (!ctrl_ptp) { + dev_info(ice_pf_to_dev(pf), + "PTP unavailable: no controlling PF\n"); + return -EOPNOTSUPP; + } + + if (pf->hw.mac_type == ICE_MAC_UNKNOWN) return -ENODEV; INIT_LIST_HEAD(&ptp->port.list_node); -- 2.53.0