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  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:   Mon, 18 May 2020 01:50:26 +0200
From:   Andrew Lunn <>
To:     Roelof Berg <>
Cc:     Bryan Whitehead <>,
        Microchip Linux Driver Support <>,
        "David S. Miller" <>,,
Subject: Re: [PATCH] lan743x: Added fixed link support

> >> +			/* Configure MAC to fixed link parameters */
> >> +			data = lan743x_csr_read(adapter, MAC_CR);
> >> +			/* Disable auto negotiation */
> >> +			data &= ~(MAC_CR_ADD_ | MAC_CR_ASD_);
> > 
> > Why does the MAC care about autoneg? In general, all the MAC needs to
> > know is the speed and duplex.
> > 

> My assumption is, that in fixed-link mode we should switch off the
> autonegotiation between MAC and remote peer (e.g. a switch). I
> didn’t test, if it would also wun with the hardware doing
> auto-negotiation, however it feels cleaner to me to prevent the
> hardware from initiating any auto-negotiation in fixed-link mode.

The MAC is not involved in autoneg. autoneg is between two PHYs. They
talk with each other, and then phylibs sees the results and tells the
MAC the results of the negotiation. That happens via this call
back. So i have no idea what this is doing in general in the MAC. And
in your setup, you don't have any PHYs at all. So there is no
auto-neg. You should read the datasheet and understand what this is
controlling. It might need to be disabled in general.

> Using get_phy_mode() in all cases is not possible on a PC as it
> returns SGMII on a standard PC.

Why do you think that?

> > I don't understand this comment.
> > 
> See above the lengthy section. On a PC SGMII is returned when I call of_get_phy_mode(phynode, &phyifc);

There are two things possible here:

A PC has no OF support, so you are using:

So you get the error code -ENODEV, and phyifc is not changed.

Or you are using:

There is unlikely to be a device node, so phyifc is set to

So if of_get_phy_mode() returns an error, use RMII. Otherwise use what
value it set phyifc to.


Powered by blists - more mailing lists