X86 platform drivers
 help / color / mirror / Atom feed
* [PATCH 07/13] platform/x86: asus-wmi: Convert to pci_assign_unassigned_bus_resources()
       [not found] <20261116152403.2672-1-ilpo.jarvinen@linux.intel.com>
@ 2026-11-16 15:23 ` Ilpo Järvinen
  2026-11-17  2:43   ` Denis Benato
  2026-11-16 15:23 ` [PATCH 08/13] platform/x86: eeepc-laptop: " Ilpo Järvinen
  1 sibling, 1 reply; 4+ messages in thread
From: Ilpo Järvinen @ 2026-11-16 15:23 UTC (permalink / raw)
  To: linux-pci, Bjorn Helgaas, Lorenzo Pieralisi, Rob Herring,
	Krzysztof Wilczyński, Corentin Chary, Luke D. Jones,
	Denis Benato, Hans de Goede, Ilpo Järvinen,
	platform-driver-x86, linux-kernel

The asus-wmi driver scans single device and then attempts to assign its
resource using pci_bus_assign_resources(). That function makes bridge
window sizing disjoint from the assignment phase and is going to be
removed.

Convert pci_bus_assign_resources() to
pci_assign_unassigned_bus_resources() which is likely no-op in this case
as it looks like bridges are not involved here.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
 drivers/platform/x86/asus-wmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index b33ebdb21aa2..9eb783eb53c6 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -2325,7 +2325,7 @@ static void asus_rfkill_hotplug(struct asus_wmi *asus)
 			}
 			dev = pci_scan_single_device(bus, 0);
 			if (dev) {
-				pci_bus_assign_resources(bus);
+				pci_assign_unassigned_bus_resources(bus);
 				pci_bus_add_device(dev);
 			}
 		} else {
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 08/13] platform/x86: eeepc-laptop: Convert to pci_assign_unassigned_bus_resources()
       [not found] <20261116152403.2672-1-ilpo.jarvinen@linux.intel.com>
  2026-11-16 15:23 ` [PATCH 07/13] platform/x86: asus-wmi: Convert to pci_assign_unassigned_bus_resources() Ilpo Järvinen
@ 2026-11-16 15:23 ` Ilpo Järvinen
  2026-11-17  2:52   ` Denis Benato
  1 sibling, 1 reply; 4+ messages in thread
From: Ilpo Järvinen @ 2026-11-16 15:23 UTC (permalink / raw)
  To: linux-pci, Bjorn Helgaas, Lorenzo Pieralisi, Rob Herring,
	Krzysztof Wilczyński, Corentin Chary, Luke D. Jones,
	Denis Benato, Hans de Goede, Ilpo Järvinen,
	platform-driver-x86, linux-kernel

The eeepc-laptop driver scans single device and then attempts to assign
its resource using pci_bus_assign_resources(). That function makes
bridge window sizing disjoint from the assignment phase and is going to
be removed.

Convert pci_bus_assign_resources() to
pci_assign_unassigned_bus_resources() which is likely no-op in this case
as it looks like bridges are not involved here.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
 drivers/platform/x86/eeepc-laptop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c
index 8a640c25830a..7394221cbad1 100644
--- a/drivers/platform/x86/eeepc-laptop.c
+++ b/drivers/platform/x86/eeepc-laptop.c
@@ -609,7 +609,7 @@ static void eeepc_rfkill_hotplug(struct eeepc_laptop *eeepc, acpi_handle handle)
 		}
 		dev = pci_scan_single_device(bus, 0);
 		if (dev) {
-			pci_bus_assign_resources(bus);
+			pci_assign_unassigned_bus_resources(bus);
 			pci_bus_add_device(dev);
 		}
 	} else {
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 07/13] platform/x86: asus-wmi: Convert to pci_assign_unassigned_bus_resources()
  2026-11-16 15:23 ` [PATCH 07/13] platform/x86: asus-wmi: Convert to pci_assign_unassigned_bus_resources() Ilpo Järvinen
@ 2026-11-17  2:43   ` Denis Benato
  0 siblings, 0 replies; 4+ messages in thread
From: Denis Benato @ 2026-11-17  2:43 UTC (permalink / raw)
  To: Ilpo Järvinen, linux-pci, Bjorn Helgaas, Lorenzo Pieralisi,
	Rob Herring, Krzysztof Wilczyński, Corentin Chary,
	Luke D. Jones, Hans de Goede, platform-driver-x86, linux-kernel


On 11/16/26 16:23, Ilpo Järvinen wrote:
> The asus-wmi driver scans single device and then attempts to assign its
> resource using pci_bus_assign_resources(). That function makes bridge
> window sizing disjoint from the assignment phase and is going to be
> removed.
>
> Convert pci_bus_assign_resources() to
> pci_assign_unassigned_bus_resources() which is likely no-op in this case
> as it looks like bridges are not involved here.

Reviewed-by: Denis Benato <denis.benato@linux.dev>

> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> ---
>  drivers/platform/x86/asus-wmi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
> index b33ebdb21aa2..9eb783eb53c6 100644
> --- a/drivers/platform/x86/asus-wmi.c
> +++ b/drivers/platform/x86/asus-wmi.c
> @@ -2325,7 +2325,7 @@ static void asus_rfkill_hotplug(struct asus_wmi *asus)
>  			}
>  			dev = pci_scan_single_device(bus, 0);
>  			if (dev) {
> -				pci_bus_assign_resources(bus);
> +				pci_assign_unassigned_bus_resources(bus);
>  				pci_bus_add_device(dev);
>  			}
>  		} else {

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 08/13] platform/x86: eeepc-laptop: Convert to pci_assign_unassigned_bus_resources()
  2026-11-16 15:23 ` [PATCH 08/13] platform/x86: eeepc-laptop: " Ilpo Järvinen
@ 2026-11-17  2:52   ` Denis Benato
  0 siblings, 0 replies; 4+ messages in thread
From: Denis Benato @ 2026-11-17  2:52 UTC (permalink / raw)
  To: Ilpo Järvinen, linux-pci, Bjorn Helgaas, Lorenzo Pieralisi,
	Rob Herring, Krzysztof Wilczyński, Corentin Chary,
	Luke D. Jones, Hans de Goede, platform-driver-x86, linux-kernel


On 11/16/26 16:23, Ilpo Järvinen wrote:
> The eeepc-laptop driver scans single device and then attempts to assign
> its resource using pci_bus_assign_resources(). That function makes
> bridge window sizing disjoint from the assignment phase and is going to
> be removed.
>
> Convert pci_bus_assign_resources() to
> pci_assign_unassigned_bus_resources() which is likely no-op in this case
> as it looks like bridges are not involved here.

Hi Ilpo,

I don't know exactly why, but this smells like what I had to do in
asus-armoury: scan the pci bus for new devices.

It has been on my TODO list for a while (and I think it will need to
stay there some more) to try to understand why these are even needed.

Dissecting the ROG ally xg mobile ACPI I found the signal that is supposed
to tell the kernel about the hotplug, but it's either not reaching the correct
part of the system or the triggered rescan is not on the whole pci root port
and the linux kernel is searching for changes where those changes aren't
possible.

I have some more notes:

In https://uefi.org/specs/ACPI/6.4_A/05_ACPI_Software_Programming_Model.html#device-object-notifications
I quote: "If the device is a bridge, OSPM may re-enumerate the bridge and the child bus"... The kernel has handling for this already with ACPI_NOTIFY_DEVICE_CHECK but it looks like
what needs to happen isn't happening (probably is re-enumerating only the child).

I will need to debug this eventually, unless someone more skilled then me in
ACPI and pci takes a look at that and solve the issue properly without
triggering a rescan, since the ACPI notification is surely there (at least for ally),
not this exact case.

Best regards,
Denis

Reviewed-by: Denis Benato <denis.benato@linux.dev>

> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> ---
>  drivers/platform/x86/eeepc-laptop.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c
> index 8a640c25830a..7394221cbad1 100644
> --- a/drivers/platform/x86/eeepc-laptop.c
> +++ b/drivers/platform/x86/eeepc-laptop.c
> @@ -609,7 +609,7 @@ static void eeepc_rfkill_hotplug(struct eeepc_laptop *eeepc, acpi_handle handle)
>  		}
>  		dev = pci_scan_single_device(bus, 0);
>  		if (dev) {
> -			pci_bus_assign_resources(bus);
> +			pci_assign_unassigned_bus_resources(bus);
>  			pci_bus_add_device(dev);
>  		}
>  	} else {

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-17  2:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20261116152403.2672-1-ilpo.jarvinen@linux.intel.com>
2026-11-16 15:23 ` [PATCH 07/13] platform/x86: asus-wmi: Convert to pci_assign_unassigned_bus_resources() Ilpo Järvinen
2026-11-17  2:43   ` Denis Benato
2026-11-16 15:23 ` [PATCH 08/13] platform/x86: eeepc-laptop: " Ilpo Järvinen
2026-11-17  2:52   ` Denis Benato

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox