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: <CACWXhK=aS9Y+hWxCoE3-Y7=T+C9VyuSD_jiegviAArFde1GSWA@mail.gmail.com>
Date:   Thu, 18 Aug 2022 13:01:09 +0800
From:   Feiyang Chen <chris.chenfeiyang@...il.com>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     peppe.cavallaro@...com, alexandre.torgue@...s.st.com,
        joabreu@...opsys.com, Feiyang Chen <chenfeiyang@...ngson.cn>,
        zhangqing@...ngson.cn, Huacai Chen <chenhuacai@...ngson.cn>,
        netdev@...r.kernel.org, loongarch@...ts.linux.dev
Subject: Re: [PATCH] stmmac: pci: Add LS7A support for dwmac-loongson

On Thu, 18 Aug 2022 at 10:15, Andrew Lunn <andrew@...n.ch> wrote:
>
> > +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()?
>

Hi, Andrew,

This is a PHY bug, I'll try other methods.

Thanks,
Feiyang

>      Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ