From: Ben Hutchings <bhutchings@solarflare.com>
To: Jesse Brandeburg <jesse.brandeburg@intel.com>
Cc: <netdev@vger.kernel.org>
Subject: Re: [RFC NET-NEXT PATCH 4/6] e1000: configure and read MDI settings
Date: Wed, 25 Jul 2012 23:41:03 +0100 [thread overview]
Message-ID: <1343256063.5132.149.camel@deadeye.wl.decadent.org.uk> (raw)
In-Reply-To: <20120725180020.9995.32923.stgit@jbrandeb-snb.jf.intel.com>
On Wed, 2012-07-25 at 11:00 -0700, Jesse Brandeburg wrote:
> this is the implementation in e1000 to allow ethtool to force
> MDI state, allowing users to work around some improperly
> behaving switches.
>
> forcing in this driver is for now only allowed when auto-neg is enabled.
>
> to use must have the matching version of ethtool app that supports
> this functionality.
[...]
> --- a/drivers/net/ethernet/intel/e1000/e1000_main.c
> +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
> @@ -4939,6 +4939,10 @@ int e1000_set_spd_dplx(struct e1000_adapter *adapter, u32 spd, u8 dplx)
> default:
> goto err_inval;
> }
> +
> + /* clear MDI, MDI(-X) override is only allowed when autoneg enabled */
> + hw->mdix = AUTO_ALL_MODES;
You will translate AUTO_ALL_MODES to ETH_TP_MDI_AUTO in
e1000_get_settings, and then treat that as an error in
e1000_set_settings if hw->media_type != e1000_media_type_copper. So,
does this assignment need to be conditional on hw->media_type ==
e1000_media_type_copper?
Ben.
> return 0;
>
> err_inval:
>
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
next prev parent reply other threads:[~2012-07-25 22:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-25 17:59 [RFC NET-NEXT PATCH 0/6] implement MDI-X set support in Intel drivers Jesse Brandeburg
2012-07-25 18:00 ` [RFC NET-NEXT PATCH 1/6] ethtool.h: MDI setting support Jesse Brandeburg
2012-07-25 18:00 ` [RFC NET-NEXT PATCH 2/6] e1000e: implement 82577/579 " Jesse Brandeburg
2012-07-25 18:00 ` [RFC NET-NEXT PATCH 3/6] igb: implement 580 " Jesse Brandeburg
2012-07-25 18:00 ` [RFC NET-NEXT PATCH 4/6] e1000: configure and read MDI settings Jesse Brandeburg
2012-07-25 22:41 ` Ben Hutchings [this message]
2012-07-25 18:00 ` [RFC NET-NEXT PATCH 5/6] e1000e: implement MDI/MDI-X control Jesse Brandeburg
2012-07-25 22:43 ` Ben Hutchings
2012-07-25 18:00 ` [RFC NET-NEXT PATCH 6/6] igb: update to allow reading/setting MDI state Jesse Brandeburg
2012-07-25 22:48 ` [RFC NET-NEXT PATCH 0/6] implement MDI-X set support in Intel drivers Ben Hutchings
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=1343256063.5132.149.camel@deadeye.wl.decadent.org.uk \
--to=bhutchings@solarflare.com \
--cc=jesse.brandeburg@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