Lines Matching refs:dev

96 #include <dev/led/led.h>
97 #include <dev/pci/pcireg.h>
98 #include <dev/pci/pcivar.h>
100 #include <dev/pci/pci_private.h>
110 #include <dev/pci/pci_iov.h>
794 #include <dev/netmap/netmap_kern.h>
1468 device_t dev = ctx->ifc_dev;
1470 err = bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */
1483 device_printf(dev,
1492 device_printf(dev,
1502 device_printf(dev,
1676 device_t dev = ctx->ifc_dev;
1684 res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &i, flags);
1686 device_printf(dev,
1692 rc = bus_setup_intr(dev, res, INTR_MPSAFE | INTR_TYPE_NET,
1695 device_printf(dev,
1700 bus_describe_intr(dev, res, tag, "%s", name);
1721 device_t dev = ctx->ifc_dev;
1742 if ((err = bus_dma_tag_create(bus_get_dma_tag(dev),
1754 device_printf(dev,"Unable to allocate TX DMA tag: %d\n", err);
1755 device_printf(dev,"maxsize: %ju nsegments: %d maxsegsize: %ju\n",
1760 if (tso && (err = bus_dma_tag_create(bus_get_dma_tag(dev),
1772 device_printf(dev, "Unable to allocate TSO TX DMA tag: %d\n",
1781 device_printf(dev, "Unable to allocate TX mbuf map memory\n");
1792 device_printf(dev,
1800 device_printf(dev,
1809 device_printf(dev, "Unable to create TX DMA map\n");
1817 device_printf(dev, "Unable to create TSO TX DMA map\n");
1962 device_t dev = ctx->ifc_dev;
1973 err = bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */
1986 device_printf(dev,
1995 device_printf(dev,
2005 device_printf(dev,
2015 device_printf(dev,
2026 device_printf(dev,
2035 device_printf(dev, "Unable to create RX buffer DMA map\n");
3467 iflib_ether_pad(device_t dev, struct mbuf **m_head, uint16_t min_frame_size)
3481 device_printf(dev, "cannot pad short frame, m_dup() failed");
3497 device_printf(dev, "cannot pad short frame\n");
4617 iflib_device_probe(device_t dev)
4624 if ((sctx = DEVICE_REGISTER(dev)) == NULL || sctx->isc_magic != IFLIB_MAGIC)
4627 pci_vendor_id = pci_get_vendor(dev);
4628 pci_device_id = pci_get_device(dev);
4629 pci_subvendor_id = pci_get_subvendor(dev);
4630 pci_subdevice_id = pci_get_subdevice(dev);
4631 pci_rev_id = pci_get_revid(dev);
4648 device_set_desc_copy(dev, ent->pvi_name);
4662 iflib_device_probe_vendor(device_t dev)
4666 probe = iflib_device_probe(dev);
4680 device_t dev = ctx->ifc_dev;
4704 device_printf(dev, "nrxd%d: %d less than nrxd_min %d - resetting to min\n",
4709 device_printf(dev, "nrxd%d: %d greater than nrxd_max %d - resetting to max\n",
4714 device_printf(dev, "nrxd%d: %d is not a power of 2 - using default value of %d\n",
4722 device_printf(dev, "ntxd%d: %d less than ntxd_min %d - resetting to min\n",
4727 device_printf(dev, "ntxd%d: %d greater than ntxd_max %d - resetting to max\n",
4732 device_printf(dev, "ntxd%d: %d is not a power of 2 - using default value of %d\n",
5105 iflib_device_register(device_t dev, void *sc, if_shared_ctx_t sctx, if_ctx_t *ctxp)
5119 device_set_softc(dev, ctx);
5124 ctx->ifc_dev = dev;
5128 device_printf(dev, "iflib_register failed %d\n", err);
5139 device_printf(dev, "IFDI_ATTACH_PRE failed %d\n", err);
5167 device_printf(dev, "Using %d TX descriptors and %d RX descriptors\n",
5210 if (bus_get_cpus(dev, INTR_CPUS, sizeof(ctx->ifc_cpus), &ctx->ifc_cpus) != 0) {
5211 device_printf(dev, "Unable to fetch CPU list\n");
5240 device_printf(dev, "Unable to allocate queue memory\n");
5265 device_printf(dev,
5278 device_printf(dev,
5291 device_printf(dev, "IFDI_MSIX_INTR_ASSIGN failed %d\n",
5302 device_printf(dev, "iflib_legacy_setup failed %d\n", err);
5306 device_printf(dev,
5315 device_printf(dev, "IFDI_ATTACH_POST failed %d\n", err);
5365 iflib_pseudo_register(device_t dev, if_shared_ctx_t sctx, if_ctx_t *ctxp,
5384 ctx->ifc_dev = dev;
5387 device_printf(dev, "%s: iflib_register failed %d\n", __func__, err);
5398 device_printf(dev, "IFDI_ATTACH_PRE failed %d\n", err);
5407 device_printf(dev, "IFDI_CLONEATTACH failed %d\n", err);
5430 device_printf(dev, "IFDI_ATTACH_POST failed %d\n", err);
5466 device_printf(dev, "Using %d TX descriptors and %d RX descriptors\n",
5512 device_printf(dev, "Unable to allocate queue memory\n");
5517 device_printf(dev, "qset structure setup failed %d\n", err);
5526 device_printf(dev, "IFDI_ATTACH_POST failed %d\n", err);
5600 iflib_device_attach(device_t dev)
5605 if ((sctx = DEVICE_REGISTER(dev)) == NULL || sctx->isc_magic != IFLIB_MAGIC)
5608 pci_enable_busmaster(dev);
5610 return (iflib_device_register(dev, NULL, sctx, &ctx));
5617 device_t dev = ctx->ifc_dev;
5621 device_printf(dev, "Vlan in use, detach first\n");
5625 if (!CTX_IS_VF(ctx) && pci_iov_detach(dev) != 0) {
5626 device_printf(dev, "SR-IOV in use; detach first.\n");
5661 bus_generic_detach(dev);
5720 iflib_device_detach(device_t dev)
5722 if_ctx_t ctx = device_get_softc(dev);
5728 iflib_device_suspend(device_t dev)
5730 if_ctx_t ctx = device_get_softc(dev);
5736 return bus_generic_suspend(dev);
5739 iflib_device_shutdown(device_t dev)
5741 if_ctx_t ctx = device_get_softc(dev);
5747 return bus_generic_suspend(dev);
5751 iflib_device_resume(device_t dev)
5753 if_ctx_t ctx = device_get_softc(dev);
5763 return (bus_generic_resume(dev));
5767 iflib_device_iov_init(device_t dev, uint16_t num_vfs, const nvlist_t *params)
5770 if_ctx_t ctx = device_get_softc(dev);
5780 iflib_device_iov_uninit(device_t dev)
5782 if_ctx_t ctx = device_get_softc(dev);
5790 iflib_device_iov_add_vf(device_t dev, uint16_t vfnum, const nvlist_t *params)
5793 if_ctx_t ctx = device_get_softc(dev);
5896 device_t dev = ctx->ifc_dev;
5915 device_printf(dev, "can not allocate ifnet structure\n");
5925 if_initname(ifp, device_get_name(dev), device_get_unit(dev));
5927 if_setdev(ifp, dev);
6010 device_t dev = ctx->ifc_dev;
6036 device_printf(dev, "Unable to allocate TX ring memory\n");
6045 device_printf(dev, "Unable to allocate RX ring memory\n");
6061 device_printf(dev,
6069 device_printf(dev,
6086 device_printf(dev, "Critical Failure setting up TX buffers\n");
6093 device_get_nameunit(dev), txq->ift_id);
6108 device_printf(dev, "Unable to allocate buf_ring\n");
6119 device_printf(dev,
6131 device_printf(dev,
6144 device_printf(dev, "Unable to allocate free list memory\n");
6157 device_printf(dev,
6361 device_t dev;
6365 dev = ctx->ifc_dev;
6368 err = taskqgroup_attach_cpu(tqg, gtask, uniq, cpuid, dev,
6371 device_printf(dev, "taskqgroup_attach_cpu failed %d\n", err);
6386 device_t dev;
6448 dev = ctx->ifc_dev;
6451 device_printf(dev, "_iflib_irq_alloc failed %d\n", err);
6463 taskqgroup_attach(tqg, gtask, q, dev, irq->ii_res, name);
6472 device_t dev;
6506 dev = ctx->ifc_dev;
6507 taskqgroup_attach(tqg, gtask, q, dev, irq ? irq->ii_res : NULL,
6535 device_t dev;
6556 dev = ctx->ifc_dev;
6564 taskqgroup_attach(tqg, gtask, q, dev, res, name);
6567 taskqgroup_attach(qgroup_if_io_tqg, &txq->ift_task, txq, dev, res,
6714 device_t dev = ctx->ifc_dev;
6724 device_printf(dev, "msix_init qsets capped at %d\n",
6732 if ((msgs = pci_msix_count(dev)) == 0) {
6734 device_printf(dev, "MSI-X not supported or disabled\n");
6747 ctx->ifc_msix_mem = bus_alloc_resource_any(dev,
6750 device_printf(dev, "Unable to map MSI-X table\n");
6770 device_printf(dev,
6801 device_printf(dev,
6811 device_printf(dev,
6817 device_printf(dev, "Using %d RX queues %d TX queues\n", rx_queues,
6820 if ((err = pci_alloc_msix(dev, &vectors)) == 0) {
6822 device_printf(dev,
6825 pci_release_msi(dev);
6827 bus_release_resource(dev, SYS_RES_MEMORY, bar,
6833 device_printf(dev, "Using MSI-X interrupts with %d vectors\n",
6842 device_printf(dev,
6846 bus_release_resource(dev, SYS_RES_MEMORY, bar,
6853 vectors = pci_msi_count(dev);
6857 if (vectors == 1 && pci_alloc_msi(dev, &vectors) == 0) {
6858 device_printf(dev,"Using an MSI interrupt\n");
6862 device_printf(dev,"Using a Legacy interrupt\n");
6959 device_t dev = iflib_get_dev(ctx);
6964 ctx_list = device_get_sysctl_ctx(dev);
6965 child = SYSCTL_CHILDREN(device_get_sysctl_tree(dev));
7021 device_t dev = iflib_get_dev(ctx);
7032 ctx_list = device_get_sysctl_ctx(dev);