pci_pci.c (239103) | pci_pci.c (253120) |
---|---|
1/*- 2 * Copyright (c) 1994,1995 Stefan Esser, Wolfgang StanglMeier 3 * Copyright (c) 2000 Michael Smith <msmith@freebsd.org> 4 * Copyright (c) 2000 BSDi 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 15 unchanged lines hidden (view full) --- 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 */ 30 31#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1994,1995 Stefan Esser, Wolfgang StanglMeier 3 * Copyright (c) 2000 Michael Smith <msmith@freebsd.org> 4 * Copyright (c) 2000 BSDi 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 15 unchanged lines hidden (view full) --- 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 */ 30 31#include <sys/cdefs.h> |
32__FBSDID("$FreeBSD: head/sys/dev/pci/pci_pci.c 239103 2012-08-06 19:49:57Z jhb $"); | 32__FBSDID("$FreeBSD: head/sys/dev/pci/pci_pci.c 253120 2013-07-09 23:12:26Z marius $"); |
33 34/* 35 * PCI:PCI bridge support. 36 */ 37 38#include <sys/param.h> 39#include <sys/bus.h> 40#include <sys/kernel.h> --- 54 unchanged lines hidden (view full) --- 95 DEVMETHOD(pcib_power_for_sleep, pcib_power_for_sleep), 96 97 DEVMETHOD_END 98}; 99 100static devclass_t pcib_devclass; 101 102DEFINE_CLASS_0(pcib, pcib_driver, pcib_methods, sizeof(struct pcib_softc)); | 33 34/* 35 * PCI:PCI bridge support. 36 */ 37 38#include <sys/param.h> 39#include <sys/bus.h> 40#include <sys/kernel.h> --- 54 unchanged lines hidden (view full) --- 95 DEVMETHOD(pcib_power_for_sleep, pcib_power_for_sleep), 96 97 DEVMETHOD_END 98}; 99 100static devclass_t pcib_devclass; 101 102DEFINE_CLASS_0(pcib, pcib_driver, pcib_methods, sizeof(struct pcib_softc)); |
103DRIVER_MODULE(pcib, pci, pcib_driver, pcib_devclass, 0, 0); | 103DRIVER_MODULE(pcib, pci, pcib_driver, pcib_devclass, NULL, NULL); |
104 105#ifdef NEW_PCIB 106/* 107 * XXX Todo: 108 * - properly handle the ISA enable bit. If it is set, we should change 109 * the behavior of the I/O window resource and rman to not allocate the 110 * blocked ranges (upper 768 bytes of each 1K in the first 64k of the 111 * I/O port address space). --- 507 unchanged lines hidden (view full) --- 619 } 620 break; 621 } 622 } 623 624 if (pci_msi_device_blacklisted(dev)) 625 sc->flags |= PCIB_DISABLE_MSI; 626 | 104 105#ifdef NEW_PCIB 106/* 107 * XXX Todo: 108 * - properly handle the ISA enable bit. If it is set, we should change 109 * the behavior of the I/O window resource and rman to not allocate the 110 * blocked ranges (upper 768 bytes of each 1K in the first 64k of the 111 * I/O port address space). --- 507 unchanged lines hidden (view full) --- 619 } 620 break; 621 } 622 } 623 624 if (pci_msi_device_blacklisted(dev)) 625 sc->flags |= PCIB_DISABLE_MSI; 626 |
627 if (pci_msix_device_blacklisted(dev)) 628 sc->flags |= PCIB_DISABLE_MSIX; 629 |
|
627 /* 628 * Intel 815, 845 and other chipsets say they are PCI-PCI bridges, 629 * but have a ProgIF of 0x80. The 82801 family (AA, AB, BAM/CAM, 630 * BA/CA/DB and E) PCI bridges are HUB-PCI bridges, in Intelese. 631 * This means they act as if they were subtractively decoding 632 * bridges and pass all transactions. Mark them and real ProgIf 1 633 * parts as subtractive. 634 */ --- 739 unchanged lines hidden (view full) --- 1374 1375/* Pass request to alloc an MSI-X message up to the parent bridge. */ 1376int 1377pcib_alloc_msix(device_t pcib, device_t dev, int *irq) 1378{ 1379 struct pcib_softc *sc = device_get_softc(pcib); 1380 device_t bus; 1381 | 630 /* 631 * Intel 815, 845 and other chipsets say they are PCI-PCI bridges, 632 * but have a ProgIF of 0x80. The 82801 family (AA, AB, BAM/CAM, 633 * BA/CA/DB and E) PCI bridges are HUB-PCI bridges, in Intelese. 634 * This means they act as if they were subtractively decoding 635 * bridges and pass all transactions. Mark them and real ProgIf 1 636 * parts as subtractive. 637 */ --- 739 unchanged lines hidden (view full) --- 1377 1378/* Pass request to alloc an MSI-X message up to the parent bridge. */ 1379int 1380pcib_alloc_msix(device_t pcib, device_t dev, int *irq) 1381{ 1382 struct pcib_softc *sc = device_get_softc(pcib); 1383 device_t bus; 1384 |
1382 if (sc->flags & PCIB_DISABLE_MSI) | 1385 if (sc->flags & PCIB_DISABLE_MSIX) |
1383 return (ENXIO); 1384 bus = device_get_parent(pcib); 1385 return (PCIB_ALLOC_MSIX(device_get_parent(bus), dev, irq)); 1386} 1387 1388/* Pass request to release an MSI-X message up to the parent bridge. */ 1389int 1390pcib_release_msix(device_t pcib, device_t dev, int irq) --- 33 unchanged lines hidden --- | 1386 return (ENXIO); 1387 bus = device_get_parent(pcib); 1388 return (PCIB_ALLOC_MSIX(device_get_parent(bus), dev, irq)); 1389} 1390 1391/* Pass request to release an MSI-X message up to the parent bridge. */ 1392int 1393pcib_release_msix(device_t pcib, device_t dev, int irq) --- 33 unchanged lines hidden --- |