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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sat, 30 Apr 2022 19:30:37 +0200 From: Andrew Lunn <andrew@...n.ch> To: Jakub Kicinski <kuba@...nel.org> Cc: Vladimir Oltean <vladimir.oltean@....com>, Florian Fainelli <f.fainelli@...il.com>, Jose Abreu <Jose.Abreu@...opsys.com>, Heiner Kallweit <hkallweit1@...il.com>, Russell King <rmk+kernel@...linux.org.uk>, bcm-kernel-feedback-list@...adcom.com, netdev <netdev@...r.kernel.org>, Andrew Lunn <andrew@...n.ch> Subject: [PATCH net-next v1 5/5] net: pcs: pcs-xpcs: Convert to mdiobus_c45_read Stop using the helpers to construct a special mdio address which indicates C45. Instead use the C45 accessors, which will call the busses C45 specific read/write API. Reviewed-by: Vladimir Oltean <vladimir.oltean@....com> Tested-by: Vladimir Oltean <vladimir.oltean@....com> Signed-off-by: Andrew Lunn <andrew@...n.ch> --- drivers/net/pcs/pcs-xpcs.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/pcs/pcs-xpcs.c b/drivers/net/pcs/pcs-xpcs.c index 61418d4dc0cd..4cfd05c15aee 100644 --- a/drivers/net/pcs/pcs-xpcs.c +++ b/drivers/net/pcs/pcs-xpcs.c @@ -175,20 +175,18 @@ static bool __xpcs_linkmode_supported(const struct xpcs_compat *compat, int xpcs_read(struct dw_xpcs *xpcs, int dev, u32 reg) { - u32 reg_addr = mdiobus_c45_addr(dev, reg); struct mii_bus *bus = xpcs->mdiodev->bus; int addr = xpcs->mdiodev->addr; - return mdiobus_read(bus, addr, reg_addr); + return mdiobus_c45_read(bus, addr, dev, reg); } int xpcs_write(struct dw_xpcs *xpcs, int dev, u32 reg, u16 val) { - u32 reg_addr = mdiobus_c45_addr(dev, reg); struct mii_bus *bus = xpcs->mdiodev->bus; int addr = xpcs->mdiodev->addr; - return mdiobus_write(bus, addr, reg_addr, val); + return mdiobus_c45_write(bus, addr, dev, reg, val); } static int xpcs_read_vendor(struct dw_xpcs *xpcs, int dev, u32 reg) -- 2.35.2
Powered by blists - more mailing lists