From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4FF7C5B578 for ; Wed, 3 Jul 2019 22:56:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8E5B620645 for ; Wed, 3 Jul 2019 22:56:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="YpKWoSeo" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727395AbfGCW4w (ORCPT ); Wed, 3 Jul 2019 18:56:52 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:35358 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726902AbfGCW4w (ORCPT ); Wed, 3 Jul 2019 18:56:52 -0400 Received: by mail-pg1-f195.google.com with SMTP id s27so1940895pgl.2 for ; Wed, 03 Jul 2019 15:56:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=PRnPC62JX/RoJO2/m7GOKXtEfYdUUSzelwP+KhPJ16w=; b=YpKWoSeoP8mPpxkQgnQZglfCx5jnSJdY1jiKYlL+sUIb0OfW4xqnmRkLdMNjT2NTwz 9MQiJoHu40bDZPvu2VldqFTU3rT3DdBHClvwtFqkBXx8+WGhIzttsMK29A/5Zkeyrp6U 20YtqOCnf4UR+BIpkiNdJVXqHbtmuquinMAQ8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=PRnPC62JX/RoJO2/m7GOKXtEfYdUUSzelwP+KhPJ16w=; b=d3ZJOfqYHdSeyWVKEsrZ9nLeALcYUrsYBdtVrmSPgMI++slPLAATvddSz5r6ZTZB7x DnKOdVUSbFd9QhcbFBVHh4ULrZm6SJXgZkCwauD7nG10F7ernk05PqXkpPO2LfselKsh XmpWgvHzGQVNawKKHcGgZE55qBngox375SV5rIsYDEvJETs5dhW3BARXFx8eWJNOOnXx vPq6iV6S+QaMzl6jqryOa3oiO3lrKb6JDG+ZXskCdAoYL4zJNGgFaho15DW1avQKBcUq w7LOnyvtT1QsFvaUX34eCvhwSuWmDuIliZXEMtMABtKFgWBeBhrOwOVMxganZe7fW3rw pBVQ== X-Gm-Message-State: APjAAAUdATLPeV4cWTF1na5wwnHhEYruHmDib9kRfRLZqOHGJKAoqO3G H9gV0wkAYYrjVtWxgcIARvDgoZjcRQc= X-Google-Smtp-Source: APXvYqyvAYsxwYDLVdbBmZDOVqaTqouGlL7BWOuPZ+HJcoLd2cmjndbKZyf58r/rkf0fKUu0eYY6LA== X-Received: by 2002:a17:90a:2190:: with SMTP id q16mr15114510pjc.23.1562194611721; Wed, 03 Jul 2019 15:56:51 -0700 (PDT) Received: from localhost ([2620:15c:202:1:75a:3f6e:21d:9374]) by smtp.gmail.com with ESMTPSA id d187sm3427000pfa.38.2019.07.03.15.56.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jul 2019 15:56:50 -0700 (PDT) Date: Wed, 3 Jul 2019 15:56:48 -0700 From: Matthias Kaehlcke To: Heiner Kallweit Cc: "David S . Miller" , Rob Herring , Mark Rutland , Andrew Lunn , Florian Fainelli , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Douglas Anderson Subject: Re: [PATCH v2 4/7] net: phy: realtek: Enable accessing RTL8211E extension pages Message-ID: <20190703225648.GK250418@google.com> References: <20190703193724.246854-1-mka@chromium.org> <20190703193724.246854-4-mka@chromium.org> <20190703203650.GF250418@google.com> <98326ec2-6e90-fd3a-32f5-cf0db26c31a9@gmail.com> <20190703212407.GI250418@google.com> <3e47639a-bbbb-f438-bc66-a29423090e95@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <3e47639a-bbbb-f438-bc66-a29423090e95@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 03, 2019 at 11:27:41PM +0200, Heiner Kallweit wrote: > On 03.07.2019 23:24, Matthias Kaehlcke wrote: > > On Wed, Jul 03, 2019 at 11:01:09PM +0200, Heiner Kallweit wrote: > >> On 03.07.2019 22:36, Matthias Kaehlcke wrote: > >>> On Wed, Jul 03, 2019 at 10:12:12PM +0200, Heiner Kallweit wrote: > >>>> On 03.07.2019 21:37, Matthias Kaehlcke wrote: > >>>>> The RTL8211E has extension pages, which can be accessed after > >>>>> selecting a page through a custom method. Add a function to > >>>>> modify bits in a register of an extension page and a helper for > >>>>> selecting an ext page. > >>>>> > >>>>> rtl8211e_modify_ext_paged() is inspired by its counterpart > >>>>> phy_modify_paged(). > >>>>> > >>>>> Signed-off-by: Matthias Kaehlcke > >>>>> --- > >>>>> Changes in v2: > >>>>> - assign .read/write_page handlers for RTL8211E > >>>> > >>>> Maybe this was planned, but it's not part of the patch. > >>> > >>> Oops, it was definitely there when I tested ... I guess this got > >>> somehow lost when changing the patch order and resolving minor > >>> conflicts, seems like I only build tested after that :/ > >>> > >> RTL8211E also supports normal pages (reg 0x1f = page). > >> See e.g. rtl8168e_2_hw_phy_config in the r8169 driver, this network > >> chip has an integrated RTL8211E PHY. There settings on page 3 and 5 > >> are done. > >> Therefore I would prefer to use .read/write_page for normal paging > >> in all Realtek PHY drivers. Means the code here would remain as it > >> is and just the changelog would need to be fixed. > > > > Do I understand correctly that you suggest an additional patch that > > assigns .read/write_page() for all entries of realtek_drvs? > > > > No, basically all the Realtek PHY drivers use the following already: > .read_page = rtl821x_read_page, > .write_page = rtl821x_write_page, > What I mean is that this should stay as it is, and not be overwritten > with the extended paging. I now see the source of our/my misunderstanding. I'm working on a 4.19 kernel, which doesn't have your recent patch: commit daf3ddbe11a2ff74c95bc814df8e5fe3201b4cb5 Author: Heiner Kallweit Date: Fri May 10 22:11:26 2019 +0200 net: phy: realtek: add missing page operations That's what I intended to do for RTL8211E, no need to overwrite it with the extended paging. Thanks Matthias