* bnx2 limits user-specified advertised speeds to one
@ 2010-02-10 21:05 Vlad Yasevich
2010-02-10 22:11 ` Michael Chan
0 siblings, 1 reply; 3+ messages in thread
From: Vlad Yasevich @ 2010-02-10 21:05 UTC (permalink / raw)
To: netdev
Hi
A customer has noted that when attempting to change the advertised speeds
setting on card using a bnx2 driver, the driver advertises either all available
speeds or just one. In other words, if a user attempts to set multiple
advertised speeds, the settings will not be honored.
Looking at the code in bnx2_set_settings, the checks for 10baseT and 100baseT
make an assumption that the user provided only 1 speed setting.
e1000 and e1000e work correctly when the user specifies multiple advertised
speeds.
Before attempting to fix this, I wanted to ask if there was a reason for the
current functionality.
Thanks
-vlad
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: bnx2 limits user-specified advertised speeds to one
2010-02-10 21:05 bnx2 limits user-specified advertised speeds to one Vlad Yasevich
@ 2010-02-10 22:11 ` Michael Chan
2010-02-10 23:35 ` Ben Hutchings
0 siblings, 1 reply; 3+ messages in thread
From: Michael Chan @ 2010-02-10 22:11 UTC (permalink / raw)
To: Vlad Yasevich; +Cc: netdev
On Wed, 2010-02-10 at 13:05 -0800, Vlad Yasevich wrote:
> Hi
>
> A customer has noted that when attempting to change the advertised speeds
> setting on card using a bnx2 driver, the driver advertises either all available
> speeds or just one. In other words, if a user attempts to set multiple
> advertised speeds, the settings will not be honored.
>
> Looking at the code in bnx2_set_settings, the checks for 10baseT and 100baseT
> make an assumption that the user provided only 1 speed setting.
>
> e1000 and e1000e work correctly when the user specifies multiple advertised
> speeds.
>
> Before attempting to fix this, I wanted to ask if there was a reason for the
> current functionality.
>
Probably code to handle limitations in older versions of the ethtool
program. There is no reason for it to be like this anymore. I'll fix
this in my next patch set. Thanks for reporting this.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: bnx2 limits user-specified advertised speeds to one
2010-02-10 22:11 ` Michael Chan
@ 2010-02-10 23:35 ` Ben Hutchings
0 siblings, 0 replies; 3+ messages in thread
From: Ben Hutchings @ 2010-02-10 23:35 UTC (permalink / raw)
To: Michael Chan; +Cc: Vlad Yasevich, netdev
On Wed, 2010-02-10 at 14:11 -0800, Michael Chan wrote:
> On Wed, 2010-02-10 at 13:05 -0800, Vlad Yasevich wrote:
> > Hi
> >
> > A customer has noted that when attempting to change the advertised speeds
> > setting on card using a bnx2 driver, the driver advertises either all available
> > speeds or just one. In other words, if a user attempts to set multiple
> > advertised speeds, the settings will not be honored.
> >
> > Looking at the code in bnx2_set_settings, the checks for 10baseT and 100baseT
> > make an assumption that the user provided only 1 speed setting.
> >
> > e1000 and e1000e work correctly when the user specifies multiple advertised
> > speeds.
> >
> > Before attempting to fix this, I wanted to ask if there was a reason for the
> > current functionality.
> >
>
> Probably code to handle limitations in older versions of the ethtool
> program. There is no reason for it to be like this anymore. I'll fix
> this in my next patch set. Thanks for reporting this.
Older versions of ethtool can request invalid advertising masks
(including flags not set in the supported mask) and do not enable
advertising of 10G modes. In the out-of-tree version of sfc we use this
workaround:
/* Older versions of ethtool don't set all the right bits when
* turning autoneg on with no speed/duplex specified. But they
* always set more than one bit in this case, so test for that.
* Allow overriding this in ethtool 6 by setting
* ADVERTISED_Autoneg = 0x40.
*/
if (ecmd->advertising & (ecmd->advertising - 1) &&
!(ecmd->advertising & ADVERTISED_Autoneg))
ecmd->advertising = ecmd->supported;
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-02-10 23:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-10 21:05 bnx2 limits user-specified advertised speeds to one Vlad Yasevich
2010-02-10 22:11 ` Michael Chan
2010-02-10 23:35 ` Ben Hutchings
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).