• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ device_quiet函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: nexus_probe

static int
nexus_probe(device_t dev)
{

	device_quiet(dev);	/* suppress attach message for neatness */
	return (BUS_PROBE_GENERIC);
}
开发者ID:dcui,项目名称:FreeBSD-9.3_kernel,代码行数:7,代码来源:nexus.c


示例2: bhndb_mdio_pcie_probe

/*
 * Support for attaching the PCIe-Gen1 MDIO driver to a parent bhndb PCIe
 * bridge device. 
 */
static int
bhndb_mdio_pcie_probe(device_t dev)
{
	struct bhndb_softc	*psc;
	device_t		 parent;

	/* Parent must be a bhndb_pcie instance */
	parent = device_get_parent(dev);
	if (device_get_driver(parent) != &bhndb_pci_driver)
		return (ENXIO);

	/* Parent must have PCIe-Gen1 hostb device */
	psc = device_get_softc(parent);
	if (psc->hostb_dev == NULL)
		return (ENXIO);

	if (bhnd_get_vendor(psc->hostb_dev) != BHND_MFGID_BCM ||
	    bhnd_get_device(psc->hostb_dev) != BHND_COREID_PCIE)
	{
		return (ENXIO);
	}

	device_quiet(dev);
	return (BUS_PROBE_NOWILDCARD);
}
开发者ID:vocho,项目名称:freebsd-base-graphics,代码行数:29,代码来源:bhndb_pci.c


示例3: sbni_probe_isa

static int
sbni_probe_isa(device_t dev)
{
	struct sbni_softc *sc;
	int error;

	error = ISA_PNP_PROBE(device_get_parent(dev), dev, sbni_ids);
	if (error && error != ENOENT)
		return (error);

	sc = device_get_softc(dev);
	bzero(sc, sizeof(struct sbni_softc));

 	sc->io_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &sc->io_rid,
					0ul, ~0ul, SBNI_PORTS, RF_ACTIVE);
	if (!sc->io_res) {
		printf("sbni: cannot allocate io ports!\n");
		return (ENOENT);
	}

	sc->base_addr = rman_get_start(sc->io_res);
	if (sbni_probe(sc) != 0) {
		bus_release_resource(dev, SYS_RES_IOPORT,
				     sc->io_rid, sc->io_res);
		return (ENXIO);
	}

	device_quiet(dev);
	return (0);
}
开发者ID:UnitedMarsupials,项目名称:kame,代码行数:30,代码来源:if_sbni_isa.c


示例4: intel_gmbus_attach

static int
intel_gmbus_attach(device_t idev)
{
	struct intel_iic_softc *sc;
	struct drm_device *dev;
	struct drm_i915_private *dev_priv;
	int pin, port;

	sc = device_get_softc(idev);
	pin = device_get_unit(idev);
	port = pin + 1; /* +1 to map gmbus index to pin pair */

	snprintf(sc->name, sizeof(sc->name), "i915 gmbus %s",
	    intel_gmbus_is_port_valid(port) ? gmbus_ports[pin].name :
	    "reserved");
	device_set_desc(idev, sc->name);

	dev = device_get_softc(device_get_parent(idev));
	dev_priv = dev->dev_private;
	sc->bus = &dev_priv->gmbus[pin];

	/* add bus interface device */
	sc->iic_dev = device_add_child(idev, "iicbus", -1);
	if (sc->iic_dev == NULL)
		return (ENXIO);
	device_quiet(sc->iic_dev);
	bus_generic_attach(idev);

	return (0);
}
开发者ID:kwitaszczyk,项目名称:freebsd,代码行数:30,代码来源:intel_iic.c


示例5: nexus_fdt_probe

static int
nexus_fdt_probe(device_t dev)
{

	device_quiet(dev);
	return (BUS_PROBE_DEFAULT);
}
开发者ID:FreeBSDFoundation,项目名称:freebsd,代码行数:7,代码来源:nexus.c


示例6: intel_iicbb_attach

static int
intel_iicbb_attach(device_t idev)
{
	struct intel_iic_softc *sc;
	struct drm_device *dev;
	struct drm_i915_private *dev_priv;
	int pin, port;

	sc = device_get_softc(idev);
	pin = device_get_unit(idev);
	port = pin + 1;

	snprintf(sc->name, sizeof(sc->name), "i915 iicbb %s",
	    intel_gmbus_is_port_valid(port) ? gmbus_ports[pin].name :
	    "reserved");
	device_set_desc(idev, sc->name);

	dev = device_get_softc(device_get_parent(idev));
	dev_priv = dev->dev_private;
	sc->bus = &dev_priv->gmbus[pin];

	/* add generic bit-banging code */
	sc->iic_dev = device_add_child(idev, "iicbb", -1);
	if (sc->iic_dev == NULL)
		return (ENXIO);
	device_quiet(sc->iic_dev);
	bus_generic_attach(idev);
	iicbus_set_nostop(idev, true);

	return (0);
}
开发者ID:kwitaszczyk,项目名称:freebsd,代码行数:31,代码来源:intel_iic.c


示例7: pci_hostb_probe

/*
 * Provide a device to "eat" the host->pci bridge devices that show up
 * on PCI busses and stop them showing up twice on the probes.  This also
 * stops them showing up as 'none' in pciconf -l.  If the host bridge
 * provides an AGP capability then we create a child agp device for the
 * agp GART driver to attach to.
 */
static int
pci_hostb_probe(device_t dev)
{
	u_int32_t id;

	id = pci_get_devid(dev);

	switch (id) {

	/* VIA VT82C596 Power Managment Function */
	case 0x30501106:
		return (ENXIO);

	default:
		break;
	}

	if (pci_get_class(dev) == PCIC_BRIDGE &&
	    pci_get_subclass(dev) == PCIS_BRIDGE_HOST) {
		device_set_desc(dev, "Host to PCI bridge");
		device_quiet(dev);
		return (-10000);
	}
	return (ENXIO);
}
开发者ID:ele7enxxh,项目名称:dtrace-pf,代码行数:32,代码来源:hostb_pci.c


示例8: nexus_probe

static int
nexus_probe(device_t dev)
{

	if (!bootverbose)
		device_quiet(dev);
	return (BUS_PROBE_DEFAULT);
}
开发者ID:ornarium,项目名称:freebsd,代码行数:8,代码来源:nexus.c


示例9: ram_probe

static int
ram_probe(device_t dev)
{

	device_quiet(dev);
	device_set_desc(dev, "System RAM");
	return (0);
}
开发者ID:dcui,项目名称:FreeBSD-9.3_kernel,代码行数:8,代码来源:nexus.c


示例10: nexus_probe

static int
nexus_probe(device_t dev)
{
	int cpuid;

	device_quiet(dev);	/* suppress attach message for neatness */

	for (cpuid = 0; cpuid < ncpus; ++cpuid) {
		struct rman *rm = &irq_rman[cpuid];

		rm->rm_start = 0;
		rm->rm_end = IDT_HWI_VECTORS - 1;
		rm->rm_type = RMAN_ARRAY;
		rm->rm_descr = "Interrupt request lines";

		if (rman_init(rm, cpuid))
			panic("nexus_probe rman_init");
		MachIntrABI.rman_setup(rm);
	}

	/*
	 * ISA DMA on PCI systems is implemented in the ISA part of each
	 * PCI->ISA bridge and the channels can be duplicated if there are
	 * multiple bridges.  (eg: laptops with docking stations)
	 */
	drq_rman.rm_start = 0;
	drq_rman.rm_end = 7;
	drq_rman.rm_type = RMAN_ARRAY;
	drq_rman.rm_descr = "DMA request lines";
	/* XXX drq 0 not available on some machines */
	if (rman_init(&drq_rman, -1)
	    || rman_manage_region(&drq_rman,
				  drq_rman.rm_start, drq_rman.rm_end))
		panic("nexus_probe drq_rman");

	/*
	 * However, IO ports and Memory truely are global at this level,
	 * as are APIC interrupts (however many IO APICS there turn out
	 * to be on large systems..)
	 */
	port_rman.rm_start = 0;
	port_rman.rm_end = 0xffff;
	port_rman.rm_type = RMAN_ARRAY;
	port_rman.rm_descr = "I/O ports";
	if (rman_init(&port_rman, -1)
	    || rman_manage_region(&port_rman, 0, 0xffff))
		panic("nexus_probe port_rman");

	mem_rman.rm_start = 0;
	mem_rman.rm_end = ~0u;
	mem_rman.rm_type = RMAN_ARRAY;
	mem_rman.rm_descr = "I/O memory addresses";
	if (rman_init(&mem_rman, -1)
	    || rman_manage_region(&mem_rman, 0, ~0))
		panic("nexus_probe mem_rman");

	return bus_generic_probe(dev);
}
开发者ID:madhavsuresh,项目名称:DragonFlyBSD,代码行数:58,代码来源:nexus.c


示例11: nexus_acpi_probe

static int
nexus_acpi_probe(device_t dev)
{

	if (acpi_identify() != 0)
		return (ENXIO);

	device_quiet(dev);
	return (BUS_PROBE_LOW_PRIORITY);
}
开发者ID:outbackdingo,项目名称:uBSD,代码行数:10,代码来源:nexus.c


示例12: nexus_fdt_probe

static int
nexus_fdt_probe(device_t dev)
{

	if (OF_peer(0) == 0)
		return (ENXIO);

	device_quiet(dev);
	return (BUS_PROBE_DEFAULT);
}
开发者ID:outbackdingo,项目名称:uBSD,代码行数:10,代码来源:nexus.c


示例13: nexus_acpi_probe

static int
nexus_acpi_probe(device_t dev)
{

	if (arm64_bus_method != ARM64_BUS_ACPI || acpi_identify() != 0)
		return (ENXIO);

	device_quiet(dev);
	return (BUS_PROBE_LOW_PRIORITY);
}
开发者ID:nomadlogic,项目名称:freebsd-base-graphics,代码行数:10,代码来源:nexus.c


示例14: nexus_fdt_probe

static int
nexus_fdt_probe(device_t dev)
{

	if (arm64_bus_method != ARM64_BUS_FDT)
		return (ENXIO);

	device_quiet(dev);
	return (BUS_PROBE_DEFAULT);
}
开发者ID:nomadlogic,项目名称:freebsd-base-graphics,代码行数:10,代码来源:nexus.c


示例15: sysresource_probe

static int
sysresource_probe(device_t dev)
{
	int	result;
	
	if ((result = ISA_PNP_PROBE(device_get_parent(dev), dev, sysresource_ids)) <= 0) {
		device_quiet(dev);
	}
	return(result);
}
开发者ID:MarginC,项目名称:kame,代码行数:10,代码来源:nexus.c


示例16: bhnd_sprom_probe

/**
 * Default bhnd sprom driver implementation of DEVICE_PROBE().
 */
int
bhnd_sprom_probe(device_t dev)
{
	/* Quiet by default */
	if (!bootverbose)
		device_quiet(dev);
	device_set_desc(dev, "SPROM/OTP");

	/* Refuse wildcard attachments */
	return (BUS_PROBE_NOWILDCARD);
}
开发者ID:jaredmcneill,项目名称:freebsd,代码行数:14,代码来源:bhnd_sprom.c


示例17: fdtbus_probe

static int
fdtbus_probe(device_t dev)
{

	debugf("%s(dev=%p); pass=%u\n", __func__, dev, bus_current_pass);

	device_set_desc(dev, "FDT main bus");
	if (!bootverbose)
		device_quiet(dev);
	return (BUS_PROBE_DEFAULT);
}
开发者ID:ornarium,项目名称:freebsd,代码行数:11,代码来源:fdtbus.c


示例18: ignore_pci_probe

static int
ignore_pci_probe(device_t dev)
{
    switch (pci_get_devid(dev)) {
    case 0x10001042ul:	/* SMC 37C665 */
	device_set_desc(dev, "ignored");
	device_quiet(dev);
	return(-10000);
    }
    return(ENXIO);
}
开发者ID:FreeBSDFoundation,项目名称:freebsd,代码行数:11,代码来源:ignore_pci.c


示例19: dpms_probe

static int
dpms_probe(device_t dev)
{
	int error, states;

	error = dpms_get_supported_states(&states);
	if (error)
		return (error);
	device_set_desc(dev, "DPMS suspend/resume");
	device_quiet(dev);
	return (BUS_PROBE_DEFAULT);
}
开发者ID:edgar-pek,项目名称:PerspicuOS,代码行数:12,代码来源:dpms.c


示例20: unhb_probe

/*
 * Driver to swallow UniNorth host bridges from the PCI bus side.
 */
static int
unhb_probe(device_t dev)
{

	if (pci_get_class(dev) == PCIC_BRIDGE &&
	    pci_get_subclass(dev) == PCIS_BRIDGE_HOST) {
		device_set_desc(dev, "Host to PCI bridge");
		device_quiet(dev);
		return (-10000);
	}

	return (ENXIO);
}
开发者ID:MarginC,项目名称:kame,代码行数:16,代码来源:uninorth.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ device_release_driver函数代码示例发布时间:2022-05-30
下一篇:
C++ device_probe_and_attach函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap