Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1563733ybe; Mon, 2 Sep 2019 23:45:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqwqvwiayYY0YoeyDdPXosUUdfYETvh2fIxSUUsqsXtP1XF6eBA2Dj3QkagNIl9D5z6j86yx X-Received: by 2002:a62:86cf:: with SMTP id x198mr15552787pfd.234.1567493159350; Mon, 02 Sep 2019 23:45:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567493159; cv=none; d=google.com; s=arc-20160816; b=wTFyLb0ks32OppfS8K0OUA0JUu77VdxjTE7QWoWXWUTy4trvgTsLR7ZICId/cH9sRV IGbkxHYIT1WXbqVoqCjRz7gbBkE779TiCOBw6VjqrjZjV+hTi5KBI/fyTYz1ZYft2/va GjzeV11HJoShbBo7E0LUKir5yHEdkcDp1Gm7ZQabONapzOzg21LtZHoZil3AEjyVnjMb dDgGccWQU0E2iFCvZ/NkC0TJO/DtD0vxmKafkUm1tC2Ahi+PA/JCcekB5hI2d2LRruIY djXCvQDiAOo+pph99b2kERj9T1bLPXGR+gNiHhLk27UOv7MrsR+iSHU5gNJ+7ub98pGK Gj6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=eLRHaMm5B6DSKtBXOKSlfBnVpYhlS9Wrwjo0dsWl554=; b=nAcQugtcVdt2n16idz9dyZ43Nqg0gTGzgni3/FhPpkCtv7uNSjv7M4WHtj45Y/4oXE YPw7Hcnu5LzHtavdVVY4fpfYy0xd2Mxye0uYX9npGGn3tc9B5n7Arc59hB1LE8EgHc40 TsO+gbWDt1ODtsT2+btjGSl/vc/5+h08Gb2ag/yyQ4uTINZy9iu+leU5BDvQbdYr2FeQ 3lrPpzG6ALDybYON3Md9bCM/GdazxYVqzq48gVFqesBOqdr7I1lP6I8SKGbX5rCFTzNM hE/0L+LfD8KEhHgcTtEQusuihObHPIMZgR7v8/7VOS7RyN719mEKHq9fMIg78bKeeGDD ftkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=X1VieKiI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id z2si13281219pgv.417.2019.09.02.23.45.42; Mon, 02 Sep 2019 23:45:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=X1VieKiI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726958AbfICGox (ORCPT + 99 others); Tue, 3 Sep 2019 02:44:53 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:35615 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725956AbfICGow (ORCPT ); Tue, 3 Sep 2019 02:44:52 -0400 Received: by mail-wr1-f66.google.com with SMTP id g7so16139710wrx.2; Mon, 02 Sep 2019 23:44:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=eLRHaMm5B6DSKtBXOKSlfBnVpYhlS9Wrwjo0dsWl554=; b=X1VieKiIW2+c25kqAeFrDvYt7EmjVEd8Tmz/+8Y5rn6/kk3AvXWpSrLq82nzgX3aSp Pxi9+vvsDdF/bX0jIy5Ms11O1blGFPRTxKY861UecdyxJpbcIui+xg8QMEtr4zd4SIsN 39YRwUO9eFxBb4AFHlSth9agDY1QbMUbuW96obGsHwB1Ppt7j/mM8VJ0GB2gw1Z+BRD0 o8OAHfsSQRxwv8gPtJCyYl4VO+3kyFbKSfzoWBHqHze2fhS8CbzB+t4plEsfe/VfKRXN kGbXtJKhCQZmHhaUNJqwip4Ch9Uk05YTJt/zhS675PrQbktWViFA6J2zJHeuBt4esFE4 yYDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=eLRHaMm5B6DSKtBXOKSlfBnVpYhlS9Wrwjo0dsWl554=; b=lW5IYCdVtMa1Xd5osHH3nhO1lkkJGb0NG26HP8jXn08GNi9z5yRlQtL1qbBpjQLOCr 7/kwrlsKbi1H5BFvMdR9nvCxg88kJiQ3YZj6Z4Jru7I4sGS96ghWZ6E863FdahpH7NFR XiX2eVPnELfwepJyA6PZ7Xq5LHamiLvjVKI7uEbY+TrqVIniIOmgkc+xMWvC4UOCGXbE pMKtRHavU0X3gL7GbcI1Po2xvNomU5Z+PjccHa/odC3hguNsZngprez6J8KI8mQg3ix0 DSH7J8ytGX3KCHkmF40gq22XfRTxReJn11wiNVaiwAMsAHUQyB9Jwmqvu6Ae6OSW0FaL MFlw== X-Gm-Message-State: APjAAAXqNk3cpRndKFN4ngHzNJbG7FeD2raZu9COTlgkNsz4qbQSi9dy 8pV/cpod9QNEWkcT4DW3/MIyQShs X-Received: by 2002:a5d:5612:: with SMTP id l18mr23176354wrv.177.1567493090192; Mon, 02 Sep 2019 23:44:50 -0700 (PDT) Received: from ?IPv6:2003:ea:8f04:7c00:f018:f11c:b684:4652? (p200300EA8F047C00F018F11CB6844652.dip0.t-ipconnect.de. [2003:ea:8f04:7c00:f018:f11c:b684:4652]) by smtp.googlemail.com with ESMTPSA id g201sm19148197wmg.34.2019.09.02.23.44.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Sep 2019 23:44:49 -0700 (PDT) Subject: Re: [PATCH net-next] r8152: modify rtl8152_set_speed function To: Hayes Wang , "netdev@vger.kernel.org" Cc: nic_swsd , "linux-kernel@vger.kernel.org" References: <1394712342-15778-326-Taiwan-albertk@realtek.com> <280e6a3d-c6c3-ef32-a65d-19566190a1d3@gmail.com> <0835B3720019904CB8F7AA43166CEEB2F18DAB41@RTITMBSVM03.realtek.com.tw> <0835B3720019904CB8F7AA43166CEEB2F18DACE1@RTITMBSVM03.realtek.com.tw> From: Heiner Kallweit Message-ID: <56675c6b-c792-245e-54d0-eacd50e7a139@gmail.com> Date: Tue, 3 Sep 2019 08:44:44 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <0835B3720019904CB8F7AA43166CEEB2F18DACE1@RTITMBSVM03.realtek.com.tw> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03.09.2019 08:36, Hayes Wang wrote: > Heiner Kallweit [mailto:hkallweit1@gmail.com] >> Sent: Tuesday, September 03, 2019 2:14 PM > [...] >>>> Seeing all this code it might be a good idea to switch this driver >>>> to phylib, similar to what I did with r8169 some time ago. >>> >>> It is too complex to be completed for me at the moment. >>> If this patch is unacceptable, I would submit other >>> patches first. Thanks. >>> >> My remark isn't directly related to your patch and wasn't >> meant as an immediate ToDo. It's just a hint, because I think >> using phylib could help to significantly simplify the driver. > > I would schedule this in my work. Maybe I finish submitting > the other patches later. > > Besides, I have a question. I think I don't need rtl8152_set_speed() > if I implement phylib. However, I need to record some information > according to the settings of speed. For now, I do it in rtl8152_set_speed(). > Do you have any idea about how I should do it with phylib without > rtl8152_set_speed()? > When saying "record some information", what kind of information? The speed itself is stored in struct phy_device, if you need to adjust certain chip settings depending on negotiated speed, then you can do this in a callback (parameter handler of phy_connect_direct). See e.g. r8169_phylink_handler() > Best Regards, > Hayes > > Heiner