From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796245864; b=zNARbLnTwHBPAr2So7hm3vg/MfcZ+zw7bktKxZIpbr3qlobzs0bmFsSg3qT0Xd/lS/Rl 8P96UEHb0GUzNwWhLuP0Wj+vFrhNjIwhUSG2BnCPxh6pF7JNnyT5nF3Hf8mzRHx3R8+Qo dB80OMGJz0K1K3KvfRCXqCRZAdVaJYaQ7n2YH2cq1Mhhen6nx4rtO7gh9DJjt3peugcFN e+8MTjjyZ+B/wXgZIYj9j3DBrH/KKtXea9x2qsa4TjRCRmyZiW03sUENxHzehY5H6L/tx uGXP/dOOsBnnrvYoKbCMcMmFw03BWhvRP7IAv4uxGKkmiq2SHKAhrFCMWc2HtnRAkFA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796245864; 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=PjlU37s6UkOKJvt201kjTNDDPaxMPL8bUTavyBwZHzA=; b=CxVXWewgleDG50fG1EtVP/yfV8mpheIUwbtPZi6isvsudR3a+vHc+w+VweaLrAqHslkH szX43KXILu/ouXQNHXTlL00jx+UaO08PD1e1myGY+RQdmE/qVNIcKACWO2Yhy2B7jLtnt TeZGX09r/7A2Xs/3k76dooxWDCQcpRqtoo1U04JpYCJMCWyWI+0h37dmx49hztI8Rx7sO cssvxYdVKPBwB22OyUjzqgfjpz/Gi7SfIieMOgPnY4eN9hSQAZ8VmC+R20fE/AzFDMtNF ziFheTZKmh7SzakCYbc+zGGrnnHEF8BiVKge45ywWSEHaPlua1VkC5SpHnt1w0zg8pA== 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=Pzcx2iFA; arc=none smtp.remote-ip=170.10.129.124 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 24405606A684 for ; Wed, 2 Dec 2026 21:11:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 24405606A684 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) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Pzcx2iFA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1796245864; 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=PjlU37s6UkOKJvt201kjTNDDPaxMPL8bUTavyBwZHzA=; b=Pzcx2iFAbLulWfwEEE5r+D++spMC+J4CrYJEWt5M6wPvux+gmmAcRSyGZChlO8/5jyaLIs lAA3XCENodPTKfLpqlOoAe1PtXpNtiIWiSlp6SigvTBIsUp8vJE0CSEF0hEtvDeLwvPQHx ToEhBf/DAzd+GQHgBYSHwWTxbTqC3Bc= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-249-KIrMDujkNKitAHwarqdrIQ-1; Wed, 2 Dec 2026 21:10:59 +0000 X-MC-Unique: KIrMDujkNKitAHwarqdrIQ-1 X-Mimecast-MFC-AGG-ID: KIrMDujkNKitAHwarqdrIQ_1796245857 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4685C185B1B9; Wed, 2 Dec 2026 21:10:57 +0000 (UTC) Received: from poros-thinkpadp16vgen1.tpbc.com (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D5F95B87; Wed, 2 Dec 2026 21:10:53 +0000 (UTC) From: Petr Oros To: netdev@vger.kernel.org Cc: Petr Oros , stable@vger.kernel.org, Tony Nguyen , Przemek Kitszel , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Arkadiusz Kubalewski , Alexander Nowlin , intel-wired-lan@lists.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH net v2 1/2] ice: fix DPLL registration on boards without the SMA clock mux Date: Wed, 2 Dec 2026 22:10:44 +0100 Message-ID: <20261202211046.3007751-2-poros@redhat.com> In-Reply-To: <20261202211046.3007751-1-poros@redhat.com> References: <20261202211046.3007751-1-poros@redhat.com> X-Mailing-List: netdev@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.6 on 10.30.177.95 The SMA and U.FL connectors of an E810-C timing board are routed by a PCA9575 GPIO expander, and ice_dpll_init_info_sw_pins() reaches it through ice_read_sma_ctrl(). On a board that carries a CGU but no such expander the netlist lookup fails with -ENXIO, which aborts ice_dpll_init_info() and with it the whole DPLL registration: ice 0000:cc:00.0: ice_dpll_init_info - fail: d->inputs:... ice 0000:cc:00.0: DPLLs init failure err:-6 Userspace loses the EEC and PPS devices, every CGU pin and the recovered clock pin. The netlist describes the mux with a clock mux node, which ice_init_feature_support() already turns into ICE_F_SMA_CTRL. Key the software controlled pins on that flag. Without the mux the SMA wrappers stay inputs, the state the mux path programs at init anyway, and do not advertise DIRECTION_CAN_CHANGE. The U.FL pins are the other leg of the mux, so they are hidden, and the outgoing CGU pins stay visible as REF-SMA1 and REF-SMA2/U.FL2. The layout is not exotic, the E810_C827_SyncE_SFP_SEC configuration in Intel's 4.80 NVM package has no clock mux node either. Such boards worked until the SMA and U.FL redesign moved the expander access into the DPLL init path. Fixes: 2dd5d03c77e2 ("ice: redesign dpll sma/u.fl pins control") Cc: stable@vger.kernel.org Tested-by: Alexander Nowlin Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Petr Oros --- v2: - repost directly to netdev, no functional change v1: https://lore.kernel.org/all/20260917190258.3239282-2-poros@redhat.com/ --- drivers/net/ethernet/intel/ice/ice_dpll.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/ice_dpll.c b/drivers/net/ethernet/intel/ice/ice_dpll.c index 5148e419f49a07..4410dbd2b231b6 100644 --- a/drivers/net/ethernet/intel/ice/ice_dpll.c +++ b/drivers/net/ethernet/intel/ice/ice_dpll.c @@ -110,6 +110,9 @@ static const struct dpll_pin_frequency ice_esync_range[] = { */ static bool ice_dpll_is_sw_pin(struct ice_pf *pf, u8 index, bool input) { + if (!input && !ice_is_feature_supported(pf, ICE_F_SMA_CTRL)) + return false; + if (input && pf->hw.device_id == ICE_DEV_ID_E810C_QSFP) index -= ICE_DPLL_SW_PIN_INPUT_BASE_QSFP - ICE_DPLL_SW_PIN_INPUT_BASE_SFP; @@ -1216,6 +1219,8 @@ static int ice_dpll_sma_direction_set(struct ice_dpll_pin *p, if (p->direction == direction && p->active) return 0; + if (!ice_is_feature_supported(p->pf, ICE_F_SMA_CTRL)) + return -EOPNOTSUPP; ret = ice_read_sma_ctrl(&p->pf->hw, &data); if (ret) return ret; @@ -4873,9 +4878,14 @@ static int ice_dpll_init_info_sw_pins(struct ice_pf *pf) true, &freq_supp_num); pin->prop.freq_supported_num = freq_supp_num; pin->prop.capabilities = - (DPLL_PIN_CAPABILITIES_DIRECTION_CAN_CHANGE | - DPLL_PIN_CAPABILITIES_PRIORITY_CAN_CHANGE | - caps); + (DPLL_PIN_CAPABILITIES_PRIORITY_CAN_CHANGE | caps); + if (ice_is_feature_supported(pf, ICE_F_SMA_CTRL)) { + pin->prop.capabilities |= + DPLL_PIN_CAPABILITIES_DIRECTION_CAN_CHANGE; + } else { + pin->active = true; + pin->direction = DPLL_PIN_DIRECTION_INPUT; + } pin->pf = pf; pin->prop.board_label = ice_dpll_sw_pin_sma[i]; pin->input = &d->inputs[pin_abs_idx]; @@ -4889,6 +4899,7 @@ static int ice_dpll_init_info_sw_pins(struct ice_pf *pf) pin->idx = i; pin->prop.type = DPLL_PIN_TYPE_EXT; pin->prop.capabilities = caps; + pin->hidden = !ice_is_feature_supported(pf, ICE_F_SMA_CTRL); pin->pf = pf; pin->prop.board_label = ice_dpll_sw_pin_ufl[i]; if (i == ICE_DPLL_PIN_SW_1_IDX) { @@ -4918,6 +4929,9 @@ static int ice_dpll_init_info_sw_pins(struct ice_pf *pf) ice_dpll_phase_range_set(&pin->prop.phase_range, phase_adj_max); } + if (!ice_is_feature_supported(pf, ICE_F_SMA_CTRL)) + return 0; + /* Initialize the SMA control register to a known-good default state. * Without this write the PCA9575 GPIO expander retains its power-on * default (all outputs high) which makes all SW pins appear inactive. -- 2.56.1