Commit 0f6662a4 authored by Bjorn Helgaas's avatar Bjorn Helgaas
Browse files

Merge branch 'topic/bjorn-trivial' into next

* topic/bjorn-trivial:
  PCI: remove useless pcix_set_mmrbc() dev->bus check
  PCI: acpiphp: check whether _ADR evaluation succeeded
  PCI: shpchp: remove dead code
  PCI: fix P2P bridge I/O port window sign extension
  PCI: fix upstream P2P bridge checks when enabling OBFF and LTR
  PCI: use __weak consistently
  PCI: cleanup assign_requested_resources_sorted() kernel-doc warning
  sparc/PCI: remove unused pcibios_assign_resource() definition
parents 1693c427 809a3bf9
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -884,11 +884,6 @@ void __init sun4m_pci_init_IRQ(void)
	sparc_config.load_profile_irq = pcic_load_profile_irq;
}

int pcibios_assign_resource(struct pci_dev *pdev, int resource)
{
	return -ENXIO;
}

/*
 * This probably belongs here rather than ioport.c because
 * we do not want this crud linked into SBus kernels.
+9 −4
Original line number Diff line number Diff line
@@ -132,6 +132,15 @@ register_slot(acpi_handle handle, u32 lvl, void *context, void **rv)
	if (!acpi_pci_check_ejectable(pbus, handle) && !is_dock_device(handle))
		return AE_OK;

	status = acpi_evaluate_integer(handle, "_ADR", NULL, &adr);
	if (ACPI_FAILURE(status)) {
		warn("can't evaluate _ADR (%#x)\n", status);
		return AE_OK;
	}

	device = (adr >> 16) & 0xffff;
	function = adr & 0xffff;

	pdev = pbus->self;
	if (pdev && pci_is_pcie(pdev)) {
		tmp = acpi_find_root_bridge_handle(pdev);
@@ -144,10 +153,6 @@ register_slot(acpi_handle handle, u32 lvl, void *context, void **rv)
		}
	}

	acpi_evaluate_integer(handle, "_ADR", NULL, &adr);
	device = (adr >> 16) & 0xffff;
	function = adr & 0xffff;

	newfunc = kzalloc(sizeof(struct acpiphp_func), GFP_KERNEL);
	if (!newfunc)
		return AE_NO_MEMORY;
+0 −3
Original line number Diff line number Diff line
@@ -262,9 +262,6 @@ static int board_added(struct slot *p_slot)
	}

	if ((ctrl->pci_dev->vendor == 0x8086) && (ctrl->pci_dev->device == 0x0332)) {
		if (slots_not_empty)
			return WRONG_BUS_FREQUENCY;

		if ((rc = p_slot->hpc_ops->set_bus_speed_mode(p_slot, PCI_SPEED_33MHz))) {
			ctrl_err(ctrl, "%s: Issue of set bus speed mode command"
				 " failed\n", __func__);
+1 −1
Original line number Diff line number Diff line
@@ -1112,7 +1112,7 @@ static struct bin_attribute pcie_config_attr = {
	.write = pci_write_config,
};

int __attribute__ ((weak)) pcibios_add_platform_entries(struct pci_dev *dev)
int __weak pcibios_add_platform_entries(struct pci_dev *dev)
{
	return 0;
}
+7 −8
Original line number Diff line number Diff line
@@ -1311,7 +1311,7 @@ void pcim_pin_device(struct pci_dev *pdev)
 * is the default implementation. Architecture implementations can
 * override this.
 */
void __attribute__ ((weak)) pcibios_disable_device (struct pci_dev *dev) {}
void __weak pcibios_disable_device (struct pci_dev *dev) {}

static void do_pci_disable_device(struct pci_dev *dev)
{
@@ -1375,7 +1375,7 @@ pci_disable_device(struct pci_dev *dev)
 * Sets the PCIe reset state for the device. This is the default
 * implementation. Architecture implementations can override this.
 */
int __attribute__ ((weak)) pcibios_set_pcie_reset_state(struct pci_dev *dev,
int __weak pcibios_set_pcie_reset_state(struct pci_dev *dev,
					enum pcie_reset_state state)
{
	return -EINVAL;
@@ -2063,7 +2063,7 @@ int pci_enable_obff(struct pci_dev *dev, enum pci_obff_signal_type type)
		return -ENOTSUPP; /* no OBFF support at all */

	/* Make sure the topology supports OBFF as well */
	if (dev->bus) {
	if (dev->bus->self) {
		ret = pci_enable_obff(dev->bus->self, type);
		if (ret)
			return ret;
@@ -2166,7 +2166,7 @@ int pci_enable_ltr(struct pci_dev *dev)
		return -EINVAL;

	/* Enable upstream ports first */
	if (dev->bus) {
	if (dev->bus->self) {
		ret = pci_enable_ltr(dev->bus->self);
		if (ret)
			return ret;
@@ -3419,8 +3419,7 @@ int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc)

	o = (cmd & PCI_X_CMD_MAX_READ) >> 2;
	if (o != v) {
		if (v > o && dev->bus &&
		   (dev->bus->bus_flags & PCI_BUS_FLAGS_NO_MMRBC))
		if (v > o && (dev->bus->bus_flags & PCI_BUS_FLAGS_NO_MMRBC))
			return -EIO;

		cmd &= ~PCI_X_CMD_MAX_READ;
@@ -3875,7 +3874,7 @@ static void __devinit pci_no_domains(void)
 * greater than 0xff). This is the default implementation. Architecture
 * implementations can override this.
 */
int __attribute__ ((weak)) pci_ext_cfg_avail(struct pci_dev *dev)
int __weak pci_ext_cfg_avail(struct pci_dev *dev)
{
	return 1;
}
Loading