6730045 pciehpc: failed to power OFF the slot #2(dev_state 0x0, ACPI_STATUS 0x5)
authorGuoli Shu<Kerry.Shu@Sun.COM>
Mon, 27 Apr 2009 18:28:27 -0700
changeset 9474 cafeea6c3518
parent 9473 e27b6e39a733
child 9475 02bff17c059d
6730045 pciehpc: failed to power OFF the slot #2(dev_state 0x0, ACPI_STATUS 0x5)
usr/src/uts/intel/io/hotplug/pciehpc/pciehpc_acpi.c
--- a/usr/src/uts/intel/io/hotplug/pciehpc/pciehpc_acpi.c	Mon Apr 27 16:48:26 2009 -0700
+++ b/usr/src/uts/intel/io/hotplug/pciehpc/pciehpc_acpi.c	Mon Apr 27 18:28:27 2009 -0700
@@ -512,6 +512,22 @@
 			cmn_err(CE_WARN, "Unexpected event on slot #%d"
 			    "(state 0x%x)", ctrl_p->slot.slotNum, dev_state);
 		}
+
+		/*
+		 * Ignore the event if ATTN button is not present (ACPI BIOS
+		 * problem).
+		 *
+		 * NOTE: This situation has been observed on some platforms
+		 * where the ACPI BIOS is generating the event for some other
+		 * (non hot-plug) operations (bug).
+		 */
+		if (ctrl_p->has_attn == B_FALSE) {
+			PCIEHPC_DEBUG((CE_CONT, "Ignore the unexpected event "
+			    "on slot #%d (state 0x%x)",
+			    ctrl_p->slot.slotNum, dev_state));
+			break;
+		}
+
 		/* send the ATTN button event to HPS framework */
 		(void) hpc_slot_event_notify(ctrl_p->slot.slot_handle,
 		    HPC_EVENT_SLOT_ATTN, HPC_EVENT_NORMAL);