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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yv2gy3I+yLzU1dYH@lunn.ch>
Date:   Thu, 18 Aug 2022 04:15:39 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Feiyang Chen <chris.chenfeiyang@...il.com>
Cc:     peppe.cavallaro@...com, alexandre.torgue@...s.st.com,
        joabreu@...opsys.com, Feiyang Chen <chenfeiyang@...ngson.cn>,
        zhangqing@...ngson.cn, chenhuacai@...ngson.cn,
        netdev@...r.kernel.org, loongarch@...ts.linux.dev
Subject: Re: [PATCH] stmmac: pci: Add LS7A support for dwmac-loongson

> +static void loongson_gnet_fix_speed(void *priv, unsigned int speed)
> +{
> +	struct net_device *ndev = (struct net_device *)(*(unsigned long *)priv);
> +	struct stmmac_priv *ptr = netdev_priv(ndev);
> +
> +	if (speed == SPEED_1000) {
> +		if (readl(ptr->ioaddr + MAC_CTRL_REG) & (1 << 15) /* PS */) {
> +			/* reset phy */
> +			phy_set_bits(ndev->phydev, 0 /*MII_BMCR*/,
> +				     0x200 /*BMCR_ANRESTART*/);

The MAC driver should not be accessing PHY registers. Why does the PHY
need a reset? Can you call phy_stop()/phy_start()?

     Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ