linux-stable/drivers/platform
Ben Fradella 4569c9641e platform/x86: p2sb: Don't init until unassigned resources have been assigned
[ Upstream commit 2c6370e660 ]

The P2SB could get an invalid BAR from the BIOS, and that won't be fixed
up until pcibios_assign_resources(), which is an fs_initcall().

- Move p2sb_fs_init() to an fs_initcall_sync(). This is still early
  enough to avoid a race with any dependent drivers.

- Add a check for IORESOURCE_UNSET in p2sb_valid_resource() to catch
  unset BARs going forward.

- Return error values from p2sb_fs_init() so that the 'initcall_debug'
  cmdline arg provides useful data.

Signed-off-by: Ben Fradella <bfradell@netapp.com>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Klara Modin <klarasmodin@gmail.com>
Reviewed-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Link: https://lore.kernel.org/r/20240509164905.41016-1-bcfradella@proton.me
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-06-27 13:49:03 +02:00
..
chrome platform/chrome: cros_ec: Handle events during suspend after resume completion 2024-06-16 13:47:33 +02:00
goldfish
loongarch
mellanox platform/mellanox: mlxbf-tmfifo: Drop Tx network packet when Tx TmFIFO is full 2024-03-01 13:34:49 +01:00
mips
olpc platform/olpc: olpc-xo175-ec: Use SPI device ID data to bind device 2023-03-20 14:43:35 +01:00
surface platform/surface: aggregator: fix recv_buf() return value 2023-12-13 18:45:24 +01:00
x86 platform/x86: p2sb: Don't init until unassigned resources have been assigned 2024-06-27 13:49:03 +02:00
Kconfig
Makefile