Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 707591 Details for
Bug 903360
ACPI device nodes lookup for the PCI bus type bug
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Fix for certian laptop models kernel bug 3.8 series
PCI-ACPI-Rework-ACPI-device-nodes-lookup-for-the-PCI-bus-type.patch (text/plain), 3.99 KB, created by
Gary Gatling
on 2013-03-09 21:33:27 UTC
(
hide
)
Description:
Fix for certian laptop models kernel bug 3.8 series
Filename:
MIME Type:
Creator:
Gary Gatling
Created:
2013-03-09 21:33:27 UTC
Size:
3.99 KB
patch
obsolete
>Index: linux/drivers/acpi/glue.c >=================================================================== >--- linux.orig/drivers/acpi/glue.c >+++ linux/drivers/acpi/glue.c >@@ -93,6 +93,51 @@ static int acpi_find_bridge_device(struc > return ret; > } > >+/** >+ * acpi_get_child_device - Find specific child of an ACPI device. >+ * @phandle: ACPI handle of the parent device to find a child of. >+ * @address: Address of the child to find (as returned by _ADR). >+ * >+ * Find the child of the ACPI device node represented by @phandle whose _ADR >+ * method's return value is equal to @address. If there are more children with >+ * matching _ADR return values, take the (last) one having _INI defined. >+ */ >+struct acpi_device *acpi_get_child_device(acpi_handle phandle, u64 address) >+{ >+ struct acpi_device *parent, *adev, *ret = NULL; >+ >+ if (acpi_bus_get_device(phandle, &parent)) >+ return NULL; >+ >+ mutex_lock(&acpi_device_lock); >+ /* Use reverse direction for compatibility with acpi_get_child(). */ >+ list_for_each_entry_reverse(adev, &parent->children, node) { >+ unsigned long long addr; >+ acpi_status status; >+ acpi_handle out; >+ >+ status = acpi_evaluate_integer(adev->handle, METHOD_NAME__ADR, >+ NULL, &addr); >+ if (ACPI_FAILURE(status) || addr != address) >+ continue; >+ >+ if (ret) >+ acpi_handle_warn(adev->handle, >+ "_ADR conflict with device %s\n", >+ dev_name(&ret->dev)); >+ >+ status = acpi_get_handle(adev->handle, "_INI", &out); >+ if (ACPI_SUCCESS(status)) { >+ ret = adev; >+ break; >+ } else if (!ret) { >+ ret = adev; >+ } >+ } >+ mutex_unlock(&acpi_device_lock); >+ return ret; >+} >+ > /* Get device's handler per its address under its parent */ > struct acpi_find_child { > acpi_handle handle; >Index: linux/drivers/acpi/internal.h >=================================================================== >--- linux.orig/drivers/acpi/internal.h >+++ linux/drivers/acpi/internal.h >@@ -21,8 +21,12 @@ > #ifndef _ACPI_INTERNAL_H_ > #define _ACPI_INTERNAL_H_ > >+#include <linux/mutex.h> >+ > #define PREFIX "ACPI: " > >+extern struct mutex acpi_device_lock; >+ > int init_acpi_device_notify(void); > int acpi_scan_init(void); > int acpi_sysfs_init(void); >Index: linux/drivers/acpi/sleep.h >=================================================================== >--- linux.orig/drivers/acpi/sleep.h >+++ linux/drivers/acpi/sleep.h >@@ -5,4 +5,3 @@ extern void acpi_enable_wakeup_devices(u > extern void acpi_disable_wakeup_devices(u8 sleep_state); > > extern struct list_head acpi_wakeup_device_list; >-extern struct mutex acpi_device_lock; >Index: linux/drivers/acpi/proc.c >=================================================================== >--- linux.orig/drivers/acpi/proc.c >+++ linux/drivers/acpi/proc.c >@@ -12,6 +12,7 @@ > #include <linux/mc146818rtc.h> > #endif > >+#include "internal.h" > #include "sleep.h" > > #define _COMPONENT ACPI_SYSTEM_COMPONENT >Index: linux/include/acpi/acpi_bus.h >=================================================================== >--- linux.orig/include/acpi/acpi_bus.h >+++ linux/include/acpi/acpi_bus.h >@@ -400,6 +400,7 @@ struct acpi_pci_root { > }; > > /* helper */ >+struct acpi_device *acpi_get_child_device(acpi_handle phandle, u64 address); > acpi_handle acpi_get_child(acpi_handle, u64); > int acpi_is_root_bridge(acpi_handle); > struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle); >Index: linux/drivers/pci/pci-acpi.c >=================================================================== >--- linux.orig/drivers/pci/pci-acpi.c >+++ linux/drivers/pci/pci-acpi.c >@@ -291,14 +291,17 @@ static struct pci_platform_pm_ops acpi_p > static int acpi_pci_find_device(struct device *dev, acpi_handle *handle) > { > struct pci_dev * pci_dev; >+ struct acpi_device *adev; > u64 addr; > > pci_dev = to_pci_dev(dev); > /* Please ref to ACPI spec for the syntax of _ADR */ > addr = (PCI_SLOT(pci_dev->devfn) << 16) | PCI_FUNC(pci_dev->devfn); >- *handle = acpi_get_child(DEVICE_ACPI_HANDLE(dev->parent), addr); >- if (!*handle) >+ adev = acpi_get_child_device(ACPI_HANDLE(dev->parent), addr); >+ if (!adev) > return -ENODEV; >+ >+ *handle = adev->handle; > return 0; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 903360
:
686239
| 707591 |
710781