Skip to content

Commit efda626

Browse files
Russell King (Oracle)NipaLocal
authored andcommitted
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 <[email protected]> # sa8775p-ride-r3 Signed-off-by: Russell King (Oracle) <[email protected]> Signed-off-by: NipaLocal <nipa@local>
1 parent a1788cd commit efda626

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ static void ethqos_set_serdes_speed(struct qcom_ethqos *ethqos, int speed)
624624

625625
static void ethqos_pcs_set_inband(struct stmmac_priv *priv, bool enable)
626626
{
627-
stmmac_pcs_ctrl_ane(priv, priv->ioaddr, enable, 0, 0);
627+
stmmac_pcs_ctrl_ane(priv, enable, 0, 0);
628628
}
629629

630630
/* On interface toggle MAC registers gets reset.

drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -393,10 +393,10 @@ static void dwmac1000_set_eee_timer(struct mac_device_info *hw, int ls, int tw)
393393
writel(value, ioaddr + LPI_TIMER_CTRL);
394394
}
395395

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)
398398
{
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);
400400
}
401401

402402
static void dwmac1000_debug(struct stmmac_priv *priv, void __iomem *ioaddr,

drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,10 +583,10 @@ static void dwmac4_flow_ctrl(struct mac_device_info *hw, unsigned int duplex,
583583
}
584584
}
585585

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,
587587
bool loopback)
588588
{
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);
590590
}
591591

592592
/* RGMII or SMII interface */

drivers/net/ethernet/stmicro/stmmac/hwif.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ struct stmmac_ops {
374374
struct stmmac_extra_stats *x, u32 rx_queues,
375375
u32 tx_queues);
376376
/* 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,
378378
bool loopback);
379379
/* Safety Features */
380380
int (*safety_feat_config)(void __iomem *ioaddr, unsigned int asp,
@@ -464,7 +464,7 @@ struct stmmac_ops {
464464
#define stmmac_mac_debug(__priv, __args...) \
465465
stmmac_do_void_callback(__priv, mac, debug, __priv, __args)
466466
#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)
468468
#define stmmac_safety_feat_config(__priv, __args...) \
469469
stmmac_do_callback(__priv, mac, safety_feat_config, __args)
470470
#define stmmac_safety_feat_irq_status(__priv, __args...) \

drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ stmmac_ethtool_set_link_ksettings(struct net_device *dev,
380380
return -EINVAL;
381381

382382
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);
384384
mutex_unlock(&priv->lock);
385385

386386
return 0;

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3586,7 +3586,7 @@ static int stmmac_hw_setup(struct net_device *dev, bool ptp_register)
35863586
}
35873587

35883588
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);
35903590

35913591
/* set TX and RX rings length */
35923592
stmmac_set_rings_length(priv);

0 commit comments

Comments
 (0)