mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
Merge "cnss2: Avoid blocking target to reboot or shutdown"
This commit is contained in:
commit
7bafe03443
2 changed files with 7 additions and 1 deletions
|
|
@ -520,8 +520,10 @@ int cnss_driver_event_post(struct cnss_plat_data *plat_priv,
|
|||
if (!(flags & CNSS_EVENT_SYNC))
|
||||
goto out;
|
||||
|
||||
if (flags & CNSS_EVENT_UNINTERRUPTIBLE)
|
||||
if (flags & CNSS_EVENT_UNKILLABLE)
|
||||
wait_for_completion(&event->complete);
|
||||
else if (flags & CNSS_EVENT_UNINTERRUPTIBLE)
|
||||
ret = wait_for_completion_killable(&event->complete);
|
||||
else
|
||||
ret = wait_for_completion_interruptible(&event->complete);
|
||||
|
||||
|
|
@ -2104,6 +2106,8 @@ static int cnss_reboot_notifier(struct notifier_block *nb,
|
|||
container_of(nb, struct cnss_plat_data, reboot_nb);
|
||||
|
||||
set_bit(CNSS_IN_REBOOT, &plat_priv->driver_state);
|
||||
del_timer(&plat_priv->fw_boot_timer);
|
||||
complete_all(&plat_priv->power_up_complete);
|
||||
cnss_pr_dbg("Reboot is in progress with action %d\n", action);
|
||||
|
||||
return NOTIFY_DONE;
|
||||
|
|
|
|||
|
|
@ -31,8 +31,10 @@
|
|||
|
||||
#define CNSS_EVENT_SYNC BIT(0)
|
||||
#define CNSS_EVENT_UNINTERRUPTIBLE BIT(1)
|
||||
#define CNSS_EVENT_UNKILLABLE BIT(2)
|
||||
#define CNSS_EVENT_SYNC_UNINTERRUPTIBLE (CNSS_EVENT_SYNC | \
|
||||
CNSS_EVENT_UNINTERRUPTIBLE)
|
||||
#define CNSS_EVENT_SYNC_UNKILLABLE (CNSS_EVENT_SYNC | CNSS_EVENT_UNKILLABLE)
|
||||
|
||||
enum cnss_dev_bus_type {
|
||||
CNSS_BUS_NONE = -1,
|
||||
|
|
|
|||
Loading…
Reference in a new issue