Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: stmmac: replace ioaddr with stmmac_priv for pcs_set_ane() method

Pass the stmmac_priv structure into the pcs_set_ane() MAC method rather
than having callers dereferencing this structure for the IO address.

Tested-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> # sa8775p-ride-r3
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/E1uRqbQ-004djP-1l@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Russell King (Oracle) and committed by
Jakub Kicinski
c8e32755 62deb67f

+10 -10
+1 -1
drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
··· 624 624 625 625 static void ethqos_pcs_set_inband(struct stmmac_priv *priv, bool enable) 626 626 { 627 - stmmac_pcs_ctrl_ane(priv, priv->ioaddr, enable, 0, 0); 627 + stmmac_pcs_ctrl_ane(priv, enable, 0, 0); 628 628 } 629 629 630 630 /* On interface toggle MAC registers gets reset.
+3 -3
drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c
··· 393 393 writel(value, ioaddr + LPI_TIMER_CTRL); 394 394 } 395 395 396 - static void dwmac1000_ctrl_ane(void __iomem *ioaddr, bool ane, bool srgmi_ral, 397 - bool loopback) 396 + static void dwmac1000_ctrl_ane(struct stmmac_priv *priv, bool ane, 397 + bool srgmi_ral, bool loopback) 398 398 { 399 - dwmac_ctrl_ane(ioaddr, GMAC_PCS_BASE, ane, srgmi_ral, loopback); 399 + dwmac_ctrl_ane(priv->ioaddr, GMAC_PCS_BASE, ane, srgmi_ral, loopback); 400 400 } 401 401 402 402 static void dwmac1000_debug(struct stmmac_priv *priv, void __iomem *ioaddr,
+2 -2
drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
··· 583 583 } 584 584 } 585 585 586 - static void dwmac4_ctrl_ane(void __iomem *ioaddr, bool ane, bool srgmi_ral, 586 + static void dwmac4_ctrl_ane(struct stmmac_priv *priv, bool ane, bool srgmi_ral, 587 587 bool loopback) 588 588 { 589 - dwmac_ctrl_ane(ioaddr, GMAC_PCS_BASE, ane, srgmi_ral, loopback); 589 + dwmac_ctrl_ane(priv->ioaddr, GMAC_PCS_BASE, ane, srgmi_ral, loopback); 590 590 } 591 591 592 592 /* RGMII or SMII interface */
+2 -2
drivers/net/ethernet/stmicro/stmmac/hwif.h
··· 374 374 struct stmmac_extra_stats *x, u32 rx_queues, 375 375 u32 tx_queues); 376 376 /* PCS calls */ 377 - void (*pcs_ctrl_ane)(void __iomem *ioaddr, bool ane, bool srgmi_ral, 377 + void (*pcs_ctrl_ane)(struct stmmac_priv *priv, bool ane, bool srgmi_ral, 378 378 bool loopback); 379 379 /* Safety Features */ 380 380 int (*safety_feat_config)(void __iomem *ioaddr, unsigned int asp, ··· 464 464 #define stmmac_mac_debug(__priv, __args...) \ 465 465 stmmac_do_void_callback(__priv, mac, debug, __priv, __args) 466 466 #define stmmac_pcs_ctrl_ane(__priv, __args...) \ 467 - stmmac_do_void_callback(__priv, mac, pcs_ctrl_ane, __args) 467 + stmmac_do_void_callback(__priv, mac, pcs_ctrl_ane, __priv, __args) 468 468 #define stmmac_safety_feat_config(__priv, __args...) \ 469 469 stmmac_do_callback(__priv, mac, safety_feat_config, __args) 470 470 #define stmmac_safety_feat_irq_status(__priv, __args...) \
+1 -1
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
··· 380 380 return -EINVAL; 381 381 382 382 mutex_lock(&priv->lock); 383 - stmmac_pcs_ctrl_ane(priv, priv->ioaddr, 1, priv->hw->ps, 0); 383 + stmmac_pcs_ctrl_ane(priv, 1, priv->hw->ps, 0); 384 384 mutex_unlock(&priv->lock); 385 385 386 386 return 0;
+1 -1
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
··· 3586 3586 } 3587 3587 3588 3588 if (priv->hw->pcs) 3589 - stmmac_pcs_ctrl_ane(priv, priv->ioaddr, 1, priv->hw->ps, 0); 3589 + stmmac_pcs_ctrl_ane(priv, 1, priv->hw->ps, 0); 3590 3590 3591 3591 /* set TX and RX rings length */ 3592 3592 stmmac_set_rings_length(priv);