Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b699e0a authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cnss2: Avoid blocking target to reboot or shutdown"

parents 1cc2c802 fbbde97c
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -557,8 +557,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);

@@ -2112,6 +2114,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;
+2 −0
Original line number Diff line number Diff line
@@ -26,8 +26,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,