diff options
author | Sandeep Paulraj <s-paulraj@ti.com> | 2012-09-13 11:27:45 -0400 |
---|---|---|
committer | Cyril Chemparathy <cyril@ti.com> | 2012-09-21 10:44:13 -0400 |
commit | 8c7a1a65b17d6d712c6aee4f835c510d3461b450 (patch) | |
tree | 259cc869f9d9afe01af96ad09277c00ff23ce494 | |
parent | 7b0b2c59558b41a53931f78772f16fed3565e2b0 (diff) | |
download | linux-keystone-8c7a1a65b17d6d712c6aee4f835c510d3461b450.tar.gz |
net: update phy adjust callback
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
31 files changed, 73 insertions, 68 deletions
diff --git a/drivers/net/ethernet/8390/ax88796.c b/drivers/net/ethernet/8390/ax88796.c index 203ff9dccadb03..ef0279584e8853 100644 --- a/drivers/net/ethernet/8390/ax88796.c +++ b/drivers/net/ethernet/8390/ax88796.c @@ -317,7 +317,7 @@ static void ax_block_output(struct net_device *dev, int count, #define AX_MEMR_EEO BIT(6) #define AX_MEMR_EECLK BIT(7) -static void ax_handle_link_change(struct net_device *dev) +static void ax_handle_link_change(struct net_device *dev, void *context) { struct ax_device *ax = to_ax_dev(dev); struct phy_device *phy_dev = ax->phy_dev; @@ -359,7 +359,7 @@ static int ax_mii_probe(struct net_device *dev) } ret = phy_connect_direct(dev, phy_dev, ax_handle_link_change, 0, - PHY_INTERFACE_MODE_MII); + PHY_INTERFACE_MODE_MII, NULL); if (ret) { netdev_err(dev, "Could not attach to PHY\n"); return ret; diff --git a/drivers/net/ethernet/adi/bfin_mac.c b/drivers/net/ethernet/adi/bfin_mac.c index f816426e108581..55d1f997b85dac 100644 --- a/drivers/net/ethernet/adi/bfin_mac.c +++ b/drivers/net/ethernet/adi/bfin_mac.c @@ -313,7 +313,7 @@ static int bfin_mdiobus_reset(struct mii_bus *bus) return 0; } -static void bfin_mac_adjust_link(struct net_device *dev) +static void bfin_mac_adjust_link(struct net_device *dev, void *context) { struct bfin_mac_local *lp = netdev_priv(dev); struct phy_device *phydev = lp->phydev; @@ -426,7 +426,7 @@ static int mii_probe(struct net_device *dev, int phy_mode) } phydev = phy_connect(dev, dev_name(&phydev->dev), &bfin_mac_adjust_link, - 0, phy_mode); + 0, phy_mode, NULL); if (IS_ERR(phydev)) { netdev_err(dev, "could not attach PHY\n"); diff --git a/drivers/net/ethernet/aeroflex/greth.c b/drivers/net/ethernet/aeroflex/greth.c index 9c77c736f171a8..d45e69ac0b495d 100644 --- a/drivers/net/ethernet/aeroflex/greth.c +++ b/drivers/net/ethernet/aeroflex/greth.c @@ -1218,7 +1218,7 @@ static int greth_mdio_reset(struct mii_bus *bus) return 0; } -static void greth_link_change(struct net_device *dev) +static void greth_link_change(struct net_device *dev, void *context) { struct greth_private *greth = netdev_priv(dev); struct phy_device *phydev = greth->phy; @@ -1289,7 +1289,8 @@ static int greth_mdio_probe(struct net_device *dev) ret = phy_connect_direct(dev, phy, &greth_link_change, 0, greth->gbit_mac ? PHY_INTERFACE_MODE_GMII : - PHY_INTERFACE_MODE_MII); + PHY_INTERFACE_MODE_MII. + NULL); if (ret) { if (netif_msg_ifup(greth)) dev_err(&dev->dev, "could not attach to PHY\n"); @@ -1363,7 +1364,7 @@ static int greth_mdio_init(struct greth_private *greth) while (!phy_aneg_done(greth->phy) && time_before(jiffies, timeout)) { } genphy_read_status(greth->phy); - greth_link_change(greth->netdev); + greth_link_change(greth->netdev, NULL); } return 0; diff --git a/drivers/net/ethernet/amd/au1000_eth.c b/drivers/net/ethernet/amd/au1000_eth.c index 397596b078d941..ed7e60adbd1ea4 100644 --- a/drivers/net/ethernet/amd/au1000_eth.c +++ b/drivers/net/ethernet/amd/au1000_eth.c @@ -292,7 +292,7 @@ static void au1000_enable_rx_tx(struct net_device *dev) } static void -au1000_adjust_link(struct net_device *dev) +au1000_adjust_link(struct net_device *dev, void *context) { struct au1000_private *aup = netdev_priv(dev); struct phy_device *phydev = aup->phy_dev; @@ -438,7 +438,7 @@ static int au1000_mii_probe(struct net_device *dev) BUG_ON(phydev->attached_dev); phydev = phy_connect(dev, dev_name(&phydev->dev), &au1000_adjust_link, - 0, PHY_INTERFACE_MODE_MII); + 0, PHY_INTERFACE_MODE_MII, NULL); if (IS_ERR(phydev)) { netdev_err(dev, "Could not attach to PHY\n"); diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c b/drivers/net/ethernet/broadcom/bcm63xx_enet.c index c7ca7ec065eeea..84b7033895a1f8 100644 --- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c +++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c @@ -698,7 +698,7 @@ static void bcm_enet_set_flow(struct bcm_enet_priv *priv, int rx_en, int tx_en) /* * link changed callback (from phylib) */ -static void bcm_enet_adjust_phy_link(struct net_device *dev) +static void bcm_enet_adjust_phy_link(struct net_device *dev, void *context) { struct bcm_enet_priv *priv; struct phy_device *phydev; @@ -800,7 +800,7 @@ static int bcm_enet_open(struct net_device *dev) priv->mii_bus->id, priv->phy_id); phydev = phy_connect(dev, phy_id, bcm_enet_adjust_phy_link, 0, - PHY_INTERFACE_MODE_MII); + PHY_INTERFACE_MODE_MII, NULL); if (IS_ERR(phydev)) { dev_err(kdev, "could not attach to PHY\n"); diff --git a/drivers/net/ethernet/broadcom/sb1250-mac.c b/drivers/net/ethernet/broadcom/sb1250-mac.c index 49e7a258da8aa9..58155d35308a63 100644 --- a/drivers/net/ethernet/broadcom/sb1250-mac.c +++ b/drivers/net/ethernet/broadcom/sb1250-mac.c @@ -316,7 +316,7 @@ static int sbmac_mii_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); static int sbmac_close(struct net_device *dev); static int sbmac_poll(struct napi_struct *napi, int budget); -static void sbmac_mii_poll(struct net_device *dev); +static void sbmac_mii_poll(struct net_device *dev, void *context); static int sbmac_mii_probe(struct net_device *dev); static void sbmac_mii_sync(void __iomem *sbm_mdio); @@ -2386,7 +2386,7 @@ static int sbmac_mii_probe(struct net_device *dev) } phy_dev = phy_connect(dev, dev_name(&phy_dev->dev), &sbmac_mii_poll, 0, - PHY_INTERFACE_MODE_GMII); + PHY_INTERFACE_MODE_GMII, NULL); if (IS_ERR(phy_dev)) { printk(KERN_ERR "%s: could not attach to PHY\n", dev->name); return PTR_ERR(phy_dev); @@ -2415,7 +2415,7 @@ static int sbmac_mii_probe(struct net_device *dev) } -static void sbmac_mii_poll(struct net_device *dev) +static void sbmac_mii_poll(struct net_device *dev, void *context) { struct sbmac_softc *sc = netdev_priv(dev); struct phy_device *phy_dev = sc->phy_dev; diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index bf906c51d82a40..017e4cdf3d6d66 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c @@ -1868,7 +1868,7 @@ static void tg3_setup_flow_control(struct tg3 *tp, u32 lcladv, u32 rmtadv) tw32_f(MAC_TX_MODE, tp->tx_mode); } -static void tg3_adjust_link(struct net_device *dev) +static void tg3_adjust_link(struct net_device *dev, void *context) { u8 oldflowctrl, linkmesg = 0; u32 mac_mode, lcl_adv, rmt_adv; @@ -1966,7 +1966,7 @@ static int tg3_phy_init(struct tg3 *tp) /* Attach the MAC to the PHY. */ phydev = phy_connect(tp->dev, dev_name(&phydev->dev), tg3_adjust_link, - phydev->dev_flags, phydev->interface); + phydev->dev_flags, phydev->interface, NULL); if (IS_ERR(phydev)) { dev_err(&tp->pdev->dev, "Could not attach to PHY\n"); return PTR_ERR(phydev); diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c index 033064b7b576ad..0ce66dd30046ee 100644 --- a/drivers/net/ethernet/cadence/macb.c +++ b/drivers/net/ethernet/cadence/macb.c @@ -135,7 +135,7 @@ static int macb_mdio_reset(struct mii_bus *bus) return 0; } -static void macb_handle_link_change(struct net_device *dev) +static void macb_handle_link_change(struct net_device *dev, void *context) { struct macb *bp = netdev_priv(dev); struct phy_device *phydev = bp->phy_dev; @@ -209,7 +209,7 @@ static int macb_mii_probe(struct net_device *dev) /* attach the mac to the phy */ ret = phy_connect_direct(dev, phydev, &macb_handle_link_change, 0, - bp->phy_interface); + bp->phy_interface, NULL); if (ret) { netdev_err(dev, "Could not attach to PHY\n"); return ret; diff --git a/drivers/net/ethernet/dnet.c b/drivers/net/ethernet/dnet.c index 290b26f868c9f7..68bc305d847f80 100644 --- a/drivers/net/ethernet/dnet.c +++ b/drivers/net/ethernet/dnet.c @@ -176,7 +176,7 @@ static int dnet_mdio_reset(struct mii_bus *bus) return 0; } -static void dnet_handle_link_change(struct net_device *dev) +static void dnet_handle_link_change(struct net_device *dev, void *context) { struct dnet *bp = netdev_priv(dev); struct phy_device *phydev = bp->phy_dev; @@ -282,11 +282,11 @@ static int dnet_mii_probe(struct net_device *dev) if (bp->capabilities & DNET_HAS_RMII) { phydev = phy_connect(dev, dev_name(&phydev->dev), &dnet_handle_link_change, 0, - PHY_INTERFACE_MODE_RMII); + PHY_INTERFACE_MODE_RMII, NULL); } else { phydev = phy_connect(dev, dev_name(&phydev->dev), &dnet_handle_link_change, 0, - PHY_INTERFACE_MODE_MII); + PHY_INTERFACE_MODE_MII, NULL); } if (IS_ERR(phydev)) { diff --git a/drivers/net/ethernet/ethoc.c b/drivers/net/ethernet/ethoc.c index 94b7bfcdb24e4a..4bbe22977d4304 100644 --- a/drivers/net/ethernet/ethoc.c +++ b/drivers/net/ethernet/ethoc.c @@ -661,7 +661,7 @@ static int ethoc_mdio_reset(struct mii_bus *bus) return 0; } -static void ethoc_mdio_poll(struct net_device *dev) +static void ethoc_mdio_poll(struct net_device *dev, void *context) { } @@ -683,7 +683,7 @@ static int __devinit ethoc_mdio_probe(struct net_device *dev) } err = phy_connect_direct(dev, phy, ethoc_mdio_poll, 0, - PHY_INTERFACE_MODE_GMII); + PHY_INTERFACE_MODE_GMII, NULL); if (err) { dev_err(&dev->dev, "could not attach to PHY\n"); return err; diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c index 74d749e29aab77..de8d8c2faf4025 100644 --- a/drivers/net/ethernet/faraday/ftgmac100.c +++ b/drivers/net/ethernet/faraday/ftgmac100.c @@ -808,7 +808,7 @@ err: /****************************************************************************** * internal functions (mdio) *****************************************************************************/ -static void ftgmac100_adjust_link(struct net_device *netdev) +static void ftgmac100_adjust_link(struct net_device *netdev, void *context) { struct ftgmac100 *priv = netdev_priv(netdev); struct phy_device *phydev = priv->phydev; @@ -859,7 +859,7 @@ static int ftgmac100_mii_probe(struct ftgmac100 *priv) phydev = phy_connect(netdev, dev_name(&phydev->dev), &ftgmac100_adjust_link, 0, - PHY_INTERFACE_MODE_GMII); + PHY_INTERFACE_MODE_GMII, NULL); if (IS_ERR(phydev)) { netdev_err(netdev, "%s: Could not attach to PHY\n", netdev->name); diff --git a/drivers/net/ethernet/freescale/fec.c b/drivers/net/ethernet/freescale/fec.c index fffd20528b5da8..20d6bff4b28af0 100644 --- a/drivers/net/ethernet/freescale/fec.c +++ b/drivers/net/ethernet/freescale/fec.c @@ -857,7 +857,7 @@ static void __inline__ fec_get_mac(struct net_device *ndev) /* * Phy section */ -static void fec_enet_adjust_link(struct net_device *ndev) +static void fec_enet_adjust_link(struct net_device *ndev, void *context) { struct fec_enet_private *fep = netdev_priv(ndev); struct phy_device *phy_dev = fep->phy_dev; @@ -995,7 +995,7 @@ static int fec_enet_mii_probe(struct net_device *ndev) snprintf(phy_name, sizeof(phy_name), PHY_ID_FMT, mdio_bus_id, phy_id); phy_dev = phy_connect(ndev, phy_name, &fec_enet_adjust_link, 0, - fep->phy_interface); + fep->phy_interface, NULL); if (IS_ERR(phy_dev)) { printk(KERN_ERR "%s: could not attach to PHY\n", ndev->name); return PTR_ERR(phy_dev); diff --git a/drivers/net/ethernet/freescale/fec_mpc52xx.c b/drivers/net/ethernet/freescale/fec_mpc52xx.c index 2933d08b036edc..800b7fb84c6c04 100644 --- a/drivers/net/ethernet/freescale/fec_mpc52xx.c +++ b/drivers/net/ethernet/freescale/fec_mpc52xx.c @@ -172,7 +172,7 @@ static int mpc52xx_fec_alloc_rx_buffers(struct net_device *dev, struct bcom_task } /* based on generic_adjust_link from fs_enet-main.c */ -static void mpc52xx_fec_adjust_link(struct net_device *dev) +static void mpc52xx_fec_adjust_link(struct net_device *dev, void *context) { struct mpc52xx_fec_priv *priv = netdev_priv(dev); struct phy_device *phydev = priv->phydev; @@ -229,7 +229,8 @@ static int mpc52xx_fec_open(struct net_device *dev) if (priv->phy_node) { priv->phydev = of_phy_connect(priv->ndev, priv->phy_node, - mpc52xx_fec_adjust_link, 0, 0); + mpc52xx_fec_adjust_link, + 0, 0, NULL); if (!priv->phydev) { dev_err(&dev->dev, "of_phy_connect failed\n"); return -ENODEV; diff --git a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c index 2b7633f766d98a..82a1dcd1a27efa 100644 --- a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c +++ b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c @@ -771,7 +771,7 @@ static void generic_adjust_link(struct net_device *dev) } -static void fs_adjust_link(struct net_device *dev) +static void fs_adjust_link(struct net_device *dev, void *context) { struct fs_enet_private *fep = netdev_priv(dev); unsigned long flags; @@ -800,10 +800,10 @@ static int fs_init_phy(struct net_device *dev) PHY_INTERFACE_MODE_RMII : PHY_INTERFACE_MODE_MII; phydev = of_phy_connect(dev, fep->fpi->phy_node, &fs_adjust_link, 0, - iface); + iface, NULL); if (!phydev) { phydev = of_phy_connect_fixed_link(dev, &fs_adjust_link, - iface); + iface, NULL); } if (!phydev) { dev_err(&dev->dev, "Could not attach to PHY\n"); diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c index d3233f59a82e47..bc7249ec88394f 100644 --- a/drivers/net/ethernet/freescale/gianfar.c +++ b/drivers/net/ethernet/freescale/gianfar.c @@ -1446,10 +1446,10 @@ static int init_phy(struct net_device *dev) interface = gfar_get_interface(dev); priv->phydev = of_phy_connect(dev, priv->phy_node, &adjust_link, 0, - interface); + interface, NULL); if (!priv->phydev) priv->phydev = of_phy_connect_fixed_link(dev, &adjust_link, - interface); + interface, NULL); if (!priv->phydev) { dev_err(&dev->dev, "could not attach to PHY\n"); return -ENODEV; @@ -2949,7 +2949,7 @@ static irqreturn_t gfar_interrupt(int irq, void *grp_id) * function converts those variables into the appropriate * register values, and can bring down the device if needed. */ -static void adjust_link(struct net_device *dev) +static void adjust_link(struct net_device *dev, void *context) { struct gfar_private *priv = netdev_priv(dev); struct gfar __iomem *regs = priv->gfargrp[0].regs; diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c index 21c6574c5f15cd..fde19329d8b83b 100644 --- a/drivers/net/ethernet/freescale/ucc_geth.c +++ b/drivers/net/ethernet/freescale/ucc_geth.c @@ -1598,7 +1598,7 @@ static void ugeth_activate(struct ucc_geth_private *ugeth) * register values, and can bring down the device if needed. */ -static void adjust_link(struct net_device *dev) +static void adjust_link(struct net_device *dev, void *context) { struct ucc_geth_private *ugeth = netdev_priv(dev); struct ucc_geth __iomem *ug_regs; @@ -1749,10 +1749,10 @@ static int init_phy(struct net_device *dev) priv->oldduplex = -1; phydev = of_phy_connect(dev, ug_info->phy_node, &adjust_link, 0, - priv->phy_interface); + priv->phy_interface, NULL); if (!phydev) phydev = of_phy_connect_fixed_link(dev, &adjust_link, - priv->phy_interface); + priv->phy_interface, NULL); if (!phydev) { dev_err(&dev->dev, "Could not attach to PHY\n"); return -ENODEV; diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c index 003c5bc7189f7e..261d455a1237d0 100644 --- a/drivers/net/ethernet/lantiq_etop.c +++ b/drivers/net/ethernet/lantiq_etop.c @@ -369,7 +369,7 @@ ltq_etop_mdio_rd(struct mii_bus *bus, int phy_addr, int phy_reg) } static void -ltq_etop_mdio_link(struct net_device *dev) +ltq_etop_mdio_link(struct net_device *dev, void *context) { /* nothing to do */ } @@ -394,7 +394,7 @@ ltq_etop_mdio_probe(struct net_device *dev) } phydev = phy_connect(dev, dev_name(&phydev->dev), <q_etop_mdio_link, - 0, priv->pldata->mii_mode); + 0, priv->pldata->mii_mode, NULL); if (IS_ERR(phydev)) { netdev_err(dev, "Could not attach to PHY\n"); diff --git a/drivers/net/ethernet/octeon/octeon_mgmt.c b/drivers/net/ethernet/octeon/octeon_mgmt.c index c42bbb16cdaebd..e5e795b2b90224 100644 --- a/drivers/net/ethernet/octeon/octeon_mgmt.c +++ b/drivers/net/ethernet/octeon/octeon_mgmt.c @@ -670,7 +670,7 @@ static int octeon_mgmt_ioctl(struct net_device *netdev, return phy_mii_ioctl(p->phydev, rq, cmd); } -static void octeon_mgmt_adjust_link(struct net_device *netdev) +static void octeon_mgmt_adjust_link(struct net_device *netdev, void *context) { struct octeon_mgmt *p = netdev_priv(netdev); union cvmx_agl_gmx_prtx_cfg prtx_cfg; @@ -720,7 +720,7 @@ static int octeon_mgmt_init_phy(struct net_device *netdev) p->phydev = of_phy_connect(netdev, p->phy_np, octeon_mgmt_adjust_link, 0, - PHY_INTERFACE_MODE_MII); + PHY_INTERFACE_MODE_MII, NULL); if (IS_ERR(p->phydev)) { p->phydev = NULL; diff --git a/drivers/net/ethernet/pasemi/pasemi_mac.c b/drivers/net/ethernet/pasemi/pasemi_mac.c index e559dfa06d6ace..9aba6b40ebffc8 100644 --- a/drivers/net/ethernet/pasemi/pasemi_mac.c +++ b/drivers/net/ethernet/pasemi/pasemi_mac.c @@ -1021,7 +1021,7 @@ static irqreturn_t pasemi_mac_tx_intr(int irq, void *data) return IRQ_HANDLED; } -static void pasemi_adjust_link(struct net_device *dev) +static void pasemi_adjust_link(struct net_device *dev, void *context) { struct pasemi_mac *mac = netdev_priv(dev); int msg; @@ -1099,7 +1099,7 @@ static int pasemi_mac_phy_init(struct net_device *dev) mac->duplex = -1; phydev = of_phy_connect(dev, phy_dn, &pasemi_adjust_link, 0, - PHY_INTERFACE_MODE_SGMII); + PHY_INTERFACE_MODE_SGMII, NULL); if (IS_ERR(phydev)) { printk(KERN_ERR "%s: Could not attach to phy\n", dev->name); diff --git a/drivers/net/ethernet/rdc/r6040.c b/drivers/net/ethernet/rdc/r6040.c index 557a26545d758d..0711bd769a431d 100644 --- a/drivers/net/ethernet/rdc/r6040.c +++ b/drivers/net/ethernet/rdc/r6040.c @@ -1000,7 +1000,7 @@ static const struct net_device_ops r6040_netdev_ops = { #endif }; -static void r6040_adjust_link(struct net_device *dev) +static void r6040_adjust_link(struct net_device *dev, void *context) { struct r6040_private *lp = netdev_priv(dev); struct phy_device *phydev = lp->phydev; @@ -1045,7 +1045,7 @@ static int r6040_mii_probe(struct net_device *dev) } phydev = phy_connect(dev, dev_name(&phydev->dev), &r6040_adjust_link, - 0, PHY_INTERFACE_MODE_MII); + 0, PHY_INTERFACE_MODE_MII, NULL); if (IS_ERR(phydev)) { dev_err(&lp->pdev->dev, "could not attach to PHY\n"); diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c index bad8f2eec9b46f..bc84521a260d70 100644 --- a/drivers/net/ethernet/renesas/sh_eth.c +++ b/drivers/net/ethernet/renesas/sh_eth.c @@ -1369,7 +1369,7 @@ other_irq: } /* PHY state control function */ -static void sh_eth_adjust_link(struct net_device *ndev) +static void sh_eth_adjust_link(struct net_device *ndev, void *context) { struct sh_eth_private *mdp = netdev_priv(ndev); struct phy_device *phydev = mdp->phydev; @@ -1422,7 +1422,7 @@ static int sh_eth_phy_init(struct net_device *ndev) /* Try connect to PHY */ phydev = phy_connect(ndev, phy_id, sh_eth_adjust_link, - 0, mdp->phy_interface); + 0, mdp->phy_interface, NULL); if (IS_ERR(phydev)) { dev_err(&ndev->dev, "phy_connect failed\n"); return PTR_ERR(phydev); diff --git a/drivers/net/ethernet/s6gmac.c b/drivers/net/ethernet/s6gmac.c index 2ed3ab4b3c2d61..d882267511d5e3 100644 --- a/drivers/net/ethernet/s6gmac.c +++ b/drivers/net/ethernet/s6gmac.c @@ -739,7 +739,7 @@ static inline void s6gmac_linkisup(struct net_device *dev, int isup) phy_print_status(phydev); } -static void s6gmac_adjust_link(struct net_device *dev) +static void s6gmac_adjust_link(struct net_device *dev, void *context) { struct s6gmac *pd = netdev_priv(dev); struct phy_device *phydev = pd->phydev; @@ -796,7 +796,7 @@ static inline int s6gmac_phy_start(struct net_device *dev) while ((i < PHY_MAX_ADDR) && (!(p = pd->mii.bus->phy_map[i]))) i++; p = phy_connect(dev, dev_name(&p->dev), &s6gmac_adjust_link, 0, - PHY_INTERFACE_MODE_RGMII); + PHY_INTERFACE_MODE_RGMII, NULL); if (IS_ERR(p)) { printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name); return PTR_ERR(p); diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c index 62d1baf111ea8f..22f2b308689753 100644 --- a/drivers/net/ethernet/smsc/smsc911x.c +++ b/drivers/net/ethernet/smsc/smsc911x.c @@ -916,7 +916,7 @@ static void smsc911x_phy_update_flowcontrol(struct smsc911x_data *pdata) /* Update link mode if anything has changed. Called periodically when the * PHY is in polling mode, even if nothing has changed. */ -static void smsc911x_phy_adjust_link(struct net_device *dev) +static void smsc911x_phy_adjust_link(struct net_device *dev, void *context) { struct smsc911x_data *pdata = netdev_priv(dev); struct phy_device *phy_dev = pdata->phy_dev; @@ -999,7 +999,7 @@ static int smsc911x_mii_probe(struct net_device *dev) ret = phy_connect_direct(dev, phydev, &smsc911x_phy_adjust_link, 0, - pdata->config.phy_interface); + pdata->config.phy_interface, NULL); if (ret) { netdev_err(dev, "Could not attach to PHY\n"); diff --git a/drivers/net/ethernet/smsc/smsc9420.c b/drivers/net/ethernet/smsc/smsc9420.c index 1fcd914ec39b37..a905e9bb387b8d 100644 --- a/drivers/net/ethernet/smsc/smsc9420.c +++ b/drivers/net/ethernet/smsc/smsc9420.c @@ -1130,7 +1130,7 @@ static void smsc9420_phy_update_flowcontrol(struct smsc9420_pdata *pd) /* Update link mode if anything has changed. Called periodically when the * PHY is in polling mode, even if nothing has changed. */ -static void smsc9420_phy_adjust_link(struct net_device *dev) +static void smsc9420_phy_adjust_link(struct net_device *dev, NULL) { struct smsc9420_pdata *pd = netdev_priv(dev); struct phy_device *phy_dev = pd->phy_dev; @@ -1179,7 +1179,8 @@ static int smsc9420_mii_probe(struct net_device *dev) phydev->phy_id); phydev = phy_connect(dev, dev_name(&phydev->dev), - smsc9420_phy_adjust_link, 0, PHY_INTERFACE_MODE_MII); + smsc9420_phy_adjust_link, 0, + PHY_INTERFACE_MODE_MII, NULL); if (IS_ERR(phydev)) { pr_err("%s: Could not attach to PHY\n", dev->name); diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index c136162e6473e1..4a738b9339c23d 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -317,7 +317,7 @@ static void stmmac_eee_adjust(struct stmmac_priv *priv) * @dev: net device structure * Description: it adjusts the link parameters. */ -static void stmmac_adjust_link(struct net_device *dev) +static void stmmac_adjust_link(struct net_device *dev, void *context) { struct stmmac_priv *priv = netdev_priv(dev); struct phy_device *phydev = priv->phydev; @@ -437,7 +437,7 @@ static int stmmac_init_phy(struct net_device *dev) pr_debug("stmmac_init_phy: trying to attach to %s\n", phy_id_fmt); phydev = phy_connect(dev, phy_id_fmt, &stmmac_adjust_link, 0, - interface); + interface, NULL); if (IS_ERR(phydev)) { pr_err("%s: Could not attach to PHY\n", dev->name); diff --git a/drivers/net/ethernet/ti/cpmac.c b/drivers/net/ethernet/ti/cpmac.c index 860c2526f08d0d..f2cddc1a977b33 100644 --- a/drivers/net/ethernet/ti/cpmac.c +++ b/drivers/net/ethernet/ti/cpmac.c @@ -920,7 +920,7 @@ static const struct ethtool_ops cpmac_ethtool_ops = { .set_ringparam = cpmac_set_ringparam, }; -static void cpmac_adjust_link(struct net_device *dev) +static void cpmac_adjust_link(struct net_device *dev, void *context) { struct cpmac_priv *priv = netdev_priv(dev); int new_state = 0; @@ -1174,7 +1174,7 @@ static int __devinit cpmac_probe(struct platform_device *pdev) mdio_bus_id, phy_id); priv->phy = phy_connect(dev, priv->phy_name, cpmac_adjust_link, 0, - PHY_INTERFACE_MODE_MII); + PHY_INTERFACE_MODE_MII, NULL); if (IS_ERR(priv->phy)) { if (netif_msg_drv(priv)) diff --git a/drivers/net/ethernet/ti/davinci_emac.c b/drivers/net/ethernet/ti/davinci_emac.c index fce89a0ab06ed1..b866c5e9b7e5a3 100644 --- a/drivers/net/ethernet/ti/davinci_emac.c +++ b/drivers/net/ethernet/ti/davinci_emac.c @@ -1448,7 +1448,7 @@ void emac_poll_controller(struct net_device *ndev) } #endif -static void emac_adjust_link(struct net_device *ndev) +static void emac_adjust_link(struct net_device *ndev, void *context) { struct emac_priv *priv = netdev_priv(ndev); struct phy_device *phydev = priv->phydev; @@ -1601,7 +1601,7 @@ static int emac_dev_open(struct net_device *ndev) if (priv->phy_id && *priv->phy_id) { priv->phydev = phy_connect(ndev, priv->phy_id, &emac_adjust_link, 0, - PHY_INTERFACE_MODE_MII); + PHY_INTERFACE_MODE_MII, NULL); if (IS_ERR(priv->phydev)) { dev_err(emac_dev, "could not connect to phy %s\n", diff --git a/drivers/net/ethernet/toshiba/tc35815.c b/drivers/net/ethernet/toshiba/tc35815.c index 651a70c55e6e69..ef217359e07269 100644 --- a/drivers/net/ethernet/toshiba/tc35815.c +++ b/drivers/net/ethernet/toshiba/tc35815.c @@ -537,7 +537,7 @@ static int tc_mdio_write(struct mii_bus *bus, int mii_id, int regnum, u16 val) return 0; } -static void tc_handle_link_change(struct net_device *dev) +static void tc_handle_link_change(struct net_device *dev, void *context) { struct tc35815_local *lp = netdev_priv(dev); struct phy_device *phydev = lp->phy_dev; @@ -635,7 +635,8 @@ static int tc_mii_probe(struct net_device *dev) phydev = phy_connect(dev, dev_name(&phydev->dev), &tc_handle_link_change, 0, lp->chiptype == TC35815_TX4939 ? - PHY_INTERFACE_MODE_RMII : PHY_INTERFACE_MODE_MII); + PHY_INTERFACE_MODE_RMII : PHY_INTERFACE_MODE_MII, + NULL); if (IS_ERR(phydev)) { printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name); return PTR_ERR(phydev); diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll_temac_main.c index f8e35188011967..54675c2528509c 100644 --- a/drivers/net/ethernet/xilinx/ll_temac_main.c +++ b/drivers/net/ethernet/xilinx/ll_temac_main.c @@ -590,7 +590,7 @@ static void temac_device_reset(struct net_device *ndev) ndev->trans_start = jiffies; /* prevent tx timeout */ } -void temac_adjust_link(struct net_device *ndev) +void temac_adjust_link(struct net_device *ndev, void *context) { struct temac_local *lp = netdev_priv(ndev); struct phy_device *phy = lp->phy_dev; @@ -856,7 +856,7 @@ static int temac_open(struct net_device *ndev) if (lp->phy_node) { lp->phy_dev = of_phy_connect(lp->ndev, lp->phy_node, - temac_adjust_link, 0, 0); + temac_adjust_link, 0, 0, NULL); if (!lp->phy_dev) { dev_err(lp->dev, "of_phy_connect() failed\n"); return -ENODEV; diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c index 77cfe5110318ab..eb641aafdb2d27 100644 --- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c +++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c @@ -892,11 +892,12 @@ err_register: /** * xemaclite_adjust_link - Link state callback for the Emaclite device * @ndev: pointer to net_device struct + * @context: pointer to context argument * * There's nothing in the Emaclite device to be configured when the link * state changes. We just print the status. */ -void xemaclite_adjust_link(struct net_device *ndev) +void xemaclite_adjust_link(struct net_device *ndev, void *context) { struct net_local *lp = netdev_priv(ndev); struct phy_device *phy = lp->phy_dev; @@ -932,7 +933,7 @@ static int xemaclite_open(struct net_device *dev) lp->phy_dev = of_phy_connect(lp->ndev, lp->phy_node, xemaclite_adjust_link, 0, - PHY_INTERFACE_MODE_MII); + PHY_INTERFACE_MODE_MII, NULL); if (!lp->phy_dev) { dev_err(&lp->ndev->dev, "of_phy_connect() failed\n"); return -ENODEV; diff --git a/drivers/net/ethernet/xscale/ixp4xx_eth.c b/drivers/net/ethernet/xscale/ixp4xx_eth.c index 98934bdf6acffc..daf92b9aaa2cdc 100644 --- a/drivers/net/ethernet/xscale/ixp4xx_eth.c +++ b/drivers/net/ethernet/xscale/ixp4xx_eth.c @@ -543,7 +543,7 @@ static void ixp4xx_mdio_remove(void) } -static void ixp4xx_adjust_link(struct net_device *dev) +static void ixp4xx_adjust_link(struct net_device *dev, void *context) { struct port *port = netdev_priv(dev); struct phy_device *phydev = port->phydev; @@ -1449,7 +1449,7 @@ static int __devinit eth_init_one(struct platform_device *pdev) snprintf(phy_id, MII_BUS_ID_SIZE + 3, PHY_ID_FMT, mdio_bus->id, plat->phy); port->phydev = phy_connect(dev, phy_id, &ixp4xx_adjust_link, 0, - PHY_INTERFACE_MODE_MII); + PHY_INTERFACE_MODE_MII, NULL); if (IS_ERR(port->phydev)) { err = PTR_ERR(port->phydev); goto err_free_mem; |