[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1343256063.5132.149.camel@deadeye.wl.decadent.org.uk>
Date: Wed, 25 Jul 2012 23:41:03 +0100
From: Ben Hutchings <bhutchings@...arflare.com>
To: Jesse Brandeburg <jesse.brandeburg@...el.com>
CC: <netdev@...r.kernel.org>
Subject: Re: [RFC NET-NEXT PATCH 4/6] e1000: configure and read MDI settings
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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists