bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/2 libacpica] acpi_init: Match resources on function 0xffff


From: Damien Zammit
Subject: [PATCH 1/2 libacpica] acpi_init: Match resources on function 0xffff
Date: Sat, 28 Dec 2024 01:28:02 +0000

This ensures the resources are correct when matching.
Resources are always all ones in the function field
as they apply to all functions of a device.

---
 debian/patches/acpi-init-files.diff | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/debian/patches/acpi-init-files.diff 
b/debian/patches/acpi-init-files.diff
index 8589f33..eb7482c 100644
--- a/debian/patches/acpi-init-files.diff
+++ b/debian/patches/acpi-init-files.diff
@@ -1,6 +1,6 @@
 --- /dev/null
 +++ b/acpi_init.c
-@@ -0,0 +1,598 @@
+@@ -0,0 +1,597 @@
 +// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
 +#include <acpi/acpi.h>
 +
@@ -479,7 +479,7 @@
 +  acpi_handle parent_handle = NULL;
 +  acpi_handle lnk = NULL;
 +  acpi_status err = AE_OK;
-+  u16 prt_dev;
++  u16 prt_dev, prt_func;
 +  struct slots *pcislots = NULL, *iter;
 +  int nslots = 0;
 +
@@ -521,9 +521,8 @@
 +    {
 +      /* Already applies to the bus of the device */
 +      prt_dev = (entry->address >> 16) & 0xffff;
-+      // TODO: may need to compare prt_func
-+      // prt_func = entry->address & 0xffff;
-+      if (prt_dev == dev)
++      prt_func = entry->address & 0xffff;
++      if ((prt_dev == dev) && (prt_func == 0xffff))
 +        {
 +          if (entry->source[0])
 +          {
-- 
2.45.2





reply via email to

[Prev in Thread] Current Thread [Next in Thread]