subsystem_restart: Always performs soft resets when subsystems crash

* OEM is using a dirty list and userspace nodes to override restart_level
for some subsystems. Why not just ignore all RESET_SOC and use a soft reset
instead? Nobody wanna to see their device goes randomly reboot sometimes.

* Note that commit 0e27242 is also needed to fix broken irq free when soft
reset the modem.

Change-Id: I36f6355db170a289de73bb6202be1618bd46e688
Signed-off-by: LibXZR <xzr467706992@163.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
This commit is contained in:
LibXZR 2021-05-23 23:33:22 +08:00 committed by Richard Raya
parent 0e27242ef3
commit 17ef7df74a

View File

@ -1272,20 +1272,8 @@ int subsystem_restart_dev(struct subsys_device *dev)
}
dev->restart_level = RESET_SUBSYS_COUPLED;
__subsystem_restart_dev(dev);
switch (dev->restart_level) {
case RESET_SUBSYS_COUPLED:
__subsystem_restart_dev(dev);
break;
case RESET_SOC:
__pm_stay_awake(&dev->ssr_wlock);
schedule_work(&dev->device_restart_work);
return 0;
default:
panic("subsys-restart: Unknown restart level!\n");
break;
}
module_put(dev->owner);
put_device(&dev->dev);