aboutsummaryrefslogtreecommitdiff
path: root/drivers/pci/hotplug/acpiphp_glue.c
AgeCommit message (Collapse)AuthorFilesLines
2009-01-16ACPI PCI hotplug: harden against panic regressionJames Bottomley1-0/+2
ACPI hotplug panic with current git head http://lkml.org/lkml/2009/1/10/136 Rather than reverting the entire commit that causes the crash: e8c331e963c58b83db24b7d0e39e8c07f687dbc6 "PCI hotplug: introduce functions for ACPI slot detection" simply harden against it while the changes to the hotplug code on this particularl machine are understood. Signed-off-by: James Bottomley <[email protected]> Acked-by: Jesse Barnes <[email protected]> Signed-off-by: Len Brown <[email protected]>
2009-01-07PCI hotplug: introduce functions for ACPI slot detectionKenji Kaneshige1-92/+15
Some ACPI related PCI hotplug code can be shared among PCI hotplug drivers. This patch introduces the following functions in drivers/pci/hotplug/acpi_pcihp.c to share the code, and changes acpiphp and pciehp to use them. - int acpi_pci_detect_ejectable(struct pci_bus *pbus) This checks if the specified PCI bus has ejectable slots. - int acpi_pci_check_ejectable(struct pci_bus *pbus, acpi_handle handle) This checks if the specified handle is ejectable ACPI PCI slot. The 'pbus' parameter is needed to check if 'handle' is PCI related ACPI object. This patch also introduces the following inline function in include/linux/pci-acpi.h, which is useful to get ACPI handle of the PCI bridge from struct pci_bus of the bridge's secondary bus. - static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus) This returns ACPI handle of the PCI bridge which generates PCI bus specified by 'pbus'. Signed-off-by: Kenji Kaneshige <[email protected]> Signed-off-by: Jesse Barnes <[email protected]>
2009-01-07PCI hotplug: acpiphp whitespace cleanupAlex Chiang1-3/+3
Clean up whitespace. Setting 'let c_space_errors=1' in .vimrc shows all sorts of ugliness. ;) Signed-off-by: Alex Chiang <[email protected]> Signed-off-by: Jesse Barnes <[email protected]>
2009-01-07PCI/ACPI: acpiphp: Identify more removable slotsMatthew Garrett1-15/+17
According to section 6.3.6 of the ACPI spec, the presence of an _RMV method that evaluates to 1 is sufficient to indicate that a slot is removable without needing an eject method. This patch refactors the ejectable slot detection code a little in order to flag these slots as ejectable and register them. Acpihp then binds to the expresscard slot on my HP test machine. Acked-by: Kristen Carlson Accardi <[email protected]> Signed-off-by: Matthew Garrett <[email protected]> Signed-off-by: Jesse Barnes <[email protected]>
2008-12-16PCI hotplug: acpiphp wants a 64-bit _SUNJustin Chen1-2/+2
Certain HP machines require the full 64 bits of _SUN as allowed by the ACPI spec. Without this change, we get name collisions in the lower 32 bits of the _SUN returned by firmware. Acked-by: Matthew Wilcox <[email protected]> Signed-off-by: Justin Chen <[email protected]> Signed-off-by: Alex Chiang <[email protected]> Signed-off-by: Jesse Barnes <[email protected]>
2008-10-22Merge branch 'ull' into testLen Brown1-7/+7
Conflicts: drivers/acpi/bay.c drivers/acpi/dock.c drivers/ata/libata-acpi.c Signed-off-by: Len Brown <[email protected]>
2008-10-11ACPI: Change acpi_evaluate_integer to support 64-bit on 32-bit kernelsMatthew Wilcox1-7/+7
As of version 2.0, ACPI can return 64-bit integers. The current acpi_evaluate_integer only supports 64-bit integers on 64-bit platforms. Change the argument to take a pointer to an acpi_integer so we support 64-bit integers on all platforms. lenb: replaced use of "acpi_integer" with "unsigned long long" lenb: fixed bug in acpi_thermal_trips_update() Signed-off-by: Matthew Wilcox <[email protected]> Signed-off-by: Len Brown <[email protected]>
2008-09-23dock: introduce .uevent for devices in dock, eg libataShaohua Li1-2/+4
dock's uevent reported itself, not ata. It might be difficult to find an ata device just according to a dock. This patch introduces docking ops for each device in a dock. when docking, dock driver can send device specific uevent. This should help dock station too (not just bay) Signed-off-by: Shaohua Li <[email protected]> Acked-by: Tejun Heo <[email protected]> Signed-off-by: Len Brown <[email protected]>
2008-07-16Merge branch 'linux-next' of ↵Linus Torvalds1-17/+6
git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 * 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (72 commits) Revert "x86/PCI: ACPI based PCI gap calculation" PCI: remove unnecessary volatile in PCIe hotplug struct controller x86/PCI: ACPI based PCI gap calculation PCI: include linux/pm_wakeup.h for device_set_wakeup_capable PCI PM: Fix pci_prepare_to_sleep x86/PCI: Fix PCI config space for domains > 0 Fix acpi_pm_device_sleep_wake() by providing a stub for CONFIG_PM_SLEEP=n PCI: Simplify PCI device PM code PCI PM: Introduce pci_prepare_to_sleep and pci_back_from_sleep PCI ACPI: Rework PCI handling of wake-up ACPI: Introduce new device wakeup flag 'prepared' ACPI: Introduce acpi_device_sleep_wake function PCI: rework pci_set_power_state function to call platform first PCI: Introduce platform_pci_power_manageable function ACPI: Introduce acpi_bus_power_manageable function PCI: make pci_name use dev_name PCI: handle pci_name() being const PCI: add stub for pci_set_consistent_dma_mask() PCI: remove unused arch pcibios_update_resource() functions PCI: fix pci_setup_device()'s sprinting into a const buffer ... Fixed up conflicts in various files (arch/x86/kernel/setup_64.c, arch/x86/pci/irq.c, arch/x86/pci/pci.h, drivers/acpi/sleep/main.c, drivers/pci/pci.c, drivers/pci/pci.h, include/acpi/acpi_bus.h) from x86 and ACPI updates manually.
2008-07-02PCI: acpiphp: cleanup notify handler on all root bridgesAlex Chiang1-3/+14
During the development of the physical PCI slot patch series, Gary Hade kept on reporting strange oopses due to interactions between pci_slot and acpiphp. http://lkml.org/lkml/2007/11/28/319 find_root_bridges() unconditionally installs handle_hotplug_event_bridge() as an ACPI_SYSTEM_NOTIFY handler for all root bridges. However, during module cleanup, remove_bridge() will only remove the notify handler iff the root bridge had a hot-pluggable slot directly underneath. That is: root bridge -> hotplug slot But, if the topology looks like either of the following: root bridge -> non-hotplug slot root bridge -> p2p bridge -> hotplug slot Then we currently do not remove the notify handler from that root bridge. This can cause a kernel oops if we modprobe acpiphp later and it gets loaded somewhere else in memory. If the root bridge then receives a hotplug event, it will then attempt to call a stale, non-existent notify handler and we blow up. Much thanks goes to Gary Hade for his persistent debugging efforts. Signed-off-by: Alex Chiang <[email protected]> Signed-off-by: Gary Hade <[email protected]> Signed-off-by: Jesse Barnes <[email protected]>
2008-06-10PCI: introduce pci_slotAlex Chiang1-17/+6
Currently, /sys/bus/pci/slots/ only exposes hotplug attributes when a hotplug driver is loaded, but PCI slots have attributes such as address, speed, width, etc. that are not related to hotplug at all. Introduce pci_slot as the primary data structure and kobject model. Hotplug attributes described in hotplug_slot become a secondary structure associated with the pci_slot. This patch only creates the infrastructure that allows the separation of PCI slot attributes and hotplug attributes. In this patch, the PCI hotplug core remains the only user of this infrastructure, and thus, /sys/bus/pci/slots/ will still only become populated when a hotplug driver is loaded. A later patch in this series will add a second user of this new infrastructure and demonstrate splitting the task of exposing pci_slot attributes from hotplug_slot attributes. - Make pci_slot the primary sysfs entity. hotplug_slot becomes a subsidiary structure. o pci_create_slot() creates and registers a slot with the PCI core o pci_slot_add_hotplug() gives it hotplug capability - Change the prototype of pci_hp_register() to take the bus and slot number (on parent bus) as parameters. - Remove all the ->get_address methods since this functionality is now handled by pci_slot directly. [[email protected]: rpaphp-correctly-pci_hp_register-for-empty-pci-slots] Tested-by: Badari Pulavarty <[email protected]> Acked-by: Benjamin Herrenschmidt <[email protected]> [[email protected]: build fix] [[email protected]: make headers_check happy] [[email protected]: nuther build fix] [[email protected]: fix typo in #include] Signed-off-by: Alex Chiang <[email protected]> Signed-off-by: Matthew Wilcox <[email protected]> Cc: Greg KH <[email protected]> Cc: Kristen Carlson Accardi <[email protected]> Cc: Len Brown <[email protected]> Acked-by: Kenji Kaneshige <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Jesse Barnes <[email protected]>
2008-04-20PCI: replace remaining __FUNCTION__ occurrencesHarvey Harrison1-19/+19
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2008-03-04PCI: fix section mismatch warning in pci_scan_child_busSam Ravnborg1-1/+1
Fix following warning: WARNING: vmlinux.o(.text+0x47bdb1): Section mismatch in reference from the function pci_scan_child_bus() to the function .devinit.text:pcibios_fixup_bus() We had plenty of functions that could be annotated __devinit but due to the former restriction that exported symbols could not be annotated they were not so. So annotate these function and fix the references from the pci/hotplug/* code to silence the resuting warnings. Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2008-02-01PCI Hotplug: acpiphp: remove unneeded acpi_get_name function callMUNEDA Takahiro1-1/+0
acpi_get_name() is called before and after dbg(). The latter is useless and should be removed. Signed-off-by: Kristen Carlson Accardi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2008-02-01PCI Hotplug: acpiphp: fix trivial typosMUNEDA Takahiro1-2/+2
fix trivial typos. Signed-off-by: MUNEDA Takahiro <[email protected]> Signed-off-by: Kristen Carlson Accardi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2007-11-28pci hotplug: kernel-doc fixesRandy Dunlap1-21/+15
acpiphp.h: not using kernel-doc, so change /** to /* acpiphp_core.c: lots of kernel-doc cleanups acpiphp_glue.c: lots of kernel-doc cleanups acpiphp_ibm.c: lots of kernel-doc cleanups cpqphp_core.c: lots of kernel-doc cleanups cpqphp_ctrl.c: lots of kernel-doc cleanups fakephp.c: correct kernel-doc notation pciehp_ctrl.c: correct kernel-doc notation rpadlpar_core.c: correct function names & kernel-doc notation rpaphp_core.c: correct kernel-doc notation shpchp_ctrl.c: correct kernel-doc notation Signed-off-by: Randy Dunlap <[email protected]> Cc: Kristen Accardi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2007-07-11PCI: hotplug: acpiphp: avoid acpiphp "cannot get bridge info" PCI hotplug ↵Gary Hade1-2/+46
failure On some systems, the ACPI bus check event can reference a bridge that is higher in the ACPI hierarchy than the bridge immediately above the hotplug PCI slot into which an adapter was just inserted. The current 'acpiphp' code expects the bus check event to reference the bridge immediately above the slot that received the adapter so the hotplug operation can fail on these systems with the message "acpiphp_glue: cannot get bridge info". This change fixes the problem by re-enumerating all slots that lie below the bridge referenced by the bus check event, including those slots that may be located under lower level PCI-to-PCI bridge(s). Signed-off-by: Gary Hade <[email protected]> Cc: <[email protected]> Signed-off-by: Kristen Carlson Accardi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2007-07-11PCI: hotplug: acpiphp: remove hot plug parameter write to PCI host bridgeGary Hade1-0/+3
acpiphp is writing hot plug parameters to the PCI host bridge PCI config space. This patch removes the incorrect operation. Signed-off-by: Gary Hade <[email protected]> Cc: <[email protected]> Signed-off-by: Kristen Carlson Accardi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2007-07-11PCI: hotplug: acpiphp: fix slot poweroff problem on systems without _PS3Gary Hade1-1/+1
On systems where the optional _PS3 ACPI object is not implemented acpiphp fails to power off the slot. This is happening because the current code does not attempt to remove power using the _EJ0 ACPI object. This patch restores the _EJ0 evaluation attempt which was apparently inadvertently removed from the power-off sequence when the _EJ0 evaluation code was relocated from power_off_slot() to acpiphp_eject_slot(). Signed-off-by: Gary Hade <[email protected]> Cc: <[email protected]> Signed-off-by: Kristen Carlson Accardi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2007-05-08header cleaning: don't include smp_lock.h when not usedRandy Dunlap1-1/+0
Remove includes of <linux/smp_lock.h> where it is not used/needed. Suggested by Al Viro. Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc, sparc64, and arm (all 59 defconfigs). Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-02-02ACPICA: Remove duplicate table definitions (non-conflicting), contAlexey Starikovskiy1-5/+5
Signed-off-by: Len Brown <[email protected]>
2006-12-20acpiphp: Link-time error for PCI HotplugKristen Carlson Accardi1-1/+1
I'm seeing: `acpiphp_glue_exit' referenced in section `.init.text' of drivers/built-in.o: defined in discarded section `.exit.text' of drivers/built-in.o when trying to compile an IA64 kernel with PCI hotplug enabled. I suggest this patch: Signed-off-by: Peter Chubb <[email protected]> Signed-off-by: Kristen Carlson Accardi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2006-12-01acpiphp: fix use of list_for_each macroAkinobu Mita1-6/+2
This patch fixes invalid usage of list_for_each() list_for_each (node, &bridge_list) { bridge = (struct acpiphp_bridge *)node; ... } This code works while the member of list node is located at the head of struct acpiphp_bridge. Signed-off-by: Akinobu Mita <[email protected]> Signed-off-by: Kristen Carlson Accardi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2006-10-27acpiphp: fix latch statusMUNEDA Takahiro1-3/+3
pci_hotplug.h says: * @latch_status: if the latch (if any) is open or closed (1/0) However, acpiphp returns opposite value. This patch fixes this issue. I tested this patch on my ia64 machine that has some apciphp based hotplug slots. Signed-off-by: MUNEDA Takahiro <[email protected]> Signed-off-by: Kristen Carlson Accardi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2006-10-18PCI Hotplug: move pci_hotplug.h to include/linux/Greg Kroah-Hartman1-1/+1
This makes it possible to build pci hotplug drivers outside of the main kernel tree, and Sam keeps telling me to move local header files to their proper places... Signed-off-by: Greg Kroah-Hartman <[email protected]>
2006-09-26acpiphp: add support for ioapic hot-removeSatoru Takeuchi1-14/+87
This patch adds support for ioapics hot-remove. Signed-off-by: Kenji Kaneshige <[email protected]> Signed-off-by: MUNEDA Takahiro <[email protected]> Signed-off-by: Satoru Takeuchi <[email protected]> Signed-off-by: Kristen Carlson Accardi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2006-09-26acpiphp: disable bridgesSatoru Takeuchi1-1/+16
Currently acpiphp calls pci_enable_device() against all hot-added bridges, but acpiphp does not call pci_disable_device() against them in hot-remove. So ioapic hot-remove would fail. This patch fixes this issue. Signed-off-by: Kenji Kaneshige <[email protected]> Signed-off-by: MUNEDA Takahiro <[email protected]> Signed-off-by: Satoru Takeuchi <[email protected]> Signed-off-by: Kristen Carlson Accardi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2006-09-26acpiphp: stop bus device before acpi_bus_trimSatoru Takeuchi1-0/+3
Contrary to PCI bridge hot-add, we need to follow the sequence below for PCI bridge hot-removal. (1) Stop devices (detach drivers, remove from the global list, etc.) (2) Unbind ACPI node from the devices (remove the _PRT entries) (3) Remove devices (remove from the device list, etc.) This patch fixes acpiphp driver to follow above sequence for P2P bridge hot-removal. Signed-off-by: Kenji Kaneshige <[email protected]> Signed-off-by: MUNEDA Takahiro <[email protected]> Signed-off-by: Satoru Takeuchi <[email protected]> Signed-off-by: Kristen Carlson Accardi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2006-09-26acpiphp: do not initialize existing ioapicsSatoru Takeuchi1-1/+3
Currently acpiphp initializes all ioapics under the bus on which hot-add event occured. It also initializes already working ioapics. This patch fixes this bug. Signed-off-by: Kenji Kaneshige <[email protected]> Signed-off-by: MUNEDA Takahiro <[email protected]> Signed-off-by: Satoru Takeuchi <[email protected]> Signed-off-by: Kristen Carlson Accardi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2006-09-26acpiphp: initialize ioapics before starting devicesSatoru Takeuchi1-1/+1
Currently acpiphp initializes ioapics after starting devices, but ioapics should be initialized before starting devices. This patch fixes this bug. Signed-off-by: Kenji Kaneshige <[email protected]> Signed-off-by: MUNEDA Takahiro <[email protected]> Signed-off-by: Satoru Takeuchi <[email protected]> Signed-off-by: Kristen Carlson Accardi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2006-09-26acpiphp: set hpp values before starting devicesSatoru Takeuchi1-1/+1
Currently acpiphp sets hpp values after starting devices, but the values should be set before starting devices. This patch fixes this bug. Signed-off-by: Kenji Kaneshige <[email protected]> Signed-off-by: MUNEDA Takahiro <[email protected]> Signed-off-by: Satoru Takeuchi <[email protected]> Signed-off-by: Kristen Carlson Accardi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2006-09-26PCI: drivers/pci/hotplug/acpiphp_glue.c: make a function staticAdrian Bunk1-1/+1
Signed-off-by: Adrian Bunk <[email protected]> Acked-by: MUNEDA Takahiro <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2006-08-03PCI Hotplug: add acpiphp to MAINTAINERSKristen Carlson Accardi1-1/+1
Add acpiphp to the MAINTAINERS file. Signed-off-by: Kristen Carlson Accardi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2006-06-28ACPIPHP: prevent duplicate slot numbers when no _SUNKristen Accardi1-2/+7
Dock bridges generally do not implement _SUN, yet show up as ejectable slots. If you have more than one ejectable slot that does not implement SUN, with the current code you will get duplicate slot numbers. So, if there is no _SUN, use the current count of the number of slots found instead. Signed-off-by: Kristen Carlson Accardi <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Len Brown <[email protected]>
2006-06-28ACPI: static-ize handle_hotplug_event_func()Len Brown1-1/+2
Signed-off-by: Len Brown <[email protected]>
2006-06-28ACPIPHP: use ACPI dock driverKristen Accardi1-27/+84
Modify the acpiphp driver to use the ACPI dock driver for dock notifications. Only load the acpiphp driver if we find we have pci dock devices. Signed-off-by: Kristen Carlson Accardi <[email protected]> Signed-off-by: Adrian Bunk <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Len Brown <[email protected]>
2006-06-19[PATCH] acpi_pcihp: Add support for _HPXKenji Kaneshige1-12/+19
This patch adds support for _HPX (Hot Plug Parameter Extensions) defined in ACPI3.0a spec. Signed-off-by: Kenji Kaneshige <[email protected]> Cc: Kristen Accardi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2006-06-19[PATCH] acpi_pcihp: Fix programming _HPP valuesKenji Kaneshige1-1/+2
This patch fixes the problem that hotplug parameters are not programed when PCI cards are hot-added by ACPIPHP, SHPCHP and PCIEHP driver. The pci_dev structure being hot-added is not bound to ACPI handle, so we need to trace PCI bus tree to find ACPI handle. Signed-off-by: Kenji Kaneshige <[email protected]> Cc: Kristen Accardi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2006-06-19[PATCH] PCI Hotplug: don't use acpi_os_freeKristen Accardi1-1/+1
acpi_os_free should not be used by drivers outside of acpi/*/*.c. Replace with kfree(). Signed-off-by: Kristen Carlson Accardi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2006-06-19[PATCH] acpiphp: turn off slot power at error caseMUNEDA Takahiro1-1/+7
When acpiphp_enable_slot() is failed, acpiphp does not change the slot->flags. Therefore, when user tries to read power status, acpiphp_get_power_status() returns the enable status whether the slot is not really enabled. This patch fixes this BUG. Signed-off-by: MUNEDA Takahiro <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2006-06-19[PATCH] acpiphp: host and p2p hotplugMUNEDA Takahiro1-1/+0
I encountered the problem that when there are some hotplug slots are under the host bridge, the hotplug slots under the p2p bridge are not treated as hotpluggable. This patch fixes this BUG. Signed-off-by: MUNEDA Takahiro <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2006-06-19[PATCH] acpiphp: hotplug slot hotplugMUNEDA Takahiro1-9/+117
o hotplug slots add When the hot-added PCI device is p2p bridge, acpiphp calls find_p2p_bridge() to add hotplug slots. o hotplug slots remove When the hot-removing PCI device is p2p bridge, acpiphp calls cleanup_p2p_bridge() to remove hotplug slots. o notify handler exchange When the p2p bridge is added, acpiphp changes the notify hanlder. If no bridge device is inserted into the hotpluggable PCI slot, acpiphp installs the notify handler for function. After the p2p bridge hot-add, acpiphp has to install the notify handler for bridge. Because, the role of the handlers are not same. The hot-remove case is ditto. Signed-off-by: MUNEDA Takahiro <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2006-06-19[PATCH] acpiphp: configure _PRT - V3MUNEDA Takahiro1-38/+33
Current acpiphp does not free acpi_device structs when the PCI devices are removed. When the PCI device is added, acpi_bus_add() fails because acpi_device struct has already exists. So, _PRT method does not evaluate. This patch fixes this issue. Signed-off-by: MUNEDA Takahiro <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2006-03-23[PATCH] PCI Hotplug: add common acpi functions to coreKristen Accardi1-78/+13
shpchprm_acpi.c and pciehprm_acpi.c are nearly identical. In addition, there are functions in both these files that are also in acpiphp_glue.c. This patch will remove duplicate functions from shpchp, pciehp, and acpiphp and move this functionality to pci_hotplug, as it is not hardware specific. Get rid of shpchprm* and pciehprm* files since they are no longer needed. shpchprm_nonacpi.c and pciehprm_nonacpi.c are identical, as well as shpchprm_legacy.c and can be replaced with a macro. This patch also changes acpiphp to use the common hpp code. Signed-off-by: Kristen Carlson Accardi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2006-03-23[PATCH] PCI: kzalloc() conversion in drivers/pciEric Sesterhenn1-10/+4
this patch converts drivers/pci to kzalloc usage. Compile tested with allyes config. Signed-off-by: Eric Sesterhenn <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2006-03-23[PATCH] acpiphp: Scan slots under the nested P2P bridgeKenji Kaneshige1-1/+8
Current ACPIPHP driver scans only slots under the top level PCI-to-PCI bridge. So hotplug PCI slots under the nested PCI-to-PCI bridge would not be detected. For example, if the system has the ACPI namespace like below, hotplug slots woule not be detected. Device (PCI0) { /* Root bridge */ Name (_HID, "PNP0A03") Device (P2PA) { /* PCI-to-PCI bridge */ Name (_ADR, ...) Device (P2PB) { /* PCI-to-PCI bridge */ Name (_ADR, ...) Device (S0F0) { /* hotplug slot */ Name (_ADR, ...) Name (_SUN, ...) Method (_EJ0, ...) { ... } } ... Device (S0F7) { /* hotplug slot */ Name (_ADR, ...) Name (_SUN, ...) Method (_EJ0, ...) { ... } } Device (S1F0) { /* hotplug slot */ Name (_ADR, ...) Name (_SUN, ...) Method (_EJ0, ...) { ... } } ... } } } This patch fixes this issue. Signed-off-by: Kenji Kaneshige <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2006-03-23[PATCH] acpiphp: fix bridge handleMUNEDA Takahiro1-2/+2
When hotplug slot is under the host bridge, DEVICE_ACPI_HANDLE(&bus->self->dev) fails since '&bus->self' was not set. This patch fixes it. This patch is based on kristen's latest patches. I tested this patch on my Tiger4. Signed-off-by: MUNEDA Takahiro <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2006-03-23[PATCH] acpiphp - slot management fix - V4MUNEDA Takahiro1-25/+23
o This patch removes IDs (for slots management). o This patch removes the slot register/unregister processes from the init/exit phases. Instead, adds these processes in the bridge add/cleanup phases. o Currently, this change doesn't have any meanings. But these changes are needed to support p2p bridge(with hotplug slot) Signed-off-by: MUNEDA Takahiro <[email protected]> Signed-off-by: Kristen Carlson Accardi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2006-03-23[PATCH] acpiphp: add dock event handlingKristen Accardi1-22/+63
These patches add generic dock event handling to acpiphp. If there are pci devices that need to be inserted/removed after the dock event, the event notification will be handed down to the normal pci hotplug event handler in acpiphp so that new bridges/devices can be enumerated. Because some dock stations do not have pci bridges or pci devices that need to be inserted after a dock, acpiphp will remain loaded to handle dock events even if no hotpluggable pci slots are discovered. You probably need to have the pci=assign-busses kernel parameter enabled to use these patches, and you may not allow ibm_acpi to handle docking notifications and use this patch. This patch incorporates feedback provided by many. Signed-off-by: Kristen Carlson Accardi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2006-03-23[PATCH] acpiphp: add new bus to acpiKristen Accardi1-2/+109
If we add a new bridge with subordinate busses, we should call make sure that acpi is notified so that the PRT (if present) can be read and drivers who have registered on this bus will be notified when it is started. Also make sure to use the max reserved bus number for the starting the bus scan. Signed-off-by: Kristen Carlson Accardi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>