From patchwork Mon Jul 1 18:28:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Semin X-Patchwork-Id: 13718538 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 60031C3065A for ; Mon, 1 Jul 2024 18:30:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=xwdWmsxJGte/AlXrge1uNMnv/5k0a7uNzExpSpmyGFM=; b=HB6aQ8zEzspSb+UXe6Pv5bttpP 0WW1032KqVRi+VdJaMRZTcMYo+NDZ1Iv8W0J65B0LY8gV0dlZ5TRssvnafXnrMj3UXy3Ze0n8N5Xy vBjBnyB9RHo7BZblsgMUnL56eFobe3w4wgpPBvAM89yi6wsi3nbyIR0i4717kmnc76qiJDloVan/V Fadq7npVHJML0tApHwE4LS4h0bFnGro1aHMDCReVYRdGh43UKx9MOU9dA0a0JB7v0HPBfkEJf36As o2Bm92nwSJJDedEbpPfu/Wl3wqfLfwjyxvuyecrovYwNwUqTDyyGUVbBUwU/kyDgJPMpHmVpruWzy nZC9Dudw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOLmj-00000004S1F-2Zsc; Mon, 01 Jul 2024 18:29:53 +0000 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOLmX-00000004Rvc-3iF6 for linux-arm-kernel@lists.infradead.org; Mon, 01 Jul 2024 18:29:43 +0000 Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-52e8037f8a5so2963393e87.1 for ; Mon, 01 Jul 2024 11:29:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719858580; x=1720463380; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xwdWmsxJGte/AlXrge1uNMnv/5k0a7uNzExpSpmyGFM=; b=WFR8dcEibFXM8JjorwOoiQe9BtuNgzm0pRVciFhBPsbl61tXtAsVikV22p0lpW/uwb K2U7Pwe2ABaybXYZSoEwBBYG+J0xKN6ndT0txEqkD36FYF1dvRXICwkN+z/vJknKfDXV jHa9vH9Bpd7w7aGXs97WNsTHznYHBkePLA+6RDd1FLrenA2qImwliSTvhB022YOpLB28 NVhiJUYtekNjlYLbLy/Z8abSz/dCugwO7ssiVqOIToKqBmHBywlM8ux+MOwwZg2pizHg wHQf3FXB1LE/AyqKNCEvy6bX5fwZs87h2OKGGww+lWGCnORVn5xEq06ouOr0oJS5tM4q MQjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719858580; x=1720463380; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xwdWmsxJGte/AlXrge1uNMnv/5k0a7uNzExpSpmyGFM=; b=MV36Xi/cKj42141Mn7CxKUaHKr3WAjDyGyMdhjf+zDjTBDaDaFsM+dA6L97eC3hREn DknD1flLXkNQ2K/y+fl7vkdKcTdoG8e/OVduSPn3zF4OBgBvm3RYkiPdHqXcjkzAQsfQ /ZY6bumykrdju+bP6+pv4MHdJ1eLWXgLrrdS2TOkDOz6wdtYUJa6Ar7BeCKm/Jr7w37N 5ewmKRNPtTrGmYsMD4C7wT8/us8BCfomyBbmo+OWZ0rmiBY46rqJdWk/kXIrY8L7qx0C F+hkZwAsY70AhmTOp68m7kebzUmSfCEFqmcsh0BoyQnL1ztt+x/be6Tx14/Se/8+E0wE +JLQ== X-Forwarded-Encrypted: i=1; AJvYcCU0phhI6ImV+2QiAo92Wy53kyR+fMC+qG9QGJOZKZxNoQfNvtQtdCDQ38glw7T0BSMqa5D4J8mEIlbOBOIl57T0JiZANQoQcXjxcRIAZl2zKwCMpmo= X-Gm-Message-State: AOJu0Yza3KX2CeO2P4FwtejLY/OncLcklji8/Ic7U/ClKrBbqnmQ0Iui SsTfUPrYfLSzDe9gPKPVRWX5uJ3dOCjfKO4U7rRoaz+fTpH8co0x X-Google-Smtp-Source: AGHT+IH+usFmi8nGYGVjZyOBQShUQKaabnrIDbcVrIFuwz1DdhjycdrfBHNvunLB3ek66/m3uuGVJQ== X-Received: by 2002:a05:6512:1382:b0:52c:9942:b008 with SMTP id 2adb3069b0e04-52e8264deabmr5418718e87.2.1719858579638; Mon, 01 Jul 2024 11:29:39 -0700 (PDT) Received: from localhost ([178.176.56.174]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52e7ab27b14sm1532619e87.125.2024.07.01.11.29.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jul 2024 11:29:38 -0700 (PDT) From: Serge Semin To: Andrew Lunn , Heiner Kallweit , Russell King , Alexandre Torgue , Jose Abreu , Jose Abreu , Vladimir Oltean , Florian Fainelli , Maxime Chevallier , Rob Herring , Krzysztof Kozlowski , Conor Dooley , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin Cc: Serge Semin , Sagar Cheluvegowda , Abhishek Chauhan , Andrew Halaney , Jiawen Wu , Mengyuan Lou , Tomer Maimon , openbmc@lists.ozlabs.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH net-next v4 09/10] net: stmmac: Create DW XPCS device with particular address Date: Mon, 1 Jul 2024 21:28:40 +0300 Message-ID: <20240701182900.13402-10-fancer.lancer@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240701182900.13402-1-fancer.lancer@gmail.com> References: <20240701182900.13402-1-fancer.lancer@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240701_112941_954598_AD74C858 X-CRM114-Status: GOOD ( 20.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Currently the only STMMAC platform driver using the DW XPCS code is the Intel mGBE device driver. (It can be determined by finding all the drivers having the stmmac_mdio_bus_data::has_xpcs flag set.) At the same time the low-level platform driver masks out the DW XPCS MDIO-address from being auto-detected as PHY by the MDIO subsystem core. Seeing the PCS MDIO ID is known the procedure of the DW XPCS device creation can be simplified by dropping the loop over all the MDIO IDs. From now the DW XPCS device descriptor will be created for the MDIO-bus address pre-defined by the platform drivers via the stmmac_mdio_bus_data::pcs_mask field. Note besides this shall speed up a bit the Intel mGBE probing. Signed-off-by: Serge Semin --- Changelog v2: - This is a new patch introduced on v2 stage of the review. Changelog v3: - Convert the stmmac_mdio_bus_data::has_xpcs and stmmac_mdio_bus_data::xpcs_addr fields to a single stmmac_mdio_bus_data::pcs_mask. --- .../net/ethernet/stmicro/stmmac/dwmac-intel.c | 2 +- .../net/ethernet/stmicro/stmmac/stmmac_mdio.c | 19 ++++++------------- include/linux/stmmac.h | 2 +- 3 files changed, 8 insertions(+), 15 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c index 094d34c4193c..2dbfbca606af 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c @@ -595,7 +595,7 @@ static int intel_mgbe_common_data(struct pci_dev *pdev, /* Intel mgbe SGMII interface uses pcs-xcps */ if (plat->phy_interface == PHY_INTERFACE_MODE_SGMII || plat->phy_interface == PHY_INTERFACE_MODE_1000BASEX) { - plat->mdio_bus_data->has_xpcs = true; + plat->mdio_bus_data->pcs_mask = BIT(INTEL_MGBE_XPCS_ADDR); plat->mdio_bus_data->default_an_inband = true; plat->select_pcs = intel_mgbe_select_pcs; } diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c index aa43117134d3..74de6ec00bbf 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c @@ -499,8 +499,7 @@ int stmmac_pcs_setup(struct net_device *ndev) { struct dw_xpcs *xpcs = NULL; struct stmmac_priv *priv; - int ret = -ENODEV; - int mode, addr; + int addr, mode, ret; priv = netdev_priv(ndev); mode = priv->plat->phy_interface; @@ -508,16 +507,10 @@ int stmmac_pcs_setup(struct net_device *ndev) if (priv->plat->pcs_init) { ret = priv->plat->pcs_init(priv); } else if (priv->plat->mdio_bus_data && - priv->plat->mdio_bus_data->has_xpcs) { - /* Try to probe the XPCS by scanning all addresses */ - for (addr = 0; addr < PHY_MAX_ADDR; addr++) { - xpcs = xpcs_create_mdiodev(priv->mii, addr, mode); - if (IS_ERR(xpcs)) - continue; - - ret = 0; - break; - } + priv->plat->mdio_bus_data->pcs_mask) { + addr = ffs(priv->plat->mdio_bus_data->pcs_mask) - 1; + xpcs = xpcs_create_mdiodev(priv->mii, addr, mode); + ret = PTR_ERR_OR_ZERO(xpcs); } else { return 0; } @@ -610,7 +603,7 @@ int stmmac_mdio_register(struct net_device *ndev) snprintf(new_bus->id, MII_BUS_ID_SIZE, "%s-%x", new_bus->name, priv->plat->bus_id); new_bus->priv = ndev; - new_bus->phy_mask = mdio_bus_data->phy_mask; + new_bus->phy_mask = mdio_bus_data->phy_mask | mdio_bus_data->pcs_mask; new_bus->parent = priv->device; err = of_mdiobus_register(new_bus, mdio_node); diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index 9c54f82901a1..84e13bd5df28 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h @@ -82,7 +82,7 @@ struct stmmac_priv; struct stmmac_mdio_bus_data { unsigned int phy_mask; - unsigned int has_xpcs; + unsigned int pcs_mask; unsigned int default_an_inband; int *irqs; int probed_phy_irq; From patchwork Mon Jul 1 18:28:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Semin X-Patchwork-Id: 13718539 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6B930C3065B for ; Mon, 1 Jul 2024 18:30:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wGa0V/+q1PY+8AtdQff4+HTCc2sbpBqj/v0lwdLsGCU=; b=q9Ir7OU6Az6xghB2KJSgHttFGY Pf7RN9i7WCVl2SZ4jryUWT5+IKnyA0R2qStmgSxTxRNgjdcG5y1X92KioEOrJjeAEJMFDXE32OZ6c aM/ZAh4X/1bdngOQ2BZM/GrCC2q5CGBiKuPNxGCrZoBLAneyqX+a6xpz0ZLjWia0FnBeHXivaQE5T bMCa3Nlag1oA8uyW2FeCPUMIXG5HwDhtOpM50zinX9IBc6CWFk+71aNYmST6e9NGmDqOnK3y2C3TR t4vNZ+qiTn1wHyF9wD6wlMJzQu+lVAj7b7arTLudntMRVxFIiSnsKPR9dL7NXiuT3hPAK6GZ4Hwpa BUpVFYqw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOLmr-00000004S4T-3JR7; Mon, 01 Jul 2024 18:30:01 +0000 Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOLma-00000004Rwn-0XAN for linux-arm-kernel@lists.infradead.org; Mon, 01 Jul 2024 18:29:45 +0000 Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2ec1ac1aed2so39164601fa.3 for ; Mon, 01 Jul 2024 11:29:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719858582; x=1720463382; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wGa0V/+q1PY+8AtdQff4+HTCc2sbpBqj/v0lwdLsGCU=; b=QU1MjHK7HFyXXsLecD6ueGwq4guVlVAZyKPrYufNaQy0QnbLS5nbWAOWxK/zRtu+mA Ym883fD4j1vozWy/t0wv6NAJV2bguggh2rdTS0U0wguAybbZCtKkJzoK1lksbJD3Ef5g R7I0nY5kYmfv5+Q0jNWLILOetw3J9A3KzRdwv4P4O8MftaiRdVURZXN/FvyNH9cMie/f 9MHogWiQTY+XDWZS3cN60YUAH+6Nt5mBZRwJjHpAlvLMLfpO1BjskCyYolK/UPp+ioFs rKxScdhtWcrlc5G1UJo4iZlrHjnwTn/py/q8pCteUNPHm+3sw0Fo8Rh0QJiWGkBQl1u+ Dr9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719858582; x=1720463382; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wGa0V/+q1PY+8AtdQff4+HTCc2sbpBqj/v0lwdLsGCU=; b=loN2aEwDLJepBJA7p8LUgz3EOi71oujQYIa8P2CLCp0EUg4CsJHuDLuBYlhfClr/xx +pzzBSfDZ0SBxVUPwD2cHpUAL5MXgHUvhUSgiNN+WTlbHtv/4P2wyB4uadQiLlzb8QIz IBGtSog7vRfyFtfuIT8+mqUsy/ZoN8R3jvwl7y501A2FJBa1m9oyNX94Etv/QgyMJXjS mQZDQxJf2TZBownnav40I1+zzV9cWPsqJvrrPOOYe/SD2bF0G2z2NAd+dgXZpnViWBQb Y0a+1kzLA5QDKJ9sO23Yd/hHA5XE9/XOpd/e8vbjraBQN8aVYEMuEFEoevFNhw1AoCIL YSCQ== X-Forwarded-Encrypted: i=1; AJvYcCVcdxjVFCIqg/IFj+skUcjpINiBK79u7vh5dqq1clCNw24kY/IqQkELDZUFs7zOU7qir/6UFzyX/MC1WSntc8H82x+0FZWdLjbPkHJBwqQ9MaA5fZ8= X-Gm-Message-State: AOJu0Yy7wwsLgIAbaQ23prO/2RYZDQOVdpzKvTHTJHLzlpQkoupzLqnn 9EZql9Bqis8ysKT7xbTDNBDHowFnsLSrniagWGLAXqlsQBZ9RoWg X-Google-Smtp-Source: AGHT+IFXnUFdgrXA1uR1LN5UmTAA18az9EpTs+N0Pv9356JIFI06IvJbJFQAahcrWN6Else101zSvA== X-Received: by 2002:a2e:b535:0:b0:2ec:4eca:748b with SMTP id 38308e7fff4ca-2ee5e39260amr38054481fa.14.1719858582315; Mon, 01 Jul 2024 11:29:42 -0700 (PDT) Received: from localhost ([178.176.56.174]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2ee5168d0c2sm14452161fa.124.2024.07.01.11.29.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jul 2024 11:29:41 -0700 (PDT) From: Serge Semin To: Andrew Lunn , Heiner Kallweit , Russell King , Alexandre Torgue , Jose Abreu , Jose Abreu , Vladimir Oltean , Florian Fainelli , Maxime Chevallier , Rob Herring , Krzysztof Kozlowski , Conor Dooley , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin Cc: Serge Semin , Sagar Cheluvegowda , Abhishek Chauhan , Andrew Halaney , Jiawen Wu , Mengyuan Lou , Tomer Maimon , openbmc@lists.ozlabs.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH net-next v4 10/10] net: stmmac: Add DW XPCS specified via "pcs-handle" support Date: Mon, 1 Jul 2024 21:28:41 +0300 Message-ID: <20240701182900.13402-11-fancer.lancer@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240701182900.13402-1-fancer.lancer@gmail.com> References: <20240701182900.13402-1-fancer.lancer@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240701_112944_191156_F1C4AAAA X-CRM114-Status: GOOD ( 16.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Recently the DW XPCS DT-bindings have been introduced and the DW XPCS driver has been altered to support the DW XPCS registered as a platform device. In order to have the DW XPCS DT-device accessed from the STMMAC driver let's alter the STMMAC PCS-setup procedure to support the "pcs-handle" property containing the phandle reference to the DW XPCS device DT-node. The respective fwnode will be then passed to the xpcs_create_fwnode() function which in its turn will create the DW XPCS descriptor utilized in the main driver for the PCS-related setups. Signed-off-by: Serge Semin --- drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c index 74de6ec00bbf..03f90676b3ad 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c @@ -497,15 +497,22 @@ int stmmac_mdio_reset(struct mii_bus *bus) int stmmac_pcs_setup(struct net_device *ndev) { + struct fwnode_handle *devnode, *pcsnode; struct dw_xpcs *xpcs = NULL; struct stmmac_priv *priv; int addr, mode, ret; priv = netdev_priv(ndev); mode = priv->plat->phy_interface; + devnode = priv->plat->port_node; if (priv->plat->pcs_init) { ret = priv->plat->pcs_init(priv); + } else if (fwnode_property_present(devnode, "pcs-handle")) { + pcsnode = fwnode_find_reference(devnode, "pcs-handle", 0); + xpcs = xpcs_create_fwnode(pcsnode, mode); + fwnode_handle_put(pcsnode); + ret = PTR_ERR_OR_ZERO(xpcs); } else if (priv->plat->mdio_bus_data && priv->plat->mdio_bus_data->pcs_mask) { addr = ffs(priv->plat->mdio_bus_data->pcs_mask) - 1; @@ -515,10 +522,8 @@ int stmmac_pcs_setup(struct net_device *ndev) return 0; } - if (ret) { - dev_warn(priv->device, "No xPCS found\n"); - return ret; - } + if (ret) + return dev_err_probe(priv->device, ret, "No xPCS found\n"); priv->hw->xpcs = xpcs;