netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tom Lendacky <thomas.lendacky@amd.com>
To: netdev <netdev@vger.kernel.org>, Florian Fainelli <f.fainelli@gmail.com>
Cc: David Miller <davem@davemloft.net>
Subject: Question about settings array in phy.c
Date: Fri, 11 Jul 2014 10:50:59 -0500	[thread overview]
Message-ID: <53C007E3.4010009@amd.com> (raw)

In drivers/net/phy/phy.c there is an array of struct phy_setting named
settings that is used when auto negotiation is disabled to sanitize
the phy settings.  This array uses only *baseT* features for validating
the various speed/duplex combinations.  This may result in not finding
the correct array entry in regards to speed and duplex if the *baseT*
feature is not supported.

For example, a 10GbE phy that supports KR mode would end up not matching
an entry and defaulting to the last entry of the array (SPEED_10 and
DUPLEX_HALF) which is not what is desired.

Is it appropriate to be able to extend this array?  Either by adding
additional array entries or extending the "setting" to include other
features?  Or is there a specific reason that only the *baseT* values
are used?

Examples of changing the array:

   Add a new entry
	{
		.speed = SPEED_10000,
		.duplex = DUPLEX_FULL,
		.setting = SUPPORTED_10000baseKR_Full,
	},

   or extend current entry
	{
		.speed = SPEED_10000,
		.duplex = DUPLEX_FULL,
		.setting = SUPPORTED_10000baseT_Full |
			   SUPPORTED_10000baseKR_Full,
	},

Thanks,
Tom

             reply	other threads:[~2014-07-11 15:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-11 15:50 Tom Lendacky [this message]
2014-07-11 17:21 ` Question about settings array in phy.c Florian Fainelli

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=53C007E3.4010009@amd.com \
    --to=thomas.lendacky@amd.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.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).