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]
Message-ID: <20190724081915.GF1330@shell.armlinux.org.uk>
Date:   Wed, 24 Jul 2019 09:19:15 +0100
From:   Russell King - ARM Linux admin <linux@...linux.org.uk>
To:     Arseny Solokha <asolokha@...kras.ru>
Cc:     Claudiu Manoil <claudiu.manoil@....com>,
        Ioana Ciornei <ioana.ciornei@....com>,
        Andrew Lunn <andrew@...n.ch>, netdev@...r.kernel.org
Subject: Re: [RFC PATCH 1/2] gianfar: convert to phylink

On Tue, Jul 23, 2019 at 10:17:01PM +0700, Arseny Solokha wrote:
> -static noinline void gfar_update_link_state(struct gfar_private *priv)
> +static void gfar_mac_config(struct phylink_config *config, unsigned int mode,
> +			    const struct phylink_link_state *state)
>  {
> +	struct gfar_private *priv = netdev_priv(to_net_dev(config->dev));
>  	struct gfar __iomem *regs = priv->gfargrp[0].regs;
> -	struct net_device *ndev = priv->ndev;
> -	struct phy_device *phydev = ndev->phydev;
> -	struct gfar_priv_rx_q *rx_queue = NULL;
> -	int i;
> +	u32 maccfg1, new_maccfg1;
> +	u32 maccfg2, new_maccfg2;
> +	u32 ecntrl, new_ecntrl;
> +	u32 tx_flow, new_tx_flow;
>  
>  	if (unlikely(test_bit(GFAR_RESETTING, &priv->state)))
>  		return;
>  
> -	if (phydev->link) {
> -		u32 tempval1 = gfar_read(&regs->maccfg1);
> -		u32 tempval = gfar_read(&regs->maccfg2);
> -		u32 ecntrl = gfar_read(&regs->ecntrl);
> -		u32 tx_flow_oldval = (tempval1 & MACCFG1_TX_FLOW);
> +	if (unlikely(phylink_autoneg_inband(mode)))
> +		return;

Given that SFPs can be either SGMII or 1000BASE-X (which require
different configuration) and that the intention here is to support
SFPs, I don't see how this works with the above.

How is the difference between SGMII and 1000BASE-X handled?

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ