Thread (1 message) 1 message, 1 author, 2012-07-26

Re: [RFC ETHTOOL PATCH 2/2] ethtool: allow setting MDI-X state

From: Ben Hutchings <hidden>
Date: 2012-07-26 16:35:26

On Thu, 2012-07-26 at 09:30 -0700, Jesse Brandeburg wrote:
On Wed, Jul 25, 2012 at 11:59:02PM +0100, Ben Hutchings wrote:
quoted
On Wed, 2012-07-25 at 10:53 -0700, Jesse Brandeburg wrote:
How about when you have a forced mode but the driver reports eth_tp_mdix
= ETH_TP_MDI_INVALID because the link is down?  This is going to result
in:

        MDI-X: Unknown (forced)

which makes no sense at all.  So I think that we have to do something
like:

	if (ep->eth_tp_mdix_ctrl == ETH_TP_MDI) {
		fprintf(stdout, "off (forced)\n");
	} else if (ep->eth_tp_mdix_ctrl == ETH_TP_MDI_X) {
		fprintf(stdout, "on (forced)\n");
	} else {
		switch (ep->eth_tp_mdix) {
			...
		}
		if (ep->eth_tp_mdix_ctrl == ETH_TP_MDI_AUTO)
			fprintf(stdout, " (auto)");
		fprintf(stdout, "\n");
	}

Or else we require that when the mode is forced then drivers report that
as the current status even if the link is down.
I tried that and it works swimmingly.  How does this look?
[...]

That looks good, thanks.

Ben.

-- 
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help