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

Commit de9b2fcc authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (22 commits)
  acpiphp: Link-time error for PCI Hotplug
  shpchp: cleanup shpchp.h
  shpchp: remove shpchprm_get_physical_slot_number
  shpchp: cleanup struct controller
  shpchp: remove unnecessary struct php_ctlr
  PCI: ATI sb600 sata quirk
  PCI legacy resource fix
  PCI: don't export device IDs to userspace
  PCI: Be a bit defensive in quirk_nvidia_ck804() so we don't risk dereferencing a NULL pdev.
  PCI: Fix multiple problems with VIA hardware
  PCI: Only check the HT capability bits in mpic.c
  PCI: Use pci_find_ht_capability() in drivers/pci/quirks.c
  PCI: Add #defines for Hypertransport MSI fields
  PCI: Use pci_find_ht_capability() in drivers/pci/htirq.c
  PCI: Add pci_find_ht_capability() for finding Hypertransport capabilities
  PCI: Create __pci_bus_find_cap_start() from __pci_bus_find_cap()
  pci: Introduce pci_find_present
  PCI: pcieport-driver: remove invalid warning message
  rpaphp: compiler warning cleanup
  PCI quirks: remove redundant check
  ...
parents fb34d203 031f30d2
Loading
Loading
Loading
Loading
+10 −3
Original line number Original line Diff line number Diff line
@@ -115,7 +115,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3, pci
#define VIA_8363_KL133_REVISION_ID 0x81
#define VIA_8363_KL133_REVISION_ID 0x81
#define VIA_8363_KM133_REVISION_ID 0x84
#define VIA_8363_KM133_REVISION_ID 0x84


static void __devinit pci_fixup_via_northbridge_bug(struct pci_dev *d)
static void pci_fixup_via_northbridge_bug(struct pci_dev *d)
{
{
	u8 v;
	u8 v;
	u8 revision;
	u8 revision;
@@ -151,6 +151,10 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8363_0, pci_fixup_
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8622, pci_fixup_via_northbridge_bug);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8622, pci_fixup_via_northbridge_bug);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8361, pci_fixup_via_northbridge_bug);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8361, pci_fixup_via_northbridge_bug);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8367_0, pci_fixup_via_northbridge_bug);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8367_0, pci_fixup_via_northbridge_bug);
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8363_0, pci_fixup_via_northbridge_bug);
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8622, pci_fixup_via_northbridge_bug);
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8361, pci_fixup_via_northbridge_bug);
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8367_0, pci_fixup_via_northbridge_bug);


/*
/*
 * For some reasons Intel decided that certain parts of their
 * For some reasons Intel decided that certain parts of their
@@ -181,7 +185,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_fixup_transparent_
 * issue another HALT within 80 ns of the initial HALT, the failure condition
 * issue another HALT within 80 ns of the initial HALT, the failure condition
 * is avoided.
 * is avoided.
 */
 */
static void __init pci_fixup_nforce2(struct pci_dev *dev)
static void pci_fixup_nforce2(struct pci_dev *dev)
{
{
	u32 val;
	u32 val;


@@ -204,6 +208,7 @@ static void __init pci_fixup_nforce2(struct pci_dev *dev)
	}
	}
}
}
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2, pci_fixup_nforce2);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2, pci_fixup_nforce2);
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2, pci_fixup_nforce2);


/* Max PCI Express root ports */
/* Max PCI Express root ports */
#define MAX_PCIEROOT	6
#define MAX_PCIEROOT	6
@@ -419,7 +424,7 @@ DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_TI, 0x8032,
 * Prevent the BIOS trapping accesses to the Cyrix CS5530A video device
 * Prevent the BIOS trapping accesses to the Cyrix CS5530A video device
 * configuration space.
 * configuration space.
 */
 */
static void __devinit pci_early_fixup_cyrix_5530(struct pci_dev *dev)
static void pci_early_fixup_cyrix_5530(struct pci_dev *dev)
{
{
	u8 r;
	u8 r;
	/* clear 'F4 Video Configuration Trap' bit */
	/* clear 'F4 Video Configuration Trap' bit */
@@ -429,3 +434,5 @@ static void __devinit pci_early_fixup_cyrix_5530(struct pci_dev *dev)
}
}
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_LEGACY,
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_LEGACY,
			pci_early_fixup_cyrix_5530);
			pci_early_fixup_cyrix_5530);
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_LEGACY,
			pci_early_fixup_cyrix_5530);
+1 −1
Original line number Original line Diff line number Diff line
@@ -390,7 +390,7 @@ static void __init mpic_scan_ht_pic(struct mpic *mpic, u8 __iomem *devbase,
		u8 id = readb(devbase + pos + PCI_CAP_LIST_ID);
		u8 id = readb(devbase + pos + PCI_CAP_LIST_ID);
		if (id == PCI_CAP_ID_HT) {
		if (id == PCI_CAP_ID_HT) {
			id = readb(devbase + pos + 3);
			id = readb(devbase + pos + 3);
			if (id == HT_CAPTYPE_IRQ)
			if ((id & HT_5BIT_CAP_MASK) == HT_CAPTYPE_IRQ)
				break;
				break;
		}
		}
	}
	}
+0 −1
Original line number Original line Diff line number Diff line
@@ -368,7 +368,6 @@ static struct pci_device_id atiixp_pci_tbl[] = {
	{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP300_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
	{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP300_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
	{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
	{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
	{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
	{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
	{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_SATA, PCI_ANY_ID, PCI_ANY_ID, (PCI_CLASS_STORAGE_IDE<<8)|0x8a, 0xffff05, 1},
	{ 0, },
	{ 0, },
};
};
MODULE_DEVICE_TABLE(pci, atiixp_pci_tbl);
MODULE_DEVICE_TABLE(pci, atiixp_pci_tbl);
+1 −1
Original line number Original line Diff line number Diff line
@@ -1682,7 +1682,7 @@ int __init acpiphp_glue_init(void)
 *
 *
 * This function frees all data allocated in acpiphp_glue_init()
 * This function frees all data allocated in acpiphp_glue_init()
 */
 */
void __exit acpiphp_glue_exit(void)
void  acpiphp_glue_exit(void)
{
{
	acpi_pci_unregister_driver(&acpi_pci_hp_driver);
	acpi_pci_unregister_driver(&acpi_pci_hp_driver);
}
}
+23 −24
Original line number Original line Diff line number Diff line
@@ -47,21 +47,11 @@ static ssize_t location_read_file (struct hotplug_slot *php_slot, char *buf)
	return retval;
	return retval;
}
}


static struct hotplug_slot_attribute hotplug_slot_attr_location = {
static struct hotplug_slot_attribute php_attr_location = {
	.attr = {.name = "phy_location", .mode = S_IFREG | S_IRUGO},
	.attr = {.name = "phy_location", .mode = S_IFREG | S_IRUGO},
	.show = location_read_file,
	.show = location_read_file,
};
};


static void rpaphp_sysfs_add_attr_location (struct hotplug_slot *slot)
{
	sysfs_create_file(&slot->kobj, &hotplug_slot_attr_location.attr);
}

static void rpaphp_sysfs_remove_attr_location (struct hotplug_slot *slot)
{
	sysfs_remove_file(&slot->kobj, &hotplug_slot_attr_location.attr);
}

/* free up the memory used by a slot */
/* free up the memory used by a slot */
static void rpaphp_release_slot(struct hotplug_slot *hotplug_slot)
static void rpaphp_release_slot(struct hotplug_slot *hotplug_slot)
{
{
@@ -145,7 +135,7 @@ int rpaphp_deregister_slot(struct slot *slot)
	list_del(&slot->rpaphp_slot_list);
	list_del(&slot->rpaphp_slot_list);
	
	
	/* remove "phy_location" file */
	/* remove "phy_location" file */
	rpaphp_sysfs_remove_attr_location(php_slot);
	sysfs_remove_file(&php_slot->kobj, &php_attr_location.attr);


	retval = pci_hp_deregister(php_slot);
	retval = pci_hp_deregister(php_slot);
	if (retval)
	if (retval)
@@ -160,36 +150,45 @@ EXPORT_SYMBOL_GPL(rpaphp_deregister_slot);


int rpaphp_register_slot(struct slot *slot)
int rpaphp_register_slot(struct slot *slot)
{
{
	struct hotplug_slot *php_slot = slot->hotplug_slot;
	int retval;
	int retval;


	dbg("%s registering slot:path[%s] index[%x], name[%s] pdomain[%x] type[%d]\n", 
	dbg("%s registering slot:path[%s] index[%x], name[%s] pdomain[%x] type[%d]\n", 
		__FUNCTION__, slot->dn->full_name, slot->index, slot->name, 
		__FUNCTION__, slot->dn->full_name, slot->index, slot->name, 
		slot->power_domain, slot->type);
		slot->power_domain, slot->type);

	/* should not try to register the same slot twice */
	/* should not try to register the same slot twice */
	if (is_registered(slot)) { /* should't be here */
	if (is_registered(slot)) {
		err("rpaphp_register_slot: slot[%s] is already registered\n", slot->name);
		err("rpaphp_register_slot: slot[%s] is already registered\n", slot->name);
		rpaphp_release_slot(slot->hotplug_slot);
		retval = -EAGAIN;
		return -EAGAIN;
		goto register_fail;
	}	
	}	
	retval = pci_hp_register(slot->hotplug_slot);

	retval = pci_hp_register(php_slot);
	if (retval) {
	if (retval) {
		err("pci_hp_register failed with error %d\n", retval);
		err("pci_hp_register failed with error %d\n", retval);
		rpaphp_release_slot(slot->hotplug_slot);
		goto register_fail;
		return retval;
	}
	}


	/* create "phy_locatoin" file */
	/* create "phy_location" file */
	rpaphp_sysfs_add_attr_location(slot->hotplug_slot);	
	retval = sysfs_create_file(&php_slot->kobj, &php_attr_location.attr);
	if (retval) {
		err("sysfs_create_file failed with error %d\n", retval);
		goto sysfs_fail;
	}


	/* add slot to our internal list */
	/* add slot to our internal list */
	dbg("%s adding slot[%s] to rpaphp_slot_list\n",
	    __FUNCTION__, slot->name);

	list_add(&slot->rpaphp_slot_list, &rpaphp_slot_head);
	list_add(&slot->rpaphp_slot_list, &rpaphp_slot_head);
	info("Slot [%s](PCI location=%s) registered\n", slot->name,
	info("Slot [%s](PCI location=%s) registered\n", slot->name,
			slot->location);
			slot->location);
	num_slots++;
	num_slots++;
	return 0;
	return 0;

sysfs_fail:
	pci_hp_deregister(php_slot);
register_fail:
	rpaphp_release_slot(php_slot);
	return retval;
}
}


int rpaphp_get_power_status(struct slot *slot, u8 * value)
int rpaphp_get_power_status(struct slot *slot, u8 * value)
Loading