From patchwork Fri Nov 17 10:05:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 166084 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9910:0:b0:403:3b70:6f57 with SMTP id i16csp421897vqn; Fri, 17 Nov 2023 02:09:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IEPVn5mhOK1iB+ioRCTzceaO6Yq7P7sxLn++I4OwOmEIZNQI/UZk74BE4010zvnnq+wecBI X-Received: by 2002:a17:903:22c3:b0:1cc:4625:74e2 with SMTP id y3-20020a17090322c300b001cc462574e2mr6798412plg.24.1700215755966; Fri, 17 Nov 2023 02:09:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700215755; cv=none; d=google.com; s=arc-20160816; b=Zkj3+6YAO+pGHL4yWwojp95Pxgb6e9AQW/rXOTt8w+EvxcRGHq5q83G166s5DI7gOY vTW8DpOJyRYx9expuoNIoc1v92T+7xXjuXxZ0mbQVD3t7fK9OD9b3wS+o1dE1qh6gOar /VlU5hE8+/1oqFC5amAuNuXSlgRD5Qw6OqiRodoD5VWt8NZS1/pEq5ErDOdRlG8bAKf3 mTm2z2P7bwaDku/++vq6NUyGSVKVgXzGSN5wgCWo3/hDii/QTrONcFvym6xA8+GovIGI k7v9nzSeYdFt/JYMeynN6AgSgXXkna/hdfFUyzbREPPH3+4Z60nRGFAydT5/L+grgpQm RjMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=EbmgR2wWjkRCjoHXAmGAF8yTKa5Bp0SAasTthhu3X1w=; fh=Pjsyd7NRaiCeIBGjME77yFlHk2byuPh+3fTNnOkAbUA=; b=shzPENnJsBFoRhw4QQMvV14tIoHZuuruCruG0mUrbTnjlF1FQWVVYSNGiwzT6+g7bE IFayd7ObUjp3JGerBBiIP1owGgID7FVX+G3oKegyHFCepE2H+FJWtfSDS6wqy1n0rFvw zAaIm5OMmsn0zMVJJQntLQC0LcplLUdAe5JGzkexx+BPO9gJXL0+IvyuYQ64QgD3IBDy 6yVdcdVBJZ/PIN5dvklAvakUJYJh9ymYAD0fDfLptkAM6xdMeVjMhlM4IswyL4ai8LQY brwJN2TuHAgGuLpmjy0vsa6jBmheLCnhNv9kdkQ9uhNi0vsikVh6Pw2Ya8MR+1RVGQJ0 0AjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=VhASmIP3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id u5-20020a17090341c500b001cc0d2e97f8si1590374ple.575.2023.11.17.02.09.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 02:09:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=VhASmIP3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id CFAE682F305B; Fri, 17 Nov 2023 02:09:12 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345744AbjKQKI5 (ORCPT + 30 others); Fri, 17 Nov 2023 05:08:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230105AbjKQKI4 (ORCPT ); Fri, 17 Nov 2023 05:08:56 -0500 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF45FA6; Fri, 17 Nov 2023 02:08:52 -0800 (PST) Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-53e751aeb3cso2598846a12.2; Fri, 17 Nov 2023 02:08:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700215731; x=1700820531; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=EbmgR2wWjkRCjoHXAmGAF8yTKa5Bp0SAasTthhu3X1w=; b=VhASmIP3iTphEAWMfz1ZyJ8teYhhq70fay9LNZzcNhpIeSnGDnXxJIvk9C07CS38Wf T6xqW6kxM0wIrUwDDmXiORQBAAmQbAVNLXwQpXZWdc0qmqGsskqki9g1aEWTKR7iAozP F6ji+yLJRPt9YVKNvCNj2AehyfC1sITgkqqdAIWI7U3f+D1uJzTp8iseDXdVPScMqpQT 2qMj1rUh4KnnSWBfM/RnOOJQctxzXBXNzc4z8UzYLmVlTRRDsI1W1wxGrUgHrJnNkbik 0G+CdXgC84dMeWuprD8tTzqqBTKQnQTNaAN53y08IhOQiU6fCIiUCsGUppoBEGMYA8o3 7hWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700215731; x=1700820531; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=EbmgR2wWjkRCjoHXAmGAF8yTKa5Bp0SAasTthhu3X1w=; b=QxvjRoMAr87X0XFfh1gBXRBKVosuD9pIJi/8vGtLLt+zaVoeVe6DqLGk3IbFrXxlLE bb9yREnmZahY37y3lW/znnmIrCJXcyRK3leZzhcdu3wnthHR3u/Uw4B7HOX9YtIWPF9q xa8UiFdLs9gjuKQ9+1qAYtRZCc6uCyGA2TysE4NDmdBMM2Utyu4ggGPlYNTW6dnuo5oS O15XOjH6R51kcqP3Bb14mJ/MWByE5w/OBwxO8QyHsl8+Ig8YZX49ob0M7TawtfFzsn8M ZER1r05tjRprwnrSbhd+taiiooQS28ORxEW/NXykKYAVmTi3+gOLwvol5JdQvENnTw0L rEHA== X-Gm-Message-State: AOJu0Yz4/DtRs1ryHuea1fZFLGcvVXF69rjKiUe6LgUpv8wOHbQZUMTW r/n9LshexRu+TCk96RiQAyQ= X-Received: by 2002:aa7:d801:0:b0:545:5601:414e with SMTP id v1-20020aa7d801000000b005455601414emr14671872edq.5.1700215730944; Fri, 17 Nov 2023 02:08:50 -0800 (PST) Received: from fedora.. (dh207-97-146.xnet.hr. [88.207.97.146]) by smtp.googlemail.com with ESMTPSA id n26-20020a056402061a00b0054358525a5bsm554368edv.62.2023.11.17.02.08.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 02:08:50 -0800 (PST) From: Robert Marko To: andrew@lunn.ch, hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, ansuelsmth@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Robert Marko Subject: [PATCH 1/2] net: phy: aquantia: validate PHY mode on AQR107 Date: Fri, 17 Nov 2023 11:05:04 +0100 Message-ID: <20231117100848.424372-1-robimarko@gmail.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Fri, 17 Nov 2023 02:09:12 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782805436431152839 X-GMAIL-MSGID: 1782805436431152839 The Aquantia driver is not setting the PHY mode itself, but it does however still check if the PHY mode set in DTS is one of the supported modes. However, the set PHY mode does not have to match the actual one, so lets add update the PHY mode during .config_init and warn if they differ. Signed-off-by: Robert Marko --- drivers/net/phy/aquantia/aquantia_main.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/net/phy/aquantia/aquantia_main.c b/drivers/net/phy/aquantia/aquantia_main.c index cc4a97741c4a..7711e052e737 100644 --- a/drivers/net/phy/aquantia/aquantia_main.c +++ b/drivers/net/phy/aquantia/aquantia_main.c @@ -505,6 +505,21 @@ static void aqr107_chip_info(struct phy_device *phydev) fw_major, fw_minor, build_id, prov_id); } +static void aqr107_validate_mode(struct phy_device *phydev, + phy_interface_t dts_mode) +{ + int ret; + + /* Get the actual PHY mode */ + ret = aqr107_read_status(phydev); + if (ret) + return; + + if (dts_mode != phydev->interface) + phydev_info(phydev, "%s mode is set in DTS while %s mode is actual. Please update your devicetree.\n", + phy_modes(dts_mode), phy_modes(phydev->interface)); +} + static int aqr107_config_init(struct phy_device *phydev) { int ret; @@ -528,6 +543,8 @@ static int aqr107_config_init(struct phy_device *phydev) if (!ret) aqr107_chip_info(phydev); + aqr107_validate_mode(phydev, phydev->interface); + return aqr107_set_downshift(phydev, MDIO_AN_VEND_PROV_DOWNSHIFT_DFLT); } From patchwork Fri Nov 17 10:05:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 166085 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9910:0:b0:403:3b70:6f57 with SMTP id i16csp422001vqn; Fri, 17 Nov 2023 02:09:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IFJcALjXebogwXz5aLSsTpCGsG1RTWw4CUJ5a3ZNZpYmXMf4AtmqIoKO9M7BlM7A5sEbxmK X-Received: by 2002:a05:6a20:9382:b0:187:4329:f065 with SMTP id x2-20020a056a20938200b001874329f065mr10145915pzh.38.1700215766094; Fri, 17 Nov 2023 02:09:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700215766; cv=none; d=google.com; s=arc-20160816; b=orlW1m9pc1RFBasy/Nx8GaUPwAYwhQmGQcqVEpUMCO2aLULkpL7b2WVKjaxJ6IVfjj pbC4THsY/3tYT7OhAuaZOn7yYHy9/wc7LbYAM0UmJu8hUTwButv+xx5q0X+GQfM4mPNV L/2s8X0zAKamhc1VCJAjgTZLMVfiK/VSPr8KBwINx5Xr6fG9ntMZsRSunEtG1zVZzhx6 RfgRNMhvhzPIPMnnWrICIs5TzQJFgki0UBaKav0qsNL7gq1EhXH94UxCag9LMJEA3PfX kByWN0LT5fF5t0oc2umIJwhm+rqafE+0LzZ/l/bblF0TkfoggWI63QIT643YC1VOop8t ZZIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qkMOHJc0OcMmrqNaANsP5Qp8DkKGD0Xp7KJHYY+XOZs=; fh=Pjsyd7NRaiCeIBGjME77yFlHk2byuPh+3fTNnOkAbUA=; b=BEb7baxfW67yOsy2+tlAYwmoatqL4Tb4ECPfAFc5dyLzy27UG5/QkqZQx5Sebut+Im L9/8jVEuONByCAXQ3Epe0FrdWspz/7x8M5lJDEyvumPQzAYYADfric9DCwx/uzUVDEdz K0PVUoYUT+q06V4fCtw6qfKgIvgDNrdk5/ZMjbzWR1O9ALaELsoeuOadT4BcygPlCwMI 8f1EiICc6xQ8OecZTRH/dtDe0dW9/v1mFajYEqrYwSgEqxJKI/xCzrJ5b8q6xyo/T0t0 aW6VCZANbi0vLFB2vv/d7qtMa3crlV6tKjmu2I3qftnkmYoSFpLnFf54u0GxXu3cE5yw C6dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XvzdDW0s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id e24-20020a656498000000b005a1d88169casi1499031pgv.189.2023.11.17.02.09.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 02:09:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XvzdDW0s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 001C681D82FE; Fri, 17 Nov 2023 02:09:23 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345768AbjKQKI7 (ORCPT + 30 others); Fri, 17 Nov 2023 05:08:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345739AbjKQKI5 (ORCPT ); Fri, 17 Nov 2023 05:08:57 -0500 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB707C1; Fri, 17 Nov 2023 02:08:53 -0800 (PST) Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5482df11e73so924953a12.0; Fri, 17 Nov 2023 02:08:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700215732; x=1700820532; darn=vger.kernel.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=qkMOHJc0OcMmrqNaANsP5Qp8DkKGD0Xp7KJHYY+XOZs=; b=XvzdDW0sRMHzXueMg0eHjspxUcFzEJPGrHvxFTPcCasCjCcwPKB4Xgj/nPOBwq/8/P UHjLaIjpjNb39l8SwcTyK+qtUnMTQrtkcYAVz+YN9X9eqkEvLexIwsEkAvJEdDYDNOxz KWZWYsY10Uap3jwrR0FuJUAkGeCtjvVCT/qdQOXzhGP3xYb7wuWm648ouE3gI2TvhGQl 0vzXyvV+bp7ilkFbKdr4Dddls+tCZ5rbOX5E5W7u3hkMeSs9fRvmIqjw6fF0ruDMg9yL 0VmThdy849m738EKnwmWsjsC/pVVAHZ/y+4rXD3PqYqyxbYazE9gH5+D4EwJMzsvqwgl nqfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700215732; x=1700820532; 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=qkMOHJc0OcMmrqNaANsP5Qp8DkKGD0Xp7KJHYY+XOZs=; b=F+fB3Uo9/fjW0pKoJH7bNd6WOWO6dfq8vl6OwfQoX1dQ3irsro2eWopUS1KLMCFqAC /1CxrJMXa+fxkZkIj08Um7YTg8W49O/I0fIVoGwQDhSq0/x/7m6QpH++MAJU/54p0Xuo 1ptq4LR2U/B7WOPcgy02icbVdBthF6FVjK0WM6Zfl0EDeWUuZluOsAKj19wY/A2c8ljT 4DoUYLa781tD873KtJxlZ2pCtxByajMxMLK8OQEwTc9mq3+x2zizvp5X5sFc1RXVXq2N PlFGa08pGOnxDCxJKX+DD/SGm7fVgw2i0vbNucb4BdxaiKMN5MLC+LAZDexHu40PjCNY 3Lsg== X-Gm-Message-State: AOJu0Yyd9ZdlUQ6Gt/n0srRd2JLuLgGohfS39M1Oa2XAY7DAKMmVOgu0 x/GKDHUFziVLA94cHLLqmp4= X-Received: by 2002:a50:ff10:0:b0:53d:a7d9:5149 with SMTP id a16-20020a50ff10000000b0053da7d95149mr10863567edu.6.1700215732251; Fri, 17 Nov 2023 02:08:52 -0800 (PST) Received: from fedora.. (dh207-97-146.xnet.hr. [88.207.97.146]) by smtp.googlemail.com with ESMTPSA id n26-20020a056402061a00b0054358525a5bsm554368edv.62.2023.11.17.02.08.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 02:08:51 -0800 (PST) From: Robert Marko To: andrew@lunn.ch, hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, ansuelsmth@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Robert Marko Subject: [PATCH 2/2] net: phy: aquantia: enable USXGMII autoneg on AQR107 Date: Fri, 17 Nov 2023 11:05:05 +0100 Message-ID: <20231117100848.424372-2-robimarko@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231117100848.424372-1-robimarko@gmail.com> References: <20231117100848.424372-1-robimarko@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 17 Nov 2023 02:09:24 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782805447229062788 X-GMAIL-MSGID: 1782805447229062788 In case USXGMII is being used as the PHY interface mode then USXGMII autoneg must be enabled as well. HW defaults to USXGMII autoneg being disabled which then results in autoneg timeout, so enable it in case USXGMII is used. Signed-off-by: Robert Marko --- drivers/net/phy/aquantia/aquantia_main.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/net/phy/aquantia/aquantia_main.c b/drivers/net/phy/aquantia/aquantia_main.c index 7711e052e737..c602873052a0 100644 --- a/drivers/net/phy/aquantia/aquantia_main.c +++ b/drivers/net/phy/aquantia/aquantia_main.c @@ -26,6 +26,9 @@ #define PHY_ID_AQR412 0x03a1b712 #define PHY_ID_AQR113C 0x31c31c12 +#define MDIO_PHYXS_XAUI_RX_VEND2 0xc441 +#define MDIO_PHYXS_XAUI_RX_VEND2_USX_AUTONEG_EN BIT(3) + #define MDIO_PHYXS_VEND_IF_STATUS 0xe812 #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_MASK GENMASK(7, 3) #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_KR 0 @@ -545,6 +548,15 @@ static int aqr107_config_init(struct phy_device *phydev) aqr107_validate_mode(phydev, phydev->interface); + if (phydev->interface == PHY_INTERFACE_MODE_USXGMII) { + ret = phy_modify_mmd(phydev, MDIO_MMD_PHYXS, + MDIO_PHYXS_XAUI_RX_VEND2, + MDIO_PHYXS_XAUI_RX_VEND2_USX_AUTONEG_EN, + MDIO_PHYXS_XAUI_RX_VEND2_USX_AUTONEG_EN); + if (ret) + return ret; + } + return aqr107_set_downshift(phydev, MDIO_AN_VEND_PROV_DOWNSHIFT_DFLT); }