* Thinkpad docking station: pci hotplug questions
@ 2006-01-08 19:11 Pavel Machek
2006-01-09 3:57 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Pavel Machek @ 2006-01-08 19:11 UTC (permalink / raw)
To: kernel list, Greg KH, pcihpd-discuss
Hi!
I'm trying to get PCI hotplug to work on thinkpad x32 -- it is
apparently neccessary for proper docking station support. What needs
to be done to get it running?
I noticed some strangenesses:
pcihpfs is mentioned in Kconfig, but I can't find it anywhere in
kernel
CONFIG_HOTPLUG_PCI_PCIE exists in Makefile but not in Kconfig.
And here are some coding style fixes:
Signed-off-by: Pavel Machek <pavel@suse.cz>
diff --git a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c
--- a/drivers/pci/hotplug/acpiphp_ibm.c
+++ b/drivers/pci/hotplug/acpiphp_ibm.c
@@ -302,7 +302,7 @@ static int ibm_get_table_from_acpi(char
}
package = (union acpi_object *) buffer.pointer;
- if(!(package) ||
+ if (!(package) ||
(package->type != ACPI_TYPE_PACKAGE) ||
!(package->package.elements)) {
err("%s: Invalid APCI object\n", __FUNCTION__);
@@ -405,7 +405,7 @@ static acpi_status __init ibm_find_acpi_
}
info.hardware_id.value[sizeof(info.hardware_id.value) - 1] = '\0';
- if(info.current_status && (info.valid & ACPI_VALID_HID) &&
+ if (info.current_status && (info.valid & ACPI_VALID_HID) &&
(!strcmp(info.hardware_id.value, IBM_HARDWARE_ID1) ||
!strcmp(info.hardware_id.value, IBM_HARDWARE_ID2))) {
dbg("found hardware: %s, handle: %p\n", info.hardware_id.value,
@@ -449,13 +449,11 @@ static int __init ibm_acpiphp_init(void)
}
ibm_note.device = device;
- status = acpi_install_notify_handler(
- ibm_acpi_handle,
- ACPI_DEVICE_NOTIFY,
- ibm_handle_events,
+ status = acpi_install_notify_handler(ibm_acpi_handle,
+ ACPI_DEVICE_NOTIFY, ibm_handle_events,
&ibm_note);
if (ACPI_FAILURE(status)) {
- err("%s: Failed to register notification handler\n",
+ err("%s: Failed to register notification handler\n",
__FUNCTION__);
retval = -EBUSY;
goto init_cleanup;
@@ -482,14 +480,13 @@ static void __exit ibm_acpiphp_exit(void
if (acpiphp_unregister_attention(&ibm_attention_info))
err("%s: attention info deregistration failed", __FUNCTION__);
- status = acpi_remove_notify_handler(
+ status = acpi_remove_notify_handler(
ibm_acpi_handle,
ACPI_DEVICE_NOTIFY,
ibm_handle_events);
- if (ACPI_FAILURE(status))
- err("%s: Notification handler removal failed\n",
- __FUNCTION__);
- // remove the /sys entries
+ if (ACPI_FAILURE(status))
+ err("%s: Notification handler removal failed\n", __FUNCTION__);
+ /* remove the /sys entries */
if (sysfs_remove_bin_file(sysdir, &ibm_apci_table_attr))
err("%s: removal of sysfs file apci_table failed\n",
__FUNCTION__);
diff --git a/drivers/pci/hotplug/ibmphp_core.c b/drivers/pci/hotplug/ibmphp_core.c
--- a/drivers/pci/hotplug/ibmphp_core.c
+++ b/drivers/pci/hotplug/ibmphp_core.c
@@ -235,12 +235,12 @@ static int set_attention_status(struct h
{
int rc = 0;
struct slot *pslot;
- u8 cmd;
+ u8 cmd = 0x00; /* avoid compiler warning */
debug("set_attention_status - Entry hotplug_slot[%lx] value[%x]\n",
(ulong) hotplug_slot, value);
ibmphp_lock_operations();
- cmd = 0x00; // avoid compiler warning
+
if (hotplug_slot) {
switch (value) {
--
Thanks, Sharp!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Thinkpad docking station: pci hotplug questions
2006-01-08 19:11 Thinkpad docking station: pci hotplug questions Pavel Machek
@ 2006-01-09 3:57 ` Greg KH
2006-01-09 15:16 ` Pavel Machek
0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2006-01-09 3:57 UTC (permalink / raw)
To: Pavel Machek; +Cc: kernel list, pcihpd-discuss
On Sun, Jan 08, 2006 at 08:11:59PM +0100, Pavel Machek wrote:
> Hi!
>
> I'm trying to get PCI hotplug to work on thinkpad x32 -- it is
> apparently neccessary for proper docking station support. What needs
> to be done to get it running?
>
> I noticed some strangenesses:
>
> pcihpfs is mentioned in Kconfig, but I can't find it anywhere in
> kernel
Yeah, that's 2.4 stuff, you don't need that anymore, everything shows up
in sysfs now.
> CONFIG_HOTPLUG_PCI_PCIE exists in Makefile but not in Kconfig.
Did you look in drivers/pci/pcie/Kconfig?
> And here are some coding style fixes:
Thanks, I'll queue these up.
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Thinkpad docking station: pci hotplug questions
2006-01-09 3:57 ` Greg KH
@ 2006-01-09 15:16 ` Pavel Machek
2006-01-10 19:51 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Pavel Machek @ 2006-01-09 15:16 UTC (permalink / raw)
To: Greg KH; +Cc: kernel list, pcihpd-discuss
Hi!
> > I'm trying to get PCI hotplug to work on thinkpad x32 -- it is
> > apparently neccessary for proper docking station support. What needs
> > to be done to get it running?
> >
> > I noticed some strangenesses:
> >
> > pcihpfs is mentioned in Kconfig, but I can't find it anywhere in
> > kernel
>
> Yeah, that's 2.4 stuff, you don't need that anymore, everything shows up
> in sysfs now.
Here's a fix. Where in sysfs should I find that?
root@amd:/sys# find . -name "*hot*"
./module/"pci_hotplug"
> > CONFIG_HOTPLUG_PCI_PCIE exists in Makefile but not in Kconfig.
>
> Did you look in drivers/pci/pcie/Kconfig?
No, oops, you are right.
--- snip here ---
Remove reference to pcihpfs that no longer exists.
Signed-off-by: Pavel Machek <pavel@suse.cz>
--- a/drivers/pci/hotplug/Kconfig
+++ b/drivers/pci/hotplug/Kconfig
@@ -11,8 +11,7 @@ config HOTPLUG_PCI
---help---
Say Y here if you have a motherboard with a PCI Hotplug controller.
This allows you to add and remove PCI cards while the machine is
- powered up and running. The file system pcihpfs must be mounted
- in order to interact with any PCI Hotplug controllers.
+ powered up and running.
To compile this driver as a module, choose M here: the
module will be called pci_hotplug.
--
Thanks, Sharp!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Thinkpad docking station: pci hotplug questions
2006-01-09 15:16 ` Pavel Machek
@ 2006-01-10 19:51 ` Greg KH
0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2006-01-10 19:51 UTC (permalink / raw)
To: Pavel Machek; +Cc: kernel list, pcihpd-discuss
On Mon, Jan 09, 2006 at 04:16:00PM +0100, Pavel Machek wrote:
> Hi!
>
> > > I'm trying to get PCI hotplug to work on thinkpad x32 -- it is
> > > apparently neccessary for proper docking station support. What needs
> > > to be done to get it running?
> > >
> > > I noticed some strangenesses:
> > >
> > > pcihpfs is mentioned in Kconfig, but I can't find it anywhere in
> > > kernel
> >
> > Yeah, that's 2.4 stuff, you don't need that anymore, everything shows up
> > in sysfs now.
>
> Here's a fix. Where in sysfs should I find that?
>
> root@amd:/sys# find . -name "*hot*"
> ./module/"pci_hotplug"
Look in /sys/bus/pci/slots/
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-01-10 19:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-08 19:11 Thinkpad docking station: pci hotplug questions Pavel Machek
2006-01-09 3:57 ` Greg KH
2006-01-09 15:16 ` Pavel Machek
2006-01-10 19:51 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).