netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arun Parameswaran <aparames@broadcom.com>
To: Ben Hutchings <ben@decadent.org.uk>
Cc: Ben Hutchings <bwh@kernel.org>, <netdev@vger.kernel.org>,
	<jdzheng@broadcom.com>, <aparames@broadcom.com>
Subject: Re: [PATCH 0/2] Fix couple of issues with 'ethtool' get/set API's
Date: Mon, 1 Jun 2015 10:14:11 -0700	[thread overview]
Message-ID: <556C92E3.3030707@broadcom.com> (raw)
In-Reply-To: <1433102379.6319.110.camel@decadent.org.uk>

On 15-05-31 12:59 PM, Ben Hutchings wrote:
> On Fri, 2015-05-22 at 15:43 -0700, Arun Parameswaran wrote:
>> Hi,
>> The patch fixes 2 issues with 'ethtool' getting/setting parametres in
>> the do_gset() do_sset() API's.
>>
>> I have pushed a patch to the Kernel to fix an issue in the handling of
>> the 'ethtool' commands which got accepted.
>> This Kernel patch was based on Linux v4.1-rc4 and is available in:
>> https://github.com/Broadcom/cygnus-linux/tree/net-core-ethtool-fix-v1
>>
>> The Kernel was always clearing the command from the 'ethtool' resulting
>> in all operations to deal with PHY0. This prevents querying/setting
>> PHY 1's settings.
> [...]
> 
> Each net device can be associated with a single PHY at a time, and the
> ETHTOOL_GSET implementation should fill in the PHY address in the
> ethtool_cmd::phy_address field.  Where there are multiple PHYs that can
> be connected to the net device's MAC, an ETHTOOL_SSET operation can be
> used to change that PHY address.
> 
The above can be done by the driver when there is one PHY per MAC. In our
case we have multiple PHYs controlled by the same MAC. I should have
clarified this earlier, I apologize.

When we specify the 'phyad', in the command line, we were expecting the
'ethtool' to fetch/set data for that 'phyad'. This is the intend of the
patch.

With the patch (in 'ethtool' and Kernel), if 'phyad' is not specified, it
will still function as you described above, it will be up to the driver to
return the proper 'phyad' and related settings.

> The ethtool API is not meant for controlling other PHYs that aren't
> connected to the MAC; if you want to do that then create more net
> devices for them or use the MDIO ioctls.
> 
In the SoC, there are multiple PHYs (in our case there are 2) controlled
by the same MAC. We are trying to use 'ethtool' to control both the PHYs
connected to the same MAC.

> 
> Ben.
> 

Thanks
Arun

  reply	other threads:[~2015-06-01 17:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-22 22:43 [PATCH 0/2] Fix couple of issues with 'ethtool' get/set API's Arun Parameswaran
2015-05-22 22:43 ` [PATCH 1/2] ethtool: Clear the command data structure before sending requests Arun Parameswaran
2015-05-22 22:43 ` [PATCH 2/2] ethtool: Fix an issue with handling 'phyad' while updating settings Arun Parameswaran
2015-05-31 19:59 ` [PATCH 0/2] Fix couple of issues with 'ethtool' get/set API's Ben Hutchings
2015-06-01 17:14   ` Arun Parameswaran [this message]
2015-06-01 18:07     ` Ben Hutchings
2015-06-01 19:12       ` Arun Parameswaran
2015-06-01 19:29         ` Ben Hutchings
2015-06-01 21:00           ` Arun Parameswaran
2015-06-01 21:39           ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=556C92E3.3030707@broadcom.com \
    --to=aparames@broadcom.com \
    --cc=ben@decadent.org.uk \
    --cc=bwh@kernel.org \
    --cc=jdzheng@broadcom.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).