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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 1 Jan 2014 16:24:58 +0000
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Michael Chan <mchan@...adcom.com>
CC:	<davem@...emloft.net>, <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next 3/4] bnx2: Report MDI/MDIX status to ethtool.

On Tue, 2013-12-31 at 23:22 -0800, Michael Chan wrote:
> Signed-off-by: Michael Chan <mchan@...adcom.com>
> ---
>  drivers/net/ethernet/broadcom/bnx2.c |   16 ++++++++++++++++
>  drivers/net/ethernet/broadcom/bnx2.h |    4 ++++
>  2 files changed, 20 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c
> index b380c69..3fcabd9 100644
> --- a/drivers/net/ethernet/broadcom/bnx2.c
> +++ b/drivers/net/ethernet/broadcom/bnx2.c
[...]
> @@ -6874,6 +6884,12 @@ bnx2_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
>  	if (netif_carrier_ok(dev)) {
>  		ethtool_cmd_speed_set(cmd, bp->line_speed);
>  		cmd->duplex = bp->duplex;
> +		if (!(bp->phy_flags & BNX2_PHY_FLAG_SERDES)) {
> +			if (bp->phy_flags & BNX2_PHY_FLAG_MDIX)
> +				cmd->eth_tp_mdix = ETH_TP_MDI_X;
> +			else
> +				cmd->eth_tp_mdix = ETH_TP_MDI;
> +		}
[...]

You could also set cmd->eth_tp_mdix_ctrl = ETH_TP_MDI_AUTO to show that
auto-MDI-X is supported.

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ