Lines Matching +full:non +full:- +full:compliant
1 // SPDX-License-Identifier: GPL-2.0
2 /* uio_pci_generic - generic UIO driver for PCI 2.3 devices
11 * # echo -n 0000:00:19.0 > /sys/bus/pci/drivers/e1000e/unbind
12 * # echo -n 0000:00:19.0 > /sys/bus/pci/drivers/uio_pci_generic/bind
13 * # ls -l /sys/bus/pci/devices/0000:00:19.0/driver
14 * .../0000:00:19.0/driver -> ../../../bus/pci/drivers/uio_pci_generic
17 * in the command register. All devices compliant to PCI 2.3 (circa 2002) and
18 * all compliant PCI Express devices should support this bit.
51 * Note that there's a non-zero chance doing this will wedge the device in release()
54 pci_clear_master(gdev->pdev); in release()
64 if (!pci_check_and_mask_intx(gdev->pdev)) in irqhandler()
81 dev_err(&pdev->dev, "%s: pci_enable_device failed: %d\n", in probe()
86 if (pdev->irq && !pci_intx_mask_supported(pdev)) in probe()
87 return -ENODEV; in probe()
89 gdev = devm_kzalloc(&pdev->dev, sizeof(struct uio_pci_generic_dev), GFP_KERNEL); in probe()
91 return -ENOMEM; in probe()
93 gdev->info.name = "uio_pci_generic"; in probe()
94 gdev->info.version = DRIVER_VERSION; in probe()
95 gdev->info.release = release; in probe()
96 gdev->pdev = pdev; in probe()
97 if (pdev->irq && (pdev->irq != IRQ_NOTCONNECTED)) { in probe()
98 gdev->info.irq = pdev->irq; in probe()
99 gdev->info.irq_flags = IRQF_SHARED; in probe()
100 gdev->info.handler = irqhandler; in probe()
102 dev_warn(&pdev->dev, "No IRQ assigned to device: " in probe()
106 uiomem = &gdev->info.mem[0]; in probe()
108 struct resource *r = &pdev->resource[i]; in probe()
110 if (r->flags != (IORESOURCE_SIZEALIGN | IORESOURCE_MEM)) in probe()
113 if (uiomem >= &gdev->info.mem[MAX_UIO_MAPS]) { in probe()
115 &pdev->dev, in probe()
121 uiomem->memtype = UIO_MEM_PHYS; in probe()
122 uiomem->addr = r->start & PAGE_MASK; in probe()
123 uiomem->offs = r->start & ~PAGE_MASK; in probe()
124 uiomem->size = in probe()
125 (uiomem->offs + resource_size(r) + PAGE_SIZE - 1) & in probe()
127 uiomem->name = r->name; in probe()
131 while (uiomem < &gdev->info.mem[MAX_UIO_MAPS]) { in probe()
132 uiomem->size = 0; in probe()
136 return devm_uio_register_device(&pdev->dev, &gdev->info); in probe()