From patchwork Sun Sep 15 19:51:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans-Frieder Vogt X-Patchwork-Id: 13804903 X-Patchwork-Delegate: kuba@kernel.org Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (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 CDBD31CA690 for ; Sun, 15 Sep 2024 19:51:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.20 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726429899; cv=none; b=RRifS8oXzmk4zGUTON+F1i2EY9R6wLgmUxqGXjrwjQk4qYZNbu2RZNmEsKn6M968iI9JL18uNRCmZStzyKS79V9/yrkhWsrksKv1D6jryaZUMe0MLaqmYO5pQjzG3wxexVuHwK13KRGY0OO+PVF0/fwmqCjA23kWPic+ANYxkB0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726429899; c=relaxed/simple; bh=17+oqs+YPZ09Gz/uELJ4TqyCi1fPXYhH5b+1eyfecck=; h=MIME-Version:Message-ID:From:To:Cc:Subject:Content-Type:Date; b=bkisdaEIZubL8mow+NOpDtu9+pAXK1iJxD1lRrG+ZEJo9UZNHwX5waKxJegqT6qbhB4TH34CQKk6IXXPOFt+9TbTSPIpYgcJXkMOOFQngVrWZytrrLiP37Nw5L8lRhAl1ZdDA9/3wq+KAg83X0X7rl2ckFAK9BgFdj7ypggZGB4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net; spf=pass smtp.mailfrom=gmx.net; dkim=pass (2048-bit key) header.d=gmx.net header.i=hfdevel@gmx.net header.b=qsjO/jT/; arc=none smtp.client-ip=212.227.17.20 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=hfdevel@gmx.net header.b="qsjO/jT/" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1726429881; x=1727034681; i=hfdevel@gmx.net; bh=QXH6pChaI3gjNezksD2qXQA8L9JmPM8LZed8pHslnH0=; h=X-UI-Sender-Class:MIME-Version:Message-ID:From:To:Cc:Subject: Content-Type:Date:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=qsjO/jT/pZhVv7fWuM7Y/x+YLDIeo5ix4o8KRQNuJ2wkLCXsS6nUJ+o1YDc1w61C KcMaaIVvKF5yoI9UynRU94MyMLNWpZv/59rG/AkaFteHlacN+nGKspXM5aljqz670 LsryecGM5KRZ6BQIPco58Nk+4V95by7mvTXoI6vHM9vE6AkvbLuggfyPOR4+JrS5C A5TeoNuvJYbQjs9mR4C3pBMZ6YmDYRybQpd6MWOGtrC005UG4DVfL+ruK1LIRdXMW yaURL80bdVUgWR2luw+dJLfNReNT60PSVprWgdftzgdCuBp0rgEwqxZpeel6M04BH ycHyeu71j4i/OVRQFA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [77.33.175.99] ([77.33.175.99]) by web-mail.gmx.net (3c-app-gmx-bap07.server.lan [172.19.172.77]) (via HTTP); Sun, 15 Sep 2024 21:51:21 +0200 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: From: Hans-Frieder Vogt To: netdev@vger.kernel.org Cc: Andrew Lunn , Heiner Kallweit , Russell King , FUJITA Tomonori , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Subject: [PATCH net-dev v2 1/7] net: phy: aquantia: add probe function to aqr105 for firmware loading Date: Sun, 15 Sep 2024 21:51:21 +0200 Importance: normal Sensitivity: Normal X-Priority: 3 X-Provags-ID: V03:K1:tN783VlZ3yoIX0TAe3E0wwwLnEC9iS7PJPz5ucGzCM5XZMjf4nFUVxMjdJokZNfwY4HoF QzeW8foDXbNJKLULc2GfLcQVIfRBkmcv8b2geHsZxApCP7qOzzRCIFFnNf6dcqfsa317i1m3mtCR IJgQCeBU6NuEm1UTUgMHQhGlQ/PJTF1FpIGdCeC09o6HzNlK0V7dDu0BxctWWnJKeMNG/6cVeqQd eKo4NWhUFMOs5Ae2MyvfTRbiHo7t76R5vFtejXZhgn79ou06IMaAlsQbdRwZW4+Dt9G5fgssKVjt +4= X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:PFaOYsi8+ak=;yASKMtlN6uf8Mb0vx7E8zKf/48h bc6yOkIO8gDkwJrukEwaqF++Tud3yxwWsAALEL9hLq8+eqMR9rApuzPY2fcEALCqsGu/Ytu8n thmp1E4k9IMWGIyR7X19CA+Rsf8cTqutfEVWX1E+NSYvRxc9zmDvvW2iihaVET8tGL1/QvlyW tDNrXVPC/kX+dVjdeRgw7wZ1u/Yf0ea7v75N4bDRa9ogWe2RhgWXcyyjcvcgctNv3gxAHtnRH c9zfDswPlgAHanwds8f1bK1EJ059fmvcGMQUKc/wnrmbTjsDaaQ3X9r2C9haRVD2siS19xw2z UrhtfK05uynm1tjIfrRCgRNyDQ3HB2SnY3vZ1H4Iq08gAG/LZ4OOIc5dJYMgLSNOxnDoA5qGx pIHERytc2oGD7MPPFtqoXSM/Nys4Ec81xR5r/H0cQXFc8GeJ0HKxEuU5riIGvuif32Q5MgJAW IlWFXx8oEf5IUkGS3vm8XTA9rXYAOyet0tBDhu6Vk5tkkXcZ0YcLs0yOxRfnPrZdw7+QseSPH bLj+vk3OaeQ5tuEbNE/goMPIgaywIn7tJ58bhjhDvvQ+km43/2BPLBioZuUu55FsuM+9TU7yc J72wVkmyzrgUaiGfT2xdAOHvkez8XEvk5x+skskEN1QER+A4pZ2eI1mR18FcEmqL1em/6iP/a RwNm3nbh3I40GeJNyV6Sj9ZeGUaUTbrmm/eq6kv1uQ== X-Patchwork-Delegate: kuba@kernel.org Re-use the AQR107 probe function to load the firmware on the AQR105 (and to probe the HWMON). Signed-off-by: Hans-Frieder Vogt Reviewed-by: Andrew Lunn --- drivers/net/phy/aquantia/aquantia_main.c | 1 + 1 file changed, 1 insertion(+) -- 2.45.2 diff --git a/drivers/net/phy/aquantia/aquantia_main.c b/drivers/net/phy/aquantia/aquantia_main.c index e982e9ce44a5..54dab6db85f2 100644 --- a/drivers/net/phy/aquantia/aquantia_main.c +++ b/drivers/net/phy/aquantia/aquantia_main.c @@ -787,6 +787,7 @@ static struct phy_driver aqr_driver[] = { { PHY_ID_MATCH_MODEL(PHY_ID_AQR105), .name = "Aquantia AQR105", + .probe = aqr107_probe, .config_aneg = aqr_config_aneg, .config_intr = aqr_config_intr, .handle_interrupt = aqr_handle_interrupt, From patchwork Sun Sep 15 19:55:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans-Frieder Vogt X-Patchwork-Id: 13804904 X-Patchwork-Delegate: kuba@kernel.org Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (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 AF3A21805A for ; Sun, 15 Sep 2024 19:55:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.20 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726430121; cv=none; b=JmddcamLSu6lCqsrcd/2iJ7ycilC3C9U+bLxvxeN54i737cl4g1neg3p1GvVBpcJRVBLJWT828xVXoZxZtNKHdrydjCO+mepQ2Rtn0jtIzotUmbzFalQYxue2fCUl4/O1DF/33RmVkjUaipprASLA3nNg6ZF0lIHijyfwCfP6fA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726430121; c=relaxed/simple; bh=ovKeA4iC4KuIlxDyWHk+CmDKrbr+mt6Z6DdmxyG7fF0=; h=MIME-Version:Message-ID:From:To:Cc:Subject:Content-Type:Date; b=UYhgXjDuBVOPPfLytXLK+wfDFiesFUFSllrSGMexi4l3E//z0MSs/pMa+i0xigU9HZgVucMv++ckEFZLb1xfR90OrzmTO+MwUtHWRgg6Ah4AQO+5Mcp1M7kgWpyQMCSYyuGxk4ZwjsXQVXe3m2P+80BI5yPXMgvRLHWB6cRwcrY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net; spf=pass smtp.mailfrom=gmx.net; dkim=pass (2048-bit key) header.d=gmx.net header.i=hfdevel@gmx.net header.b=PYWU5SEW; arc=none smtp.client-ip=212.227.17.20 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=hfdevel@gmx.net header.b="PYWU5SEW" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1726430104; x=1727034904; i=hfdevel@gmx.net; bh=Bup10WnCsUPGHan/4YMoaWd6Gle1dPigR/QxnG6jWIk=; h=X-UI-Sender-Class:MIME-Version:Message-ID:From:To:Cc:Subject: Content-Type:Date:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=PYWU5SEWfr3jyvv8UHiGRYDh1Kkx8pYzhZiJ36tR7k61Nd8wR6ndbyUOhPXAYbDc JScgKPbV+wsEcxyWM8UVYxGBpCZuVHSOMwnVcp4Yl6mHeL7nNBLTgutHYj8JKMMHA +lYn3yaCK/MZi6I85OlcsksjQWc3UFdCPLBP7BfJy4StqZR6vKQxS/LppvOeTt52d okyydvQVxPjWKXR5tw/rNZAQk8fd1mUlQFc63fOFvvbFtqHQuBviWQlLAIOEsEAq5 Td3Wu6pKOQ4xKAqRlG5U7EwzzvRcEpITciGHaRxHlIggv9z16o1+1Jm0DsuMADMjA 1ZNH7fjHYpGCf7mq2A== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [77.33.175.99] ([77.33.175.99]) by web-mail.gmx.net (3c-app-gmx-bap07.server.lan [172.19.172.77]) (via HTTP); Sun, 15 Sep 2024 21:55:04 +0200 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: From: Hans-Frieder Vogt To: netdev@vger.kernel.org Cc: Andrew Lunn , Heiner Kallweit , Russell King , FUJITA Tomonori , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Subject: [PATCH net-next v2 2/7] net: phy: aquantia: search for firmware-name in fwnode Date: Sun, 15 Sep 2024 21:55:04 +0200 Importance: normal Sensitivity: Normal X-Priority: 3 X-Provags-ID: V03:K1:+XZEEkd/XzlviwXMAEpKDYFSMerO1t+flmXVC1qjLuBrB+yYAUducBiEmYfq2LNpradCE k5qQ1gERZSVbGwrdq2Em3eobcXX//whMyWrVo8Sv+QrpiHDoQlT7ulULKa4CA/CuJL75dXHozCf9 eAeaSAC/Pal0A0dX9uAT0CDcQxPsmt7Uv57Ihnm8l3uj9NsQebSRRTQK32JwTlnOC91VlLAXayn8 NO1Mb5Fq9iApr0DveAYzwalK6WRWTsmPJ2fGVTYhtV8mCsbmuJ1uGr4Xm+/dCef/Pp48B2TIGRP3 9s= X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:/qZck0IJrhQ=;9bMLNHVWGb18fTtw9XiGAlElDWr 6h20nOfXAjb4cPDI1k0w5UFwX221phyt7xLTHGecMEypbMcZ6Of++EF8A4zWWk+6HkeFGMqcC ORE7VeAIGhpGH3zpGdMC7KA/Depw3MgUKa48Td/h3qJK6hsXuPyT6JkTmFksnrhWh569UKFsD zrQQqLwnoULdjVGOOinzojNATLCGe5gXyqId9U5hMj2eWV0omcXOfHHLrXt2Od1o9pMvskg7/ cH46HJfrxgVVLBN8mNUbUfgde3dHVtV3BMI5PRfWgynSbYOwW4SG3rqXLKwSOXKe7F9SeESBH huHblUTEJcNL4yuwSKvRbIk3UhmDpYEZhsNSp4URfLdUrU+3uxLVg60OOzP81ojcTOQYS4nig dlqE4ZyFzXr/+LHmIhfHMfz+LRwaLR0oKaJjRwZJq+9vteS/z/WjoeEKx8WpA7OacHhSfxq5M bP5TiHtmA5Ixra1RjLeMpB4nq6e8LcEdJnUGezRJsyq/DzwhOZycwe5L8M2iiM3tqjip7O/dP zDHb06LAVtZRVzLRy0dqxfIXOOnFdspNyIlv5pmtYkUWQPp16cKFYWA+wP678VWAP+Znwp1yB iZXNsEw8DPa1NLkASXhw6pGSL7+awtdheW+U3/cL1SkD+/nrHg8ozPdptTvOUmqD5KlwYEhg4 gfqiRXLHpNpl9D9bmttvDBzASllOSmjamD/uKD+exA== X-Patchwork-Delegate: kuba@kernel.org Allow the firmware name of an Aquantia PHY alternatively be provided by the property "firmware-name" of a swnode. This software node may be provided by the MAC or MDIO driver. Signed-off-by: Hans-Frieder Vogt --- drivers/net/phy/aquantia/aquantia_firmware.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.45.2 diff --git a/drivers/net/phy/aquantia/aquantia_firmware.c b/drivers/net/phy/aquantia/aquantia_firmware.c index 524627a36c6f..f0e0f04aa2f0 100644 --- a/drivers/net/phy/aquantia/aquantia_firmware.c +++ b/drivers/net/phy/aquantia/aquantia_firmware.c @@ -330,8 +330,14 @@ static int aqr_firmware_load_fs(struct phy_device *phydev) ret = of_property_read_string(dev->of_node, "firmware-name", &fw_name); + /* try next, whether firmware-name has been provided in a swnode */ if (ret) + ret = device_property_read_string(dev, "firmware-name", + &fw_name); + if (ret) { + phydev_err(phydev, "failed to read firmware name: %d\n", ret); return ret; + } ret = request_firmware(&fw, fw_name, dev); if (ret) { From patchwork Sun Sep 15 19:58:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans-Frieder Vogt X-Patchwork-Id: 13804905 X-Patchwork-Delegate: kuba@kernel.org Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (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 58807282E1 for ; Sun, 15 Sep 2024 19:59:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.22 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726430353; cv=none; b=IKa1u3o9atO6rfXeFXLlmf496y6fkdfC/Sbpi6eePQzm3S1k6tAFPXB6jEcU9olYqsDgCLqvAR4/NcDkNZ2whXP2DtwF+iUHS35pdEQ+W34F+xVKHTJemJn4vmIdHqn/37GXzfLJOFWs0d9jmiFElRbMSjVZEWO1S6fQkGqKBkQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726430353; c=relaxed/simple; bh=qS2tSf1tnCgK+/ziMhz4gBpeHLEqRJNydsjVyTgfThw=; h=MIME-Version:Message-ID:From:To:Cc:Subject:Content-Type:Date; b=Ocxyc53oPXvYMMHvZCvDOjWa8GAF/2gT62FjtAy2Hm1ReO4Fp8+lzyPZq3k7K7tCPowaSiAJqnnyjPqZCiwlUAWzoG2T7JadjKCURADSN9IPolPb2WsO/6lrctjoKstZ0brLpvT7eq8kchwE0oh0GG8EAKxo3hMXNIc4RYbGFvc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net; spf=pass smtp.mailfrom=gmx.net; dkim=pass (2048-bit key) header.d=gmx.net header.i=hfdevel@gmx.net header.b=K+FBSnKp; arc=none smtp.client-ip=212.227.17.22 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=hfdevel@gmx.net header.b="K+FBSnKp" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1726430332; x=1727035132; i=hfdevel@gmx.net; bh=aKPnaE/sGZW7l9IIFC7zoZv8MQDp3E1USl98j92jEqk=; h=X-UI-Sender-Class:MIME-Version:Message-ID:From:To:Cc:Subject: Content-Type:Date:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=K+FBSnKpEiN9j5Vk7wpRb6khavkMtLBjOkFRJbAZPJcJc+QAivmSDetZbPF+67Gi K6+dQv1mHQexHjyD+fJG8GxeW5UmBfzFf5YS58fqEKY3n+E759ZnnGgR6Y8pC+jRh j3ofROTWgI4h1ialJRwJ+eaVlCS/wOhx+2e6oRPef+/TJN96JmesxhFiBJfD54S6P lA9aZFEUHVwbz/ETVkYpbtl5iUkmM/gVQncekqwbwv4EfJdNI6/Y+YQCkzhZzTQJu ItkoE8Xv5fOjJEHJbhx+8kwZwCHinv+xFQV0x8tijidMgY/Qw9AgRUfpusqJOgKdt cpRoSiQ6dHh+xdobDw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [77.33.175.99] ([77.33.175.99]) by web-mail.gmx.net (3c-app-gmx-bap07.server.lan [172.19.172.77]) (via HTTP); Sun, 15 Sep 2024 21:58:51 +0200 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: From: Hans-Frieder Vogt To: netdev@vger.kernel.org Cc: Andrew Lunn , Heiner Kallweit , Russell King , FUJITA Tomonori , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Subject: [PATCH net-next v2 3/7] net: phy: add swnode support to mdiobus_scan Date: Sun, 15 Sep 2024 21:58:51 +0200 Importance: normal Sensitivity: Normal X-Priority: 3 X-Provags-ID: V03:K1:gd0pROmslQIzLBwTUKCaHpogWUiKpL8jhzDEDturkFgX/f4imT02ad5fFmfwN/lspg6vp pb/qXERVQmcRDJkfizACm/HtobqcV6StlkAlaufw+oY1n2dtTQ4lRmBfS9drm6kXXIBy12wv0B2n 6tx1dxKkgsW1YbMedCHruIreV3tBCoAR/NPGX3vhwzukWYlMCnx6qfHd0RATkcRz3rKbddOT7/8M OjDUIKbVy7KMenO0xoNk+r2cw1Uu7FvvG/4xhiHkd5cQ2uyqW7Vsk9UNcPcckfcKemHi3U08qeX0 5Y= X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:UNpRoyeamOU=;Gaq991gqIRrlHpoDlQh5QJkE8rO F4Ob0B8gqr+MPW9frB99nUmViIMTcmIMi9EbpmeyKorUjNiIFylQi65BOuTn49Y3WiTORK3u/ Do67oqSIWIE5IdMOwL81L9VSQkDz/Y6xFlackYI1Z9gZhmqCCTLfNP3TU5XXBaDoZe9eVd84+ Pry7tAFDDIM1Uk1shfxC/ip0YLhnt2Lh7dxP8QBO/SbQD1zomyQGEUZ4IEcosOIsnGLqCxbhZ BJZDbMl+tWD3hTGNeVwEShpqQraqaQXAXF9xVIvNcsteHB4f7u/OVyUeJlrQOkyYnfM+ceKbI f56Jacr7QgifZvxdzEIX0QXbLkD3BshQpcLKHqxTQOQ9x42C932VX3TsSqnK+Am/uOTrTLaWq 2Vp5CopWN3ECgyGmGG9Oe1yzJh9B9g+CdKpY5qm36syW8Rq3ZhBqfcj6jNscONxoKVBWC0D+Y RuDAnmWcGz9zHlVGqGjeBMA/2H5oMzufKytS4UItaoFMgyGirlxtzCWfhNVXqHO/eCdWWEaUk DfGSbcN4NHzX2fIIO7En04tXZU5KHcDptsLpyCd/TXn7UTGX9LB9AvUJaVCWfodpehSjfuVZu AIcRPH08Sg0vd0SqSHj6SdR5UYRLOZMy83CAYwIvY/3jmnybXrkemCxgbEHbivUVW/8SbKSf+ DQZk92OAks7T3cPxAeqQUyNd1c0eqzYpZuy8428gPg== X-Patchwork-Delegate: kuba@kernel.org Add swnode support to mdiobus_scan, to allow addition of a swnode/fwnode to a phy_device. The MDIO bus (mii_bus) needs to contain nodes for the PHY devices, named "ethernet-phy@i", with i being the MDIO address (0 .. PHY_MAX_ADDR - 1). The fwnode is only attached to the phy_device if there isn't already an fwnode attached. fwnode_get_named_child_node will increase the usage counter of the fwnode. However, no new code is needed to decrease the counter again, since this is already implemented in the phy_device_release function. Signed-off-by: Hans-Frieder Vogt --- drivers/net/phy/mdio_bus.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) -- 2.45.2 diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index 7e2f10182c0c..ede596c1a69d 100644 --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c @@ -551,6 +551,8 @@ static int mdiobus_create_device(struct mii_bus *bus, static struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr, bool c45) { struct phy_device *phydev = ERR_PTR(-ENODEV); + struct fwnode_handle *fwnode; + char node_name[16]; int err; phydev = get_phy_device(bus, addr, c45); @@ -562,6 +564,18 @@ static struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr, bool c45) */ of_mdiobus_link_mdiodev(bus, &phydev->mdio); + /* Search for a swnode for the phy in the swnode hierarchy of the bus. + * If there is no swnode for the phy provided, just ignore it. + */ + if (dev_fwnode(&bus->dev) && !dev_fwnode(&phydev->mdio.dev)) { + snprintf(node_name, sizeof(node_name), "ethernet-phy@%d", + addr); + fwnode = fwnode_get_named_child_node(dev_fwnode(&bus->dev), + node_name); + if (fwnode) + device_set_node(&phydev->mdio.dev, fwnode); + } + err = phy_device_register(phydev); if (err) { phy_device_free(phydev); From patchwork Sun Sep 15 20:02:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans-Frieder Vogt X-Patchwork-Id: 13804906 X-Patchwork-Delegate: kuba@kernel.org Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (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 BDC8DEAE7 for ; Sun, 15 Sep 2024 20:02:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726430567; cv=none; b=mGxjAgiEn4jVdTlZdJQpA7RD7GWx3alHxIWGJthBYHdCn9z9mCrtncWB2WPVSmEwnr7PgWgW3YYJvuS32Bq7RQZuUmXuNuufxb2kPFFv3mv02A0c00UZhau1Vel2cWpSERylGB6WdzKeCLeDdrZYDKe3SETyw4B9F1Oni896rEs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726430567; c=relaxed/simple; bh=Ephtr5oOsQS9kPD5YO1grfkEHKRUoXF/eA9uDddGMxQ=; h=MIME-Version:Message-ID:From:To:Cc:Subject:Content-Type:Date; b=b9tsEU0lWVUQPiL33b8HH/QXA9EZNi6fmspDBKiNlNAeQaZfbTtzNx0fhI1/ZAZeXMIrIZbB0I4SPb6Hv73kjEiFP2JndzvHv7JE/WT1sbrG6xZCMTh+nN26ypcp2QXwH8+wJFtv5voRAJ2rhNPSAP8K7w0GGSv/8sqY2LHufm8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net; spf=pass smtp.mailfrom=gmx.net; dkim=pass (2048-bit key) header.d=gmx.net header.i=hfdevel@gmx.net header.b=VWO3sNtw; arc=none smtp.client-ip=212.227.17.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=hfdevel@gmx.net header.b="VWO3sNtw" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1726430547; x=1727035347; i=hfdevel@gmx.net; bh=G/pb2V+0FYFTdsUSNahAPG5pP/o6slUX+JjhleT9Sxc=; h=X-UI-Sender-Class:MIME-Version:Message-ID:From:To:Cc:Subject: Content-Type:Date:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=VWO3sNtwcFQhPeSP55sppC4DK71oy/1yBEUYPdmwl9yBtg/r83aW9HZvmHHeQtOb Df26xA9K/hS0LVfiLRo9N+VQJk+uk3j8M+lg3MIUOS4ZwZ/fZ+e0nY49I2H14mUOd 5zXGTaFON9c4bDRVLE4n+I083qNCrkVMzi/qwfCryCfEgri+DAR7vXrWCh61XbOFo W7lSXyVroHN2i0HqjtW79N537VeJa6EIyLlc0WkPIGTa9lUB1+mDnYKAl3Ec2K0xf ohBw4p9pLG6G2qlG5c2HUWNzhmJQqvgdfNwDbsweBZPLnFgSWHGpi0m3A5BUueMLv FbUHnnltagtcjLgjsA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [77.33.175.99] ([77.33.175.99]) by web-mail.gmx.net (3c-app-gmx-bap07.server.lan [172.19.172.77]) (via HTTP); Sun, 15 Sep 2024 22:02:27 +0200 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: From: Hans-Frieder Vogt To: netdev@vger.kernel.org Cc: Andrew Lunn , Heiner Kallweit , Russell King , FUJITA Tomonori , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Subject: [PATCH net-next v2 4/7] net: tn40xx: create software node for mdio and phy and add to mdiobus Date: Sun, 15 Sep 2024 22:02:27 +0200 Importance: normal Sensitivity: Normal X-Priority: 3 X-Provags-ID: V03:K1:VrO+Wmon3buZLHPsKdEmh48E6KDjNIWFPdFCMDRPOuubtQks7otZSZdPCEHxgTQwBT0t5 aRsdlEZ7NG3j9lryM4ZF7URattrSSTSgCG8r3QuyCJZMxZfJZven/XcxjYTujTXnTGV4mCoP67dd JUFdAY6fVp5S/7Exnciu1ptF/7L/hzpz3S2AiYcOLJwjDRFz3VlwBWtYSCnQKyHm5DCeZBXh56P3 4UptXYejJOesZ2LRwN8icLPowzBz091cbJTfgw1n8ivt1dQiAf8uARUeWuezpvZN5tAp102cp7jN TE= X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:Agbe9w2iKyI=;QgVFq43BBIJl+oDsJ1ehP7mbOZT c8+QO6yX+RnorVPNmHVxdQcl90DJWiw6wyOTbdJuJycIv00lV3goOtFpMETCuF2FjjpI9kHyw dpNQ6WqgPUdXg8An2F3zi1RJG/yHnMG257vBHhaDnzmPwLnSQc84fmn5c1IhecPUYAdgg6RPJ muBn3b50eIn1vnVdgiKRteVgXuPFyTV4k6lAnvhrcuyJ3fBJTexS7FlTfC8nNHxDbaRidu/VG 4Ula7MgnSsWkJp4D6thb6MNM4eT35iE/YyY/WFKp28lGdZi54eDzJbAnGVWR6mRfGEisN1h6X GAHWgtTluVw/y5WSSAmPjdTtr07jC/kwTvjhlN1eeULnmqFCWqNPl1tdXfUS+tBgtD300+fyf alp1Xv8/XRqhSidcxzZnDLZrVwidvs2GBd7+fgE4kRWDXYQghdT//0XdZldHFOsxiZMwpXmRb /5wWIi0UAbAm5FqtcU7QXPfAMrwOzuwqEeJvVJZavqBiNWjUSFpM21SN8+uHaBPX3kv6jLzyV hhS/rerDL0Jf5LOKuLSGOYjgA/n7JHNCJZtsBDgzDcgPdzSLA7HD/mKi+KmCqaxRCNySGeyp8 6g+6S2Cl90EZMeh+QDtrt2cxEBRs9rf2lcOc04EauLXv16IU8IYhT1VKIggYczILa9FR4GE2p gCBdyHzD/Q1WzL9wPuscTEXkbW43Qy5AixcamKoKlQ== X-Patchwork-Delegate: kuba@kernel.org Create a software node for the mdio function, with a child node for the Aquantia AQR105 PHY, providing a firmware-name (and a bit more, which may be used for future checks) to allow the PHY to load a MAC specific firmware from the file system. The name of the PHY software node follows the naming convention suggested in the patch for the mdiobus_scan function (in the same patch series). Signed-off-by: Hans-Frieder Vogt --- drivers/net/ethernet/tehuti/tn40.c | 10 +++- drivers/net/ethernet/tehuti/tn40.h | 30 ++++++++++++ drivers/net/ethernet/tehuti/tn40_mdio.c | 65 ++++++++++++++++++++++++- 3 files changed, 103 insertions(+), 2 deletions(-) -- 2.45.2 diff --git a/drivers/net/ethernet/tehuti/tn40.c b/drivers/net/ethernet/tehuti/tn40.c index 259bdac24cf2..5f73eb1f7d9f 100644 --- a/drivers/net/ethernet/tehuti/tn40.c +++ b/drivers/net/ethernet/tehuti/tn40.c @@ -1778,7 +1778,7 @@ static int tn40_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ret = tn40_phy_register(priv); if (ret) { dev_err(&pdev->dev, "failed to set up PHY.\n"); - goto err_free_irq; + goto err_unregister_swnodes; } ret = tn40_priv_init(priv); @@ -1795,6 +1795,10 @@ static int tn40_probe(struct pci_dev *pdev, const struct pci_device_id *ent) return 0; err_unregister_phydev: tn40_phy_unregister(priv); +err_unregister_swnodes: + fwnode_handle_put(dev_fwnode(&priv->mdio->dev)); + device_remove_software_node(&priv->mdio->dev); + software_node_unregister_node_group(priv->nodes.group); err_free_irq: pci_free_irq_vectors(pdev); err_unset_drvdata: @@ -1816,6 +1820,10 @@ static void tn40_remove(struct pci_dev *pdev) unregister_netdev(ndev); tn40_phy_unregister(priv); + /* cleanup software nodes */ + fwnode_handle_put(dev_fwnode(&priv->mdio->dev)); + device_remove_software_node(&priv->mdio->dev); + software_node_unregister_node_group(priv->nodes.group); pci_free_irq_vectors(priv->pdev); pci_set_drvdata(pdev, NULL); iounmap(priv->regs); diff --git a/drivers/net/ethernet/tehuti/tn40.h b/drivers/net/ethernet/tehuti/tn40.h index 490781fe5120..e083f34f2984 100644 --- a/drivers/net/ethernet/tehuti/tn40.h +++ b/drivers/net/ethernet/tehuti/tn40.h @@ -4,6 +4,7 @@ #ifndef _TN40_H_ #define _TN40_H_ +#include #include "tn40_regs.h" #define TN40_DRV_NAME "tn40xx" @@ -102,10 +103,39 @@ struct tn40_txdb { int size; /* Number of elements in the db */ }; +#define NODE_PROP(_NAME, _PROP) ( \ + (const struct software_node) { \ + .name = _NAME, \ + .properties = _PROP, \ + }) + +#define NODE_PAR_PROP(_NAME, _PAR, _PROP) ( \ + (const struct software_node) { \ + .name = _NAME, \ + .parent = _PAR, \ + .properties = _PROP, \ + }) + +enum tn40_swnodes { + SWNODE_MDIO, + SWNODE_PHY, + SWNODE_MAX +}; + +struct tn40_nodes { + char phy_name[32]; + char mdio_name[32]; + struct property_entry phy_props[3]; + struct software_node swnodes[SWNODE_MAX]; + const struct software_node *group[SWNODE_MAX + 1]; +}; + struct tn40_priv { struct net_device *ndev; struct pci_dev *pdev; + struct tn40_nodes nodes; + struct napi_struct napi; /* RX FIFOs: 1 for data (full) descs, and 2 for free descs */ struct tn40_rxd_fifo rxd_fifo0; diff --git a/drivers/net/ethernet/tehuti/tn40_mdio.c b/drivers/net/ethernet/tehuti/tn40_mdio.c index af18615d64a8..b8ee553f60d1 100644 --- a/drivers/net/ethernet/tehuti/tn40_mdio.c +++ b/drivers/net/ethernet/tehuti/tn40_mdio.c @@ -14,6 +14,8 @@ (FIELD_PREP(TN40_MDIO_PRTAD_MASK, (port)))) #define TN40_MDIO_CMD_READ BIT(15) +#define AQR105_FIRMWARE "tehuti/aqr105-tn40xx.cld" + static void tn40_mdio_set_speed(struct tn40_priv *priv, u32 speed) { void __iomem *regs = priv->regs; @@ -111,6 +113,46 @@ static int tn40_mdio_write_c45(struct mii_bus *mii_bus, int addr, int devnum, return tn40_mdio_write(mii_bus->priv, addr, devnum, regnum, val); } +/* registers an mdio node and an aqr105 PHY at address 1 + * tn40_mdio-%id { + * ethernet-phy@1 { + * compatible = "ethernet-phy-id03a1.b4a3"; + * reg = <1>; + * firmware-name = AQR105_FIRMWARE; + * }; + * }; + */ +static int tn40_swnodes_register(struct tn40_priv *priv) +{ + struct tn40_nodes *nodes = &priv->nodes; + struct pci_dev *pdev = priv->pdev; + struct software_node *swnodes; + u32 id; + + id = pci_dev_id(pdev); + + snprintf(nodes->phy_name, sizeof(nodes->phy_name), "ethernet-phy@1"); + snprintf(nodes->mdio_name, sizeof(nodes->mdio_name), "tn40_mdio-%x", + id); + + swnodes = nodes->swnodes; + + swnodes[SWNODE_MDIO] = NODE_PROP(nodes->mdio_name, NULL); + + nodes->phy_props[0] = PROPERTY_ENTRY_STRING("compatible", + "ethernet-phy-id03a1.b4a3"); + nodes->phy_props[1] = PROPERTY_ENTRY_U32("reg", 1); + nodes->phy_props[2] = PROPERTY_ENTRY_STRING("firmware-name", + AQR105_FIRMWARE); + swnodes[SWNODE_PHY] = NODE_PAR_PROP(nodes->phy_name, + &swnodes[SWNODE_MDIO], + nodes->phy_props); + + nodes->group[SWNODE_PHY] = &swnodes[SWNODE_PHY]; + nodes->group[SWNODE_MDIO] = &swnodes[SWNODE_MDIO]; + return software_node_register_node_group(nodes->group); +} + int tn40_mdiobus_init(struct tn40_priv *priv) { struct pci_dev *pdev = priv->pdev; @@ -130,13 +172,34 @@ int tn40_mdiobus_init(struct tn40_priv *priv) bus->read_c45 = tn40_mdio_read_c45; bus->write_c45 = tn40_mdio_write_c45; + ret = tn40_swnodes_register(priv); + if (ret) { + pr_err("swnodes failed\n"); + return ret; + } + + ret = device_add_software_node(&bus->dev, + priv->nodes.group[SWNODE_MDIO]); + if (ret) { + dev_err(&pdev->dev, "device_add_software_node failed: %d\n", + ret); + } + ret = devm_mdiobus_register(&pdev->dev, bus); if (ret) { dev_err(&pdev->dev, "failed to register mdiobus %d %u %u\n", ret, bus->state, MDIOBUS_UNREGISTERED); - return ret; + goto err_swnodes_unregister; } tn40_mdio_set_speed(priv, TN40_MDIO_SPEED_6MHZ); priv->mdio = bus; return 0; + +err_swnodes_unregister: + fwnode_handle_put(dev_fwnode(&bus->dev)); + device_remove_software_node(&bus->dev); + software_node_unregister_node_group(priv->nodes.group); + return ret; } + +MODULE_FIRMWARE(AQR105_FIRMWARE); From patchwork Sun Sep 15 20:05:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans-Frieder Vogt X-Patchwork-Id: 13804907 X-Patchwork-Delegate: kuba@kernel.org Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (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 39C05347C7 for ; Sun, 15 Sep 2024 20:05:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.20 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726430740; cv=none; b=sLic/SgpF+N26A8iQGlyUgMzVIyo5RghhSeIlmHb537iEN+sCsM7D8lPtGpVKd9/ndMYQdjHZnkCUN9AgPX9gpppaJHXWkaFNKn56Clhfh1m9pNq6IfBgXuIDkODjUd16VKFzEsC9Say5ZkiQvdyKSHeEutf5eqVKKR+C95zIOM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726430740; c=relaxed/simple; bh=jXX+XZpoNwxKHXXJlbzM62Y2l9JlMOnBIojpZVujsDo=; h=MIME-Version:Message-ID:From:To:Cc:Subject:Content-Type:Date; b=aSPtHmvbIdGgzFE0L6/vE5agX+GRgQTNRQlv9JISH3dVMh+pRT+6GYM2xvMqsGyKKTcRc/vRcARTEnG4FghLeiYWRPs+83vG80BXLYBaEZ/peRLAPSqyNaJNXRoi60el1/oCy4jTEPv6TOuguFkHpZxixF2BHrEN5G50LHfQfw0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net; spf=pass smtp.mailfrom=gmx.net; dkim=pass (2048-bit key) header.d=gmx.net header.i=hfdevel@gmx.net header.b=AkIP5LeV; arc=none smtp.client-ip=212.227.17.20 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=hfdevel@gmx.net header.b="AkIP5LeV" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1726430721; x=1727035521; i=hfdevel@gmx.net; bh=8PPR96DY0hmhT6IUYLXS+Vf7OqMmSwn7ycZ+YNB8FE4=; h=X-UI-Sender-Class:MIME-Version:Message-ID:From:To:Cc:Subject: Content-Type:Date:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=AkIP5LeV4Q+sC4evFK1GpkNsBX85pzTrcFYIomVEcndCt2LXgviAY4LcbmPTCrIf IMUjIANXi2ikWYQBAeDC8hfhIi8lkj3YQiZxHmZhNXKKRUjSMAcdgpxzEkccQgohX QEtxc9kWMqG/U81/i2Op3rx5Yq0IUnCXyQStmFY38xskQ/Uab2SWLt3MIpBIbMWkQ ON+0/fqYD+slLuOh3cESW3Byl33bPFxUyPGE6LAEIpGvltNJPqu6dO4T63w2xO4Jz v+sbQzKgdOgG2YymuS3uCUjhgXJXEG0TEVbno+jleClvgxQqiXzHW4/Z3A0LM+15v nqkAHGPrsohwia1p3w== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [77.33.175.99] ([77.33.175.99]) by web-mail.gmx.net (3c-app-gmx-bap07.server.lan [172.19.172.77]) (via HTTP); Sun, 15 Sep 2024 22:05:20 +0200 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: From: Hans-Frieder Vogt To: netdev@vger.kernel.org Cc: Andrew Lunn , Heiner Kallweit , Russell King , FUJITA Tomonori , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Subject: [PATCH net-next v2 5/7] net: tn40xx: prepare tn40xx driver to find phy of the TN9510 card Date: Sun, 15 Sep 2024 22:05:20 +0200 Importance: normal Sensitivity: Normal X-Priority: 3 X-Provags-ID: V03:K1:lX32I0/rUPHpsOBqx2YViX+AXNO8rvDe2WEqsQqPGH9uJ9hpnB/N27Y3vxVpvz7MHv7oV dTa6TJVbPwon8+EsB/GEbIyoRiIS11y5X819A6dmeEQJpxeDyJyzFab/ShHIvNrtbHGRkGyD1KSb DMDG8FUkNYsgskdaT3rKlNyMBauoLb/FEmf6YuHRi8g6moLsBfab73F95TLY2KVzGyYMxwHTPE5X Xvh319CpLdpZnTWVxLpckKdFyWZYjWEFnlFb8c1CkTGDWQNkoZb3CguTiFuf2ViOUWgUbw9inhuE zU= X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:2c9Grf27+Rw=;UyGxUNPeTP4RiH4SqZ3z7K4tBY9 iCW6vGB8VUk3qc/OaA0x/tVQDgXMU5RbnWU7gz9evT8fyrL+qlgd+WH8iSaBv5twSuLOUWjpO WabmyOoH5imKsRAtFfCVmerGjRFlGOljdkhqPocEcGgm6MD6MzLL9001EQhCJxujgV0GaQjmC fpA1AxRI0MgTO4PD0Pbb6uK9nhPPQ8PvtFETmczBLkMIEjyrRtWlHDjKwarAi7IhPFwvYqY6V L7XwovIFX9MH2HB7kwQx2rFukOAsDhU/Lx/I/lLO6Qkfo/XqKzJbQ4LE7hfQxDjwMH/tcSp3U +7XyNfRXS6jkAVkHAATrq4BR9JVBHIzmhVTm6X1LkljVr3htVt4xKG0V3uQkFE9XcwOABKtYc mxN30KPCqQRRYqJJwHPLo3lOzSQiqATw8wb36sgOWaPxpde8+Hb6cDxCVr3Z2l4hrX5bILfHc uH4kMztUULAoBmdaNTSrxc1WqDCLriS1teAGtsSUbVeiVmoc7CAhirqtQmm48Osh6LdsdBeYZ W1PDpedK8jwIya0XA9S0BXUX0NzmuQFaBDqgdahIDX+gq/FuaDTesc+wh9v/5BaNpaZ+YDkYT TBVG1ZW872i7yIgwfuOEw6eszPawfrWXhEw4OVUDfjOaSS4sZ1TEOjfsunUnhZ4xqvwW4eNJo CUNhc95DUSgBdfV7K8GYVDKBa8O7SsfTWWG9Ihk3tA== X-Patchwork-Delegate: kuba@kernel.org Prepare the tn40xx driver to load for Tehuti TN9510 cards, which require bit 3 in the register TN40_REG_MDIO_CMD_STAT to be set. The function of bit 3 is unclear, but may have something to do with the length of the preamble in the MDIO communication. If bit 3 is not set, the PHY will not be found when performing a scan for PHYs. Use the available tn40_mdio_set_speed funtion which includes setting bit 3. Signed-off-by: Hans-Frieder Vogt --- drivers/net/ethernet/tehuti/tn40_mdio.c | 1 + 1 file changed, 1 insertion(+) -- 2.45.2 diff --git a/drivers/net/ethernet/tehuti/tn40_mdio.c b/drivers/net/ethernet/tehuti/tn40_mdio.c index b8ee553f60d1..80eb68384389 100644 --- a/drivers/net/ethernet/tehuti/tn40_mdio.c +++ b/drivers/net/ethernet/tehuti/tn40_mdio.c @@ -185,6 +185,7 @@ int tn40_mdiobus_init(struct tn40_priv *priv) ret); } + tn40_mdio_set_speed(priv, TN40_MDIO_SPEED_1MHZ); ret = devm_mdiobus_register(&pdev->dev, bus); if (ret) { dev_err(&pdev->dev, "failed to register mdiobus %d %u %u\n",