WSL2-Linux-Kernel/drivers/net/ethernet/amd/xgbe
Lendacky, Thomas 5ab3121bee amd-xgbe: Fix mdio access for non-zero ports and clause 45 PHYs
The XGBE hardware has support for performing MDIO operations using an
MDIO command request. The driver mistakenly uses the mdio port address
as the MDIO command request device address instead of the MDIO command
request port address. Additionally, the driver does not properly check
for and create a clause 45 MDIO command.

Check the supplied MDIO register to determine if the request is a clause
45 operation (MII_ADDR_C45). For a clause 45 operation, extract the device
address and register number from the supplied MDIO register and use them
to set the MDIO command request device address and register number fields.
For a clause 22 operation, the MDIO request device address is set to zero
and the MDIO command request register number is set to the supplied MDIO
register. In either case, the supplied MDIO port address is used as the
MDIO command request port address.

Fixes: 732f2ab7af ("amd-xgbe: Add support for MDIO attached PHYs")
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Tested-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-01-17 22:06:54 -08:00
..
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xgbe-common.h amd-xgbe: Fix mdio access for non-zero ports and clause 45 PHYs 2019-01-17 22:06:54 -08:00
xgbe-dcb.c amd-xgbe: Do traffic class setup when called through dcbnl 2016-02-17 15:22:20 -05:00
xgbe-debugfs.c amd-xgbe: Improve KR auto-negotiation and training 2018-04-23 21:24:22 -04:00
xgbe-desc.c amd-xgbe: use dma_mapping_error to check map errors 2018-07-25 21:17:17 -07:00
xgbe-dev.c amd-xgbe: Fix mdio access for non-zero ports and clause 45 PHYs 2019-01-17 22:06:54 -08:00
xgbe-drv.c drivers: net: remove <net/busy_poll.h> inclusion when not needed 2018-10-25 16:20:02 -07:00
xgbe-ethtool.c amd-xgbe: Add ethtool show/set channels support 2018-05-23 16:33:00 -04:00
xgbe-i2c.c amd-xgbe: Re-issue interrupt if interrupt status not cleared 2017-06-29 15:14:18 -04:00
xgbe-main.c amd-xgbe: Prepare for ethtool set-channel support 2018-05-23 16:33:00 -04:00
xgbe-mdio.c net: fix amd-xgbe flow-control issue 2018-07-26 09:29:59 -07:00
xgbe-pci.c amd-xgbe: Read and save the port property registers during probe 2018-05-23 16:33:00 -04:00
xgbe-phy-v1.c amd-xgbe: Convert to using the new link mode settings 2017-08-18 16:30:17 -07:00
xgbe-phy-v2.c net: ethernet: Convert phydev advertize and supported from u32 to link mode 2018-11-11 10:10:01 -08:00
xgbe-platform.c amd-xgbe: Prepare for more fine grained cache coherency controls 2017-06-29 15:14:18 -04:00
xgbe-ptp.c amd-xgbe: Use the proper register during PTP initialization 2017-06-29 15:14:16 -04:00
xgbe.h amd-xgbe: Improve SFP 100Mbps auto-negotiation 2018-05-23 16:33:01 -04:00