Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2580237pxb; Tue, 13 Apr 2021 05:32:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhZl5UE73gm9HcEQmrP8tjOAZP3ZTNGRO5TrUdpuZmRBod6zgXL8/pLQcVq8Gpt75wTUbQ X-Received: by 2002:a17:906:d81:: with SMTP id m1mr1934059eji.105.1618317152052; Tue, 13 Apr 2021 05:32:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618317152; cv=none; d=google.com; s=arc-20160816; b=TldyCtkI860jobT4shpEOb/38CwATJRoVSqhDnR1rBdx5qllM9rB1sfyNPvGbJip/7 gyoauDLJ7EZvG5WF/pRV/pDonkfWOnEfGdiQgoqOIhuTf0a6W/VdxXuJMEXcVC83xmZL DcLeiOnp+2wh1JbDEn4Hs2hUKX4XoGol1o35oulhiWD69vKxhySu0JVQFD5wJXtqCHYX iLcHuPImVdtFAIr7jUgAw5l9IqkC8Tmuq65J2550r4GkI4iT5qr++BuvuRX/yCvvTDv3 +aM1NmKjdQ54vMwAtPYTdSXNMAZ1CyMEsUru34W4x21TbU2h7lPE3kNscbP4TC+MYkgG BAUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-disposition :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=MMUmn5mABVsgrfWlibL4nmwnAT3Kpef8pz6y5TktZjk=; b=eD0sf7zZIVjRUkeYqY6tX8OhjxJacVCU50QC+1V8JWxI7iYQujE9F62o8MwllRwClM 1nxcmfXiqeXhhBMjfNsl7vUnQ9A90AsWsWYvfPvWypDNm3DReQO3WqIXwOx2JTBt0I2j wu9hb0gqyT1uJn7+1nzipB/AFe3M4SY8FOA56xHc2QaxGqspvYUAAyf8gAZEnysbBMRr VyN9veawlJBl1pSoCfMfHZCqB64CUEpitNapBHeJUWbzN8/rmIU9Cg8KhdnWpf1npQzH oo994gUSOFxrEmhaoLSBQp+3R7VgwYpXSw23yn2fZo2wr4vuh2APwYDjgVz1A87lUwOX maKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ys9jkndz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w16si10032140edd.471.2021.04.13.05.32.08; Tue, 13 Apr 2021 05:32:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ys9jkndz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344412AbhDMD7z (ORCPT + 99 others); Mon, 12 Apr 2021 23:59:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229564AbhDMD7x (ORCPT ); Mon, 12 Apr 2021 23:59:53 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4FFFC061574; Mon, 12 Apr 2021 20:59:32 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id ot17-20020a17090b3b51b0290109c9ac3c34so9998367pjb.4; Mon, 12 Apr 2021 20:59:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-disposition:content-transfer-encoding; bh=MMUmn5mABVsgrfWlibL4nmwnAT3Kpef8pz6y5TktZjk=; b=Ys9jkndzAW5uBB7GfhA/tsOayE/UE2BtjjEmlkCxMxIaFyKY9MFSTgxpxWfdxDk5h6 4GWMRa1At+rbawl7r+Z1ypxff05XvHVP6FJk0rUwuZvpu7oHxR+zRcgQTNvQ5c0zIaDl 8zGjUvzQzTebIuUXkQQJtgi2n3hrI2nMtG7ol1GcxV4Yi5T7hMrrLyU/uTne4QGBGugO m3Y2Ytu/ygqr53ax/sTz7JOBmqyJGoeegcv3N/XzUsjXfVnMz7S+aEA98LgmOUO/mHrP LcQuUXLYbgSbQ+lkHAY2DGQLleHBdh18anpWTWfuYc2fxLb5YxO77/JoFn32/4foikjV 4yJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-disposition :content-transfer-encoding; bh=MMUmn5mABVsgrfWlibL4nmwnAT3Kpef8pz6y5TktZjk=; b=McinsoHSu61UhEBu78fkTB09YALH63tw+V1Ok+aN180zT2deuBaeS8nAg4gzWBkcuu CuTRrf5lFPaHtYVpMgjErVqVNcjS7DKJdmBv/tD5scEExArxks8iu+UbwXSwWpnpl0Au FEF2hRTois5U6cv3UvEDq5/WRmC9S21AWVDUIt+fupwdScP4/uHWnXkDxeotLHYgWO1Y LEp2ydWq8+K4ItaL8rMoZSzhzyDft6Ot2Mx0ktUcW/dExOjYhKwBIFrytRbTH9/DNFMB knKSB16fwh2fwRmcDPeWY9AYAoDR0G8jO3+CxOa5AMBNXqqabyswVibUlJXYenrSIc6u Xj4w== X-Gm-Message-State: AOAM5336Fbr/7unQrOgJFMewC+d3UomMTdcYGyfq5VH5T6yrRu1SAkEq nYGiFlOSAHZy/vVhyJ4YzH0= X-Received: by 2002:a17:90a:7bce:: with SMTP id d14mr2751340pjl.139.1618286371967; Mon, 12 Apr 2021 20:59:31 -0700 (PDT) Received: from localhost.localdomain ([138.197.212.246]) by smtp.gmail.com with ESMTPSA id 67sm11110165pfy.140.2021.04.12.20.59.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Apr 2021 20:59:31 -0700 (PDT) From: DENG Qingfang To: =?iso-8859-1?Q?Ren=E9?= van Dorst Cc: "David S. Miller" , Andrew Lunn , Florian Fainelli , Heiner Kallweit , Jakub Kicinski , Landen Chao , Matthias Brugger , Russell King , Sean Wang , Vivien Didelot , Vladimir Oltean , Rob Herring , Linus Walleij , Greg Kroah-Hartman , Sergio Paracuellos , linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-staging@lists.linux.dev, devicetree@vger.kernel.org, netdev@vger.kernel.org, Weijie Gao , Chuanhong Guo , Frank Wunderlich , Thomas Gleixner , Marc Zyngier Subject: Re: [RFC v4 net-next 1/4] net: phy: add MediaTek PHY driver Date: Tue, 13 Apr 2021 11:59:20 +0800 Message-Id: <20210413035920.1422364-1-dqfext@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210412150836.929610-1-dqfext@gmail.com> References: <20210412034237.2473017-1-dqfext@gmail.com> <20210412034237.2473017-2-dqfext@gmail.com> <20210412070449.Horde.wg9CWXW8V9o0P-heKYtQpVh@www.vdorst.com> <20210412150836.929610-1-dqfext@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 12, 2021 at 11:08:36PM +0800, DENG Qingfang wrote: > On Mon, Apr 12, 2021 at 07:04:49AM +0000, Ren? van Dorst wrote: > > Hi Qingfang, > > > +static void mtk_phy_config_init(struct phy_device *phydev) > > > +{ > > > + /* Disable EEE */ > > > + phy_write_mmd(phydev, MDIO_MMD_AN, MDIO_AN_EEE_ADV, 0); > > > > For my EEE patch I changed this line to: > > > > genphy_config_eee_advert(phydev); > > > > So PHY EEE part is setup properly at boot, instead enable it manual via > > ethtool. > > This function also takes the DTS parameters "eee-broken-xxxx" in to account > > while > > setting-up the PHY. > > Thanks, I'm now testing with it. Hi Rene, Within 12 hours, I got some spontaneous link down/ups when EEE is enabled: [16334.236233] mt7530 mdio-bus:1f wan: Link is Down [16334.241340] br-lan: port 3(wan) entered disabled state [16337.355988] mt7530 mdio-bus:1f wan: Link is Up - 1Gbps/Full - flow control rx/tx [16337.363468] br-lan: port 3(wan) entered blocking state [16337.368638] br-lan: port 3(wan) entered forwarding state The cable is a 30m Cat.6 and never has such issue when EEE is disabled. Perhaps WAKEUP_TIME_1000/100 or some PHY registers need to be fine-tuned, but for now I think it should be disabled by default. > > > > > > + > > > + /* Enable HW auto downshift */ > > > + phy_modify_paged(phydev, MTK_PHY_PAGE_EXTENDED, 0x14, 0, BIT(4));