Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d1a2523d authored by Bjorn Helgaas's avatar Bjorn Helgaas
Browse files

Merge branches 'pci/hotplug', 'pci/pci_is_bridge' and 'pci/virtualization' into next

* pci/hotplug:
  PCI: cpqphp: Fix possible null pointer dereference
  NVMe: Implement PCIe reset notification callback
  PCI: Notify driver before and after device reset

* pci/pci_is_bridge:
  pcmcia: Use pci_is_bridge() to simplify code
  PCI: pciehp: Use pci_is_bridge() to simplify code
  PCI: acpiphp: Use pci_is_bridge() to simplify code
  PCI: cpcihp: Use pci_is_bridge() to simplify code
  PCI: shpchp: Use pci_is_bridge() to simplify code
  PCI: rpaphp: Use pci_is_bridge() to simplify code
  sparc/PCI: Use pci_is_bridge() to simplify code
  powerpc/PCI: Use pci_is_bridge() to simplify code
  ia64/PCI: Use pci_is_bridge() to simplify code
  x86/PCI: Use pci_is_bridge() to simplify code
  PCI: Use pci_is_bridge() to simplify code
  PCI: Add new pci_is_bridge() interface
  PCI: Rename pci_is_bridge() to pci_has_subordinate()

* pci/virtualization:
  PCI: Introduce new device binding path using pci_dev.driver_override

Conflicts:
	drivers/pci/pci-sysfs.c
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -250,3 +250,24 @@ Description:
		valid.  For example, writing a 2 to this file when sriov_numvfs
		is not 0 and not 2 already will return an error. Writing a 10
		when the value of sriov_totalvfs is 8 will return an error.

What:		/sys/bus/pci/devices/.../driver_override
Date:		April 2014
Contact:	Alex Williamson <alex.williamson@redhat.com>
Description:
		This file allows the driver for a device to be specified which
		will override standard static and dynamic ID matching.  When
		specified, only a driver with a name matching the value written
		to driver_override will have an opportunity to bind to the
		device.  The override is specified by writing a string to the
		driver_override file (echo pci-stub > driver_override) and
		may be cleared with an empty string (echo > driver_override).
		This returns the device to standard matching rules binding.
		Writing to driver_override does not automatically unbind the
		device from its current driver or make any attempt to
		automatically load the specified driver.  If no driver with a
		matching name is currently loaded in the kernel, the device
		will not bind to any driver.  This also allows devices to
		opt-out of driver binding using a driver_override name such as
		"none".  Only a single driver may be specified in the override,
		there is no support for parsing delimiters.
+1 −3
Original line number Diff line number Diff line
@@ -49,9 +49,7 @@ static void pci_fixup_video(struct pci_dev *pdev)
		 * type BRIDGE, or CARDBUS. Host to PCI controllers use
		 * PCI header type NORMAL.
		 */
		if (bridge
		    &&((bridge->hdr_type == PCI_HEADER_TYPE_BRIDGE)
		       ||(bridge->hdr_type == PCI_HEADER_TYPE_CARDBUS))) {
		if (bridge && (pci_is_bridge(bridge))) {
			pci_read_config_word(bridge, PCI_BRIDGE_CONTROL,
						&config);
			if (!(config & PCI_BRIDGE_CTL_VGA))
+1 −2
Original line number Diff line number Diff line
@@ -98,8 +98,7 @@ void pcibios_add_pci_devices(struct pci_bus * bus)
		max = bus->busn_res.start;
		for (pass = 0; pass < 2; pass++) {
			list_for_each_entry(dev, &bus->devices, bus_list) {
				if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE ||
				    dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)
				if (pci_is_bridge(dev))
					max = pci_scan_bridge(bus, dev,
							      max, pass);
			}
+1 −2
Original line number Diff line number Diff line
@@ -362,8 +362,7 @@ static void __of_scan_bus(struct device_node *node, struct pci_bus *bus,

	/* Now scan child busses */
	list_for_each_entry(dev, &bus->devices, bus_list) {
		if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE ||
		    dev->hdr_type == PCI_HEADER_TYPE_CARDBUS) {
		if (pci_is_bridge(dev)) {
			of_scan_pci_bridge(dev);
		}
	}
+1 −2
Original line number Diff line number Diff line
@@ -543,8 +543,7 @@ static void pci_of_scan_bus(struct pci_pbm_info *pbm,
			printk("PCI: dev header type: %x\n",
			       dev->hdr_type);

		if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE ||
		    dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)
		if (pci_is_bridge(dev))
			of_scan_pci_bridge(pbm, child, dev);
	}
}
Loading