Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp893027ybl; Tue, 13 Aug 2019 04:22:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqyDghicXOa7yItJ1DcYtlgz6J2Fi2Ls7k3TaWP5zKl9eLc6/y8uGQq6NXLEXlgWJ4N7cm5B X-Received: by 2002:a65:6546:: with SMTP id a6mr35193895pgw.220.1565695364393; Tue, 13 Aug 2019 04:22:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565695364; cv=none; d=google.com; s=arc-20160816; b=R8Xeb74sgEbBRSGzw8fqU3rVS15vh5aS8ymlVspUIR5iAqjs0xE6VjzrXVax+l6Mwf zAk4Hh3nMZ9RGt2kjbaVbJxRjs3/sLUFlTxos/jPQSqav22cLT2cJnBvG9p241ztZwzD OPRIfve2afryGjNLo7yw3ga5kO0r8RFo46g1A20jIcgYdcoMbtpwA9LgyxpZkN0Fb0WD OPv9Z76Jyt/1bVLSt038PXtORDhr3RTO4SOQn8fuZC2V4PgkyNkhBWN2+tt4JPoPi4Eb CrAClpLdZVcoShcXQb9ZED8PVJFPaKZGc8MCIF78jbWr1o5Z7sSVSioM9Shf0071mcDf ygZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=fpL8tgOC7LhjHn63gsTa4JL9oUa9w1GDwbaAmgEP2eo=; b=a0jc2LePKhFheF6oZi6jyGdlRVy/qRCX0IPg1ttGTHPRWbaVTgV/fdCSWWehDaKB7C Ccg+j+nlf6QLo17DGgHjXIKcWKYB6DhFHVlFXBdxNW6h8Wr4Bpgr9Uro1pJwS6vk5PyS ip9OuE4Nk/y7z4U08Djf+j10PTm0WjK7HossAUhHfGBiGqaQCgK/R37l1qgFqOlPeQZ2 Imskoc1TvZARSTZ3mzNf1ZuAHg9fTCDgCr10m+nHnSnfotj2Rh4CzpzoMgYp6meYVeMd ztIEa9G1vOjASRwUgrcFPKQS2OjnXs4y+CV/2ML3mRyGMV9I969zsMKbdy6qfzrddhAo WYqQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t24si64639701pgu.221.2019.08.13.04.22.28; Tue, 13 Aug 2019 04:22:44 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727223AbfHMLQw (ORCPT + 99 others); Tue, 13 Aug 2019 07:16:52 -0400 Received: from mail-yb1-f195.google.com ([209.85.219.195]:43928 "EHLO mail-yb1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726026AbfHMLQw (ORCPT ); Tue, 13 Aug 2019 07:16:52 -0400 Received: by mail-yb1-f195.google.com with SMTP id o82so7998346ybg.10; Tue, 13 Aug 2019 04:16:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fpL8tgOC7LhjHn63gsTa4JL9oUa9w1GDwbaAmgEP2eo=; b=snBotTZ38Vl4tuBBLQTXq8oZVjEdhV3Yz6uIoWUcnqrI61cP3Iie+j6R7kMW0dfrwF z++0tDZSYyBoPiV7CQgnyUS1BksZsj0gV5uof87LcPoiMBdlEhTFRzwmSlZ1zllSha5U p5UmvL0ET1ZknYLNvW4dJ3iw6odIF+yjRKkiflkT1OhrRBAzg1aZpzuu4T5Z2OImmOMH Izpv6MZoTrooJA2cP0Qv6lSIxvJQkjEd8mf2XgUBNX9CIvTW3Ojr3swUwjnKgeTUWlS3 mzj466D5sGLdSJ074ztXvIbpwm8feRPuDn+qcRcmGnfIujoxoNch4jOIQaP0uzzO74Qf Leng== X-Gm-Message-State: APjAAAVURlC1C+VdtkaTr05jI3opO8La+hxMoF0UCADj3d+jlmUscaqb iakQ0lsX4d5Am81MCqptLTT9lvmprfcPmB3bq50= X-Received: by 2002:a25:5f06:: with SMTP id t6mr26379839ybb.325.1565695011491; Tue, 13 Aug 2019 04:16:51 -0700 (PDT) MIME-Version: 1.0 References: <1564565779-29537-1-git-send-email-harini.katakam@xilinx.com> <1564565779-29537-3-git-send-email-harini.katakam@xilinx.com> <20190801040648.GJ2713@lunn.ch> In-Reply-To: <20190801040648.GJ2713@lunn.ch> From: Harini Katakam Date: Tue, 13 Aug 2019 16:46:40 +0530 Message-ID: Subject: Re: [PATCH 2/2] net: gmii2rgmii: Switch priv field in mdio device structure To: Andrew Lunn Cc: Harini Katakam , Florian Fainelli , Heiner Kallweit , David Miller , Michal Simek , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, radhey.shyam.pandey@xilinx.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andrew, On Thu, Aug 1, 2019 at 9:36 AM Andrew Lunn wrote: > > On Wed, Jul 31, 2019 at 03:06:19PM +0530, Harini Katakam wrote: > > Use the priv field in mdio device structure instead of the one in > > phy device structure. The phy device priv field may be used by the > > external phy driver and should not be overwritten. > > Hi Harini > > I _think_ you could use dev_set_drvdata(&mdiodev->dev) in xgmiitorgmii_probe() and > dev_get_drvdata(&phydev->mdiomdio.dev) in _read_status() Thanks for the review. This works if I do: dev_set_drvdata(&priv->phy_dev->mdio.dev->dev) in probe and then dev_get_drvdata(&phydev->mdio.dev) in _read_status() i.e mdiodev in gmii2rgmii probe and priv->phy_dev->mdio are not the same. If this is acceptable, I can send a v2. Regards, Harini