Re: PCIe Hotplug: NFG unless I boot with card already inserted.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mark Lord
Date: Tuesday, October 16, 2007 - 12:31 pm

Mark Lord wrote:

This patch below seems to fix point 1 on my system,
causing pciehp to become aware of already-inserted cards on module load.

It's not perfect, but I believe it does show the kind of functionality
that's missing from the driver.

The resume() function will need something similar, to poll the slots
on resume and call pciehp_enable_slot() or pciehp_disable_slot()
as appropriate.

I suspect this is broken even on machines that do have ACPI BIOS
support.

Cheers

Not for kernel inclusion (yet), but..

Signed-off-by:  Mark Lord <mlord@pobox.com>

--- old/drivers/pci/hotplug/pciehp_core.c	2007-10-12 12:43:44.000000000 -0400
+++ linux/drivers/pci/hotplug/pciehp_core.c	2007-10-16 15:22:46.000000000 -0400
@@ -475,6 +475,9 @@
 		rc = t_slot->hpc_ops->power_off_slot(t_slot); /* Power off slot if not occupied*/
 		if (rc)
 			goto err_out_free_ctrl_slot;
+	} else {
+		extern int pciehp_enable_slot(struct slot *p_slot);
+		pciehp_enable_slot(t_slot);
 	}
 
 	return 0;
--- old/drivers/pci/hotplug/pciehp_ctrl.c	2007-10-12 12:43:44.000000000 -0400
+++ linux/drivers/pci/hotplug/pciehp_ctrl.c	2007-10-16 15:22:44.000000000 -0400
@@ -37,7 +37,7 @@
 #include "pciehp.h"
 
 static void interrupt_event_handler(struct work_struct *work);
-static int pciehp_enable_slot(struct slot *p_slot);
+       int pciehp_enable_slot(struct slot *p_slot);
 static int pciehp_disable_slot(struct slot *p_slot);
 
 static int queue_interrupt_event(struct slot *p_slot, u32 event_type)
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: PCIe Hotplug: NFG unless I boot with card already ins ..., Kristen Carlson Accardi, (Tue Oct 16, 8:46 am)
Re: PCIe Hotplug: NFG unless I boot with card already ins ..., Kristen Carlson Accardi, (Tue Oct 16, 11:43 am)
Re: PCIe Hotplug: NFG unless I boot with card already ins ..., Mark Lord, (Tue Oct 16, 12:31 pm)
Re: PCIe Hotplug: NFG unless I boot with card already ins ..., Kristen Carlson Accardi, (Tue Oct 16, 12:51 pm)
Re: PCIe Hotplug: NFG unless I boot with card already ins ..., Kristen Carlson Accardi, (Tue Oct 16, 1:07 pm)
Re: PCIe Hotplug: NFG unless I boot with card already ins ..., Kristen Carlson Accardi, (Tue Oct 16, 1:29 pm)
Re: PCIe Hotplug: NFG unless I boot with card already ins ..., Kristen Carlson Accardi, (Tue Oct 16, 2:01 pm)
Re: [PATCH] Fix PCIe hotplug for Dell notebook ExpressCard ..., Kristen Carlson Accardi, (Tue Oct 16, 3:04 pm)
Re: [Pcihpd-discuss] [PATCH] Fix PCIe hotplug for Dell not ..., Kristen Carlson Accardi, (Tue Oct 16, 3:41 pm)
Re: [Pcihpd-discuss] [PATCH 2/4] Fix PCIe hotplug for non- ..., Kristen Carlson Accardi, (Wed Oct 17, 4:54 pm)
Re: [PATCH 4/4] Fix PCIe hotplug for non-ACPI ExpressCard ..., Kristen Carlson Accardi, (Wed Oct 17, 5:01 pm)