ChangeSet 1.1511, 2004/01/29 14:26:41-08:00, willy@debian.org

[PATCH] PCI Hotplug: Better reporting of PCI frequency / bus mode problems for acpi driver

When plugging a 33MHz card into a bus that's running at 66MHz, I'd like
to see a better error message than:

acpiphp_glue: notify_handler: unknown event type 0x5 for \_SB_.SBA0.PCI4.S2F0

The following patch would give us:

Device \_SB_.SBA0.PCI4.S2F0 cannot be configured due to a frequency mismatch

which I think is clearer.


 drivers/pci/hotplug/acpiphp_glue.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+)


diff -Nru a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
--- a/drivers/pci/hotplug/acpiphp_glue.c	Thu Jan 29 17:24:40 2004
+++ b/drivers/pci/hotplug/acpiphp_glue.c	Thu Jan 29 17:24:40 2004
@@ -974,6 +974,21 @@
 		dbg("%s: Device eject notify on %s\n", __FUNCTION__, objname);
 		break;
 
+	case ACPI_NOTIFY_FREQUENCY_MISMATCH:
+		printk(KERN_ERR "Device %s cannot be configured due"
+				" to a frequency mismatch\n", objname);
+		break;
+
+	case ACPI_NOTIFY_BUS_MODE_MISMATCH:
+		printk(KERN_ERR "Device %s cannot be configured due"
+				" to a bus mode mismatch\n", objname);
+		break;
+
+	case ACPI_NOTIFY_POWER_FAULT:
+		printk(KERN_ERR "Device %s has suffered a power fault\n",
+				objname);
+		break;
+
 	default:
 		warn("notify_handler: unknown event type 0x%x for %s\n", type, objname);
 		break;
