wifi: iwlwifi: pcie: rescan bus if no parent
authorJohannes Berg <johannes.berg@intel.com>
Wed, 13 Sep 2023 11:56:37 +0000 (14:56 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 13 Sep 2023 14:11:09 +0000 (16:11 +0200)
commit111ed1eb175754a9ef11811240329ca40db2072f
tree966db77b783fcd03f5aca3e784ea83a4f12c6cf3
parent30ca8b0c4d6c9fb1d76e5894b1e8bf7c6a12224d
wifi: iwlwifi: pcie: rescan bus if no parent

If the bus has no parent due to the topology, the device rescan
(after some kind of reset was detected) wouldn't work. On the
other hand, some platforms appear to require scanning the parent,
though it's not clear why.

However if there's no parent, then we skip the rescan, which isn't a
good idea. Change the code to go to the parent only if that exists,
and rescan the bus itself where it doesn't.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230913145231.f7795a1ccdab.I2b84810a743469a1bcabf3628262cf54311593f4@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/pcie/trans.c