本文主要是介绍DM9000网卡驱动源码分析系列06 - open stop,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
static void dm9000_mask_interrupts(struct board_info *db)
{iow(db, DM9000_IMR, IMR_PAR);
}
屏蔽中断static void dm9000_unmask_interrupts(struct board_info *db)
{iow(db, DM9000_IMR, db->imr_all);
}
恢复中断
/** Open the interface.* The interface is opened whenever "ifconfig" actives it.*/
static int dm9000_open(struct net_device *dev)
{struct board_info *db = netdev_priv(dev);unsigned long irqflags = db->irq_res->flags & IRQF_TRIGGER_MASK;if (netif_msg_ifup(db))dev_dbg(db->dev, "enabling %s\n", dev->name);/* If there is no IRQ type specified, default to something that* may work, and tell the user that this is a problem */if (irqflags == IRQF_TRIGGER_NONE)irqflags = irq_get_trigger_type(dev->irq);if (irqflags == IRQF_TRIGGER_NONE)dev_warn(db->dev, "WARNING: no IRQ resource flags set
这篇关于DM9000网卡驱动源码分析系列06 - open stop的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!