lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 26 Jul 2012 17:35:22 +0100 From: Ben Hutchings <bhutchings@...arflare.com> To: Jesse Brandeburg <jesse.brandeburg@...el.com> CC: <netdev@...r.kernel.org> Subject: Re: [RFC ETHTOOL PATCH 2/2] ethtool: allow setting MDI-X state 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: > > 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. -- 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