diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2005-11-15 16:46:09 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-11-15 16:46:09 -0800 |
commit | 7576327673eaa3e92134fb752163a0481836d71b (patch) | |
tree | 2661a9c739bc17dcab9ffd4d2865fb007f0fcba2 /pci | |
parent | e878580f6ea5b3217d94bb2184ce848595b56d6b (diff) | |
download | patches-7576327673eaa3e92134fb752163a0481836d71b.tar.gz |
usb and pci patches
Diffstat (limited to 'pci')
-rw-r--r-- | pci/pci-express-hotplug-clear-sticky-power-fault-bit.patch | 116 | ||||
-rw-r--r-- | pci/pci-trivial-printk-updates-in-common.c.patch | 39 |
2 files changed, 155 insertions, 0 deletions
diff --git a/pci/pci-express-hotplug-clear-sticky-power-fault-bit.patch b/pci/pci-express-hotplug-clear-sticky-power-fault-bit.patch new file mode 100644 index 0000000000000..ceff599099fa7 --- /dev/null +++ b/pci/pci-express-hotplug-clear-sticky-power-fault-bit.patch @@ -0,0 +1,116 @@ +From pcihpd-discuss-admin@lists.sourceforge.net Thu Nov 10 11:49:16 2005 +From: Rajesh Shah <rajesh.shah@intel.com> +To: <kristen.c.accardi@intel.com>, <gregkh@suse.de> +Cc: <thomas.schaefer@kontron.com> +Message-ID: <20051110114536.B18893@unix-os.sc.intel.com> +Content-Disposition: inline +Subject: PCI Express Hotplug: clear sticky power-fault bit +Date: Thu, 10 Nov 2005 11:45:36 -0800 + + +Per the PCI Express spec, the power-fault-detected bit in the +slot status register can be set anytime hardware detects a power +fault, regardless of whether the slot has a device populated in +it or not. This bit is sticky and must be explicitly cleared. +This patch is needed to allow hot-add after such a power fault +has been detected. + +Signed-off-by: Rajesh Shah <rajesh.shah@intel.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/pci/hotplug/pciehp.h | 1 - + drivers/pci/hotplug/pciehp_ctrl.c | 15 ++------------- + drivers/pci/hotplug/pciehp_hpc.c | 10 +++++++++- + 3 files changed, 11 insertions(+), 15 deletions(-) + +--- gregkh-2.6.orig/drivers/pci/hotplug/pciehp.h ++++ gregkh-2.6/drivers/pci/hotplug/pciehp.h +@@ -59,7 +59,6 @@ struct slot { + struct slot *next; + u8 bus; + u8 device; +- u16 status; + u32 number; + u8 state; + struct timer_list task_event; +--- gregkh-2.6.orig/drivers/pci/hotplug/pciehp_ctrl.c ++++ gregkh-2.6/drivers/pci/hotplug/pciehp_ctrl.c +@@ -207,7 +207,6 @@ u8 pciehp_handle_power_fault(u8 hp_slot, + * power fault Cleared + */ + info("Power fault cleared on Slot(%d)\n", ctrl->first_slot + hp_slot); +- p_slot->status = 0x00; + taskInfo->event_type = INT_POWER_FAULT_CLEAR; + } else { + /* +@@ -215,8 +214,6 @@ u8 pciehp_handle_power_fault(u8 hp_slot, + */ + info("Power fault on Slot(%d)\n", ctrl->first_slot + hp_slot); + taskInfo->event_type = INT_POWER_FAULT; +- /* set power fault status for this board */ +- p_slot->status = 0xFF; + info("power fault bit %x set\n", hp_slot); + } + if (rc) +@@ -317,13 +314,10 @@ static int board_added(struct slot *p_sl + return rc; + } + +- dbg("%s: slot status = %x\n", __FUNCTION__, p_slot->status); +- + /* Check for a power fault */ +- if (p_slot->status == 0xFF) { +- /* power fault occurred, but it was benign */ ++ if (p_slot->hpc_ops->query_power_fault(p_slot)) { ++ dbg("%s: power fault detected\n", __FUNCTION__); + rc = POWER_FAILURE; +- p_slot->status = 0; + goto err_exit; + } + +@@ -334,8 +328,6 @@ static int board_added(struct slot *p_sl + goto err_exit; + } + +- p_slot->status = 0; +- + /* + * Some PCI Express root ports require fixup after hot-plug operation. + */ +@@ -382,9 +374,6 @@ static int remove_board(struct slot *p_s + + dbg("In %s, hp_slot = %d\n", __FUNCTION__, hp_slot); + +- /* Change status to shutdown */ +- p_slot->status = 0x01; +- + /* Wait for exclusive access to hardware */ + down(&ctrl->crit_sect); + +--- gregkh-2.6.orig/drivers/pci/hotplug/pciehp_hpc.c ++++ gregkh-2.6/drivers/pci/hotplug/pciehp_hpc.c +@@ -750,7 +750,7 @@ static int hpc_power_on_slot(struct slot + { + struct php_ctlr_state_s *php_ctlr = slot->ctrl->hpc_ctlr_handle; + u16 slot_cmd; +- u16 slot_ctrl; ++ u16 slot_ctrl, slot_status; + + int retval = 0; + +@@ -767,6 +767,14 @@ static int hpc_power_on_slot(struct slot + return -1; + } + ++ /* Clear sticky power-fault bit from previous power failures */ ++ hp_register_read_word(php_ctlr->pci_dev, ++ SLOT_STATUS(slot->ctrl->cap_base), slot_status); ++ slot_status &= PWR_FAULT_DETECTED; ++ if (slot_status) ++ hp_register_write_word(php_ctlr->pci_dev, ++ SLOT_STATUS(slot->ctrl->cap_base), slot_status); ++ + retval = hp_register_read_word(php_ctlr->pci_dev, SLOT_CTRL(slot->ctrl->cap_base), slot_ctrl); + + if (retval) { diff --git a/pci/pci-trivial-printk-updates-in-common.c.patch b/pci/pci-trivial-printk-updates-in-common.c.patch new file mode 100644 index 0000000000000..a78abd1633efa --- /dev/null +++ b/pci/pci-trivial-printk-updates-in-common.c.patch @@ -0,0 +1,39 @@ +From daniel.marjamaki@comhem.se Thu Nov 10 22:23:01 2005 +From: Daniel <daniel.marjamaki@comhem.se> +To: Greg KH <gregkh@suse.de> +Subject: PCI: trivial printk updates in common.c +Date: Fri, 11 Nov 2005 07:16:47 +0100 +Cc: danielm77@spray.se +Content-Disposition: inline +Message-Id: <200511110716.47388.daniel.marjamaki@comhem.se> + + +Modified common.c so it's using the appropriate KERN_* in printk() calls. + +Signed-off-by: Daniel Marjamäkia <daniel.marjamaki@comhem.se> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + arch/i386/pci/common.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- gregkh-2.6.orig/arch/i386/pci/common.c ++++ gregkh-2.6/arch/i386/pci/common.c +@@ -132,7 +132,7 @@ struct pci_bus * __devinit pcibios_scan_ + } + } + +- printk("PCI: Probing PCI hardware (bus %02x)\n", busnum); ++ printk(KERN_DEBUG "PCI: Probing PCI hardware (bus %02x)\n", busnum); + + return pci_scan_bus_parented(NULL, busnum, &pci_root_ops, NULL); + } +@@ -144,7 +144,7 @@ static int __init pcibios_init(void) + struct cpuinfo_x86 *c = &boot_cpu_data; + + if (!raw_pci_ops) { +- printk("PCI: System does not support PCI\n"); ++ printk(KERN_WARNING "PCI: System does not support PCI\n"); + return 0; + } + |