当前位置: 首页>>代码示例>>C++>>正文


C++ phy_stop函数代码示例

本文整理汇总了C++中phy_stop函数的典型用法代码示例。如果您正苦于以下问题:C++ phy_stop函数的具体用法?C++ phy_stop怎么用?C++ phy_stop使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了phy_stop函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: lpc_eth_close

static int lpc_eth_close(struct net_device *ndev)
{
	unsigned long flags;
	struct netdata_local *pldat = netdev_priv(ndev);

	if (netif_msg_ifdown(pldat))
		dev_dbg(&pldat->pdev->dev, "shutting down %s\n", ndev->name);

	napi_disable(&pldat->napi);
	netif_stop_queue(ndev);

	if (pldat->phy_dev)
		phy_stop(pldat->phy_dev);

	spin_lock_irqsave(&pldat->lock, flags);
	__lpc_eth_reset(pldat);
	netif_carrier_off(ndev);
	writel(0, LPC_ENET_MAC1(pldat->net_base));
	writel(0, LPC_ENET_MAC2(pldat->net_base));
	spin_unlock_irqrestore(&pldat->lock, flags);

	__lpc_eth_clock_enable(pldat, false);

	return 0;
}
开发者ID:guanhe0,项目名称:kernel,代码行数:25,代码来源:lpc_eth.c

示例2: dsa_slave_close

static int dsa_slave_close(struct net_device *dev)
{
	struct dsa_slave_priv *p = netdev_priv(dev);
	struct net_device *master = p->parent->dst->master_netdev;
	struct dsa_switch *ds = p->parent;

	if (p->phy)
		phy_stop(p->phy);

	dev_mc_unsync(master, dev);
	dev_uc_unsync(master, dev);
	if (dev->flags & IFF_ALLMULTI)
		dev_set_allmulti(master, -1);
	if (dev->flags & IFF_PROMISC)
		dev_set_promiscuity(master, -1);

	if (!ether_addr_equal(dev->dev_addr, master->dev_addr))
		dev_uc_del(master, dev->dev_addr);

	if (ds->drv->port_disable)
		ds->drv->port_disable(ds, p->port, p->phy);

	if (ds->drv->port_stp_update)
		ds->drv->port_stp_update(ds, p->port, BR_STATE_DISABLED);

	return 0;
}
开发者ID:andy-shev,项目名称:linux,代码行数:27,代码来源:slave.c

示例3: cpsw_slave_stop

static void cpsw_slave_stop(struct cpsw_slave *slave, struct cpsw_priv *priv)
{
	if (!slave->phy)
		return;
	phy_stop(slave->phy);
	phy_disconnect(slave->phy);
	slave->phy = NULL;
}
开发者ID:romanbb,项目名称:android_kernel_lge_d851,代码行数:8,代码来源:cpsw.c

示例4: sfp_sm_phy_detach

static void sfp_sm_phy_detach(struct sfp *sfp)
{
	phy_stop(sfp->mod_phy);
	sfp_remove_phy(sfp->sfp_bus);
	phy_device_remove(sfp->mod_phy);
	phy_device_free(sfp->mod_phy);
	sfp->mod_phy = NULL;
}
开发者ID:mkrufky,项目名称:linux,代码行数:8,代码来源:sfp.c

示例5: ag71xx_phy_stop

void ag71xx_phy_stop(struct ag71xx *ag)
{
	if (ag->phy_dev) {
		phy_stop(ag->phy_dev);
	} else {
		ag->duplex = -1;
		ag->link = 0;
		ag->speed = 0;
		ag71xx_phy_link_update(ag);
	}
}
开发者ID:Cribstone,项目名称:linino,代码行数:11,代码来源:ag71xx_phy.c

示例6: phylink_stop

void phylink_stop(struct phylink *pl)
{
	WARN_ON(!lockdep_rtnl_is_held());

	if (pl->phydev)
		phy_stop(pl->phydev);
	if (pl->sfp_bus)
		sfp_upstream_stop(pl->sfp_bus);

	set_bit(PHYLINK_DISABLE_STOPPED, &pl->phylink_disable_state);
	flush_work(&pl->resolve);
}
开发者ID:SantoshShilimkar,项目名称:linux,代码行数:12,代码来源:phylink.c

示例7: phylink_stop

/**
 * phylink_stop() - stop a phylink instance
 * @pl: a pointer to a &struct phylink returned from phylink_create()
 *
 * Stop the phylink instance specified by @pl. This should be called from the
 * network device driver's &struct net_device_ops ndo_stop() method.  The
 * network device's carrier state should not be changed prior to calling this
 * function.
 */
void phylink_stop(struct phylink *pl)
{
	ASSERT_RTNL();

	if (pl->phydev)
		phy_stop(pl->phydev);
	if (pl->sfp_bus)
		sfp_upstream_stop(pl->sfp_bus);
	if (pl->link_an_mode == MLO_AN_FIXED && !IS_ERR(pl->link_gpio))
		del_timer_sync(&pl->link_poll);

	phylink_run_resolve_and_disable(pl, PHYLINK_DISABLE_STOPPED);
}
开发者ID:avagin,项目名称:linux,代码行数:22,代码来源:phylink.c

示例8: ramips_phy_stop

static void
ramips_phy_stop(struct raeth_priv *re)
{
	unsigned long flags;

	if (re->phy_dev)
		phy_stop(re->phy_dev);

	spin_lock_irqsave(&re->phy_lock, flags);
	re->link = 0;
	ramips_link_adjust(re);
	spin_unlock_irqrestore(&re->phy_lock, flags);
}
开发者ID:ferstar,项目名称:openwrt-mybox,代码行数:13,代码来源:ramips_main.c

示例9: pci_eth_down

/* Stop RDC MAC and Free the allocated resource */
static void pci_eth_down(struct net_device *dev)
{
	struct pci_eth_private *priv = netdev_priv(dev);
	void __iomem *ioaddr = dev->base_addr;

	/* TODO: Stop MAC */

	/* TODO: Reset MAC */

	/* TODO: Restore MAC Address to MIDx */

	phy_stop(priv->phydev);
}
开发者ID:agamemnon886,项目名称:mod,代码行数:14,代码来源:pci_eth.c

示例10: dsa_slave_suspend

int dsa_slave_suspend(struct net_device *slave_dev)
{
	struct dsa_slave_priv *p = netdev_priv(slave_dev);

	if (p->phy) {
		phy_stop(p->phy);
		p->old_pause = -1;
		p->old_link = -1;
		p->old_duplex = -1;
		phy_suspend(p->phy);
	}

	return 0;
}
开发者ID:andy-shev,项目名称:linux,代码行数:14,代码来源:slave.c

示例11: xge_close

static int xge_close(struct net_device *ndev)
{
	struct xge_pdata *pdata = netdev_priv(ndev);

	netif_stop_queue(ndev);
	xge_mac_disable(pdata);
	phy_stop(ndev->phydev);

	xge_intr_disable(pdata);
	xge_free_irq(ndev);
	napi_disable(&pdata->napi);
	xge_delete_desc_rings(ndev);

	return 0;
}
开发者ID:Lyude,项目名称:linux,代码行数:15,代码来源:main.c

示例12: phylink_stop

/**
 * phylink_stop() - stop a phylink instance
 * @pl: a pointer to a &struct phylink returned from phylink_create()
 *
 * Stop the phylink instance specified by @pl. This should be called from the
 * network device driver's &struct net_device_ops ndo_stop() method.  The
 * network device's carrier state should not be changed prior to calling this
 * function.
 */
void phylink_stop(struct phylink *pl)
{
	ASSERT_RTNL();

	if (pl->phydev)
		phy_stop(pl->phydev);
	if (pl->sfp_bus)
		sfp_upstream_stop(pl->sfp_bus);
	if (pl->link_an_mode == MLO_AN_FIXED && !IS_ERR(pl->link_gpio))
		del_timer_sync(&pl->link_poll);

	set_bit(PHYLINK_DISABLE_STOPPED, &pl->phylink_disable_state);
	queue_work(system_power_efficient_wq, &pl->resolve);
	flush_work(&pl->resolve);
}
开发者ID:markus-oberhumer,项目名称:linux,代码行数:24,代码来源:phylink.c

示例13: ax88172a_stop

static int ax88172a_stop(struct usbnet *dev)
{
	struct ax88172a_private *priv = dev->driver_priv;

	netdev_dbg(dev->net, "Stopping interface\n");

	if (priv->phydev) {
		netdev_info(dev->net, "Disconnecting from phy %s\n",
			    priv->phy_name);
		phy_stop(priv->phydev);
		phy_disconnect(priv->phydev);
	}

	return 0;
}
开发者ID:AshishNamdev,项目名称:linux,代码行数:15,代码来源:ax88172a.c

示例14: hisi_femac_net_close

static int hisi_femac_net_close(struct net_device *dev)
{
	struct hisi_femac_priv *priv = netdev_priv(dev);

	hisi_femac_irq_disable(priv, IRQ_ENA_PORT0);

	if (dev->phydev)
		phy_stop(dev->phydev);

	netif_stop_queue(dev);
	napi_disable(&priv->napi);

	hisi_femac_free_skb_rings(priv);

	return 0;
}
开发者ID:AlexShiLucky,项目名称:linux,代码行数:16,代码来源:hisi_femac.c

示例15: bgmac_stop

static int bgmac_stop(struct net_device *net_dev)
{
	struct bgmac *bgmac = netdev_priv(net_dev);

	netif_carrier_off(net_dev);

	phy_stop(bgmac->phy_dev);

	napi_disable(&bgmac->napi);
	bgmac_chip_intrs_off(bgmac);
	free_irq(bgmac->core->irq, net_dev);

	bgmac_chip_reset(bgmac);

	return 0;
}
开发者ID:7799,项目名称:linux,代码行数:16,代码来源:bgmac.c


注:本文中的phy_stop函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。