netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chaitanya Lala <clala@riverbed.com>
To: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Cc: Linux Network Development list <netdev@vger.kernel.org>,
	Arthur Jones <ajones@riverbed.com>
Subject: How to configure MDI status per port
Date: Wed, 10 Jun 2009 21:19:22 -0700	[thread overview]
Message-ID: <4A3085CA.2000300@riverbed.com> (raw)

Hi,

I have a requirement to be able to configure/change the default MDI-X 
status of each ethernet port. This should be possible on a per port 
basis i.e. it should be possible to configure, say, port 0 to auto mdi-x 
mode & port 1 to manual MDI-X mode. A couple of possible implementation 
strategies could achieve this but both have some problems. Following is 
an overview of the two.

1.) Use a module parameter. Pass an array of values, each value 
corresponding to ethernet port supported by the driver. For example, 
modprobe e1000e mdix_values=1,0,2,0 (where the numbers 0,1 & 2 represent 
auto MDI-X, manual MDI  & manual MDI-X modes respectively) assigns value 
1 for port 0, 0 for port 1, 2 for port 2 and so on. This value can be 
assigned to the mdix parameter (member of the e1000_phy_info structure 
in the case of e1000e driver) in the probe routine. The problem here is 
how to map the ordered list of numbers to the ethernet ports so that 
each number in the list always corresponds to the same ethernet 
interface. I assume that the order of enumeration of ethernet ports can 
change based on changes to the system topology, i.e. plugging/pulling of 
additional NIC cards.

2.) Using ethtool and each driver sets the value in its set_settings 
function (part of the ethtool operations structure). The value received 
for each port can be assigned to the mdix parameter (member of the 
e1000_phy_info structure in the case of e1000e driver) but the problem 
is that the value is useful iff it is assigned before the probe routine 
is invoked, because the settings in the chip registers are done only at 
probe time. Is there a way to change this value and have it take effect 
when changed by ethtool?

Any other ideas are most welcome.

Thanks,
Chaitanya

             reply	other threads:[~2009-06-11  4:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-11  4:19 Chaitanya Lala [this message]
2009-07-01  0:32 ` How to configure MDI status per port Jeff Kirsher

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=4A3085CA.2000300@riverbed.com \
    --to=clala@riverbed.com \
    --cc=ajones@riverbed.com \
    --cc=jeffrey.t.kirsher@intel.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).