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

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

Merge "Fixing the GVM suspend failure due to veth_ipa_suspend"

parents 8f48489b 8a64c61c
Loading
Loading
Loading
Loading
+16 −4
Original line number Diff line number Diff line
@@ -126,6 +126,8 @@ static const char * const IPA_OFFLOAD_EVENT_string[] = {
	"EV_EMAC_DEINIT"
};

static bool veth_ipa_init_flag;


/**
 * veth_ipa_offload_init() - Called from driver to initialize
@@ -1600,7 +1602,6 @@ static int veth_ipa_init(struct platform_device *pdev)
		goto fail_netdev_priv;
	}

	veth_pdata_p = veth_ipa_pdata;

	memset(veth_ipa_pdata, 0, sizeof(*veth_ipa_pdata));
	VETH_IPA_DEBUG("veth_ipa_pdata; (private) = %pK\n", veth_ipa_pdata);
@@ -1652,8 +1653,10 @@ static int veth_ipa_init(struct platform_device *pdev)
	mutex_init(&veth_ipa_pdata->prv_ipa.ipa_lock);
	veth_ipa_pdata->prv_ipa.emac_init = false;
	veth_ipa_pdata->veth_emac_mem.init_complete = false;
	pr_info("VETH_IPA init flag set to false\n");
	veth_ipa_init_flag = false;
	VETH_IPA_STATE_DEBUG(veth_ipa_pdata);

	veth_pdata_p = veth_ipa_pdata;
	VETH_IPA_INFO("VETH_IPA was initialized successfully\n");


@@ -1732,6 +1735,8 @@ static int veth_ipa_open(struct net_device *net)
		VETH_IPA_INFO("%s: Starting EMAC kthread\n", __func__);
		veth_ipa_ctx->veth_emac_mem.init_complete = true;
	}
	veth_ipa_init_flag = true;
	pr_info("VETH_IPA init flag set to true\n");
	veth_ipa_offload_event_handler(veth_ipa_ctx, EV_DEV_OPEN);


@@ -1931,7 +1936,7 @@ static int veth_ipa_stop(struct net_device *net)

	if (pdata->state == VETH_IPA_DOWN) {
		VETH_IPA_ERROR("can't do network interface down without up\n");
		return -EPERM;
		return 0;
	}

	pdata->state = VETH_IPA_DOWN;
@@ -2278,6 +2283,9 @@ static int veth_ipa_ap_suspend(struct device *dev)
	int    ret = 0;
	struct veth_ipa_dev *pdata = veth_pdata_p;

	pr_info("VETH_IPA suspend init flag check\n");
	if (!veth_ipa_init_flag)
		return 0;

	pr_info("%s: veth_global_pdata->state = %d\n",
			__func__,
@@ -2294,7 +2302,11 @@ static int veth_ipa_ap_resume(struct device *dev)
{
	struct veth_ipa_dev *pdata = veth_pdata_p;

	pr_info("%s\n", __func__);
	pr_info("%s :\n", __func__);
	pr_info("VETH_IPA resume init flag check\n");

	if (!veth_ipa_init_flag)
		return 0;
	pr_info("%s: veth_global_pdata->state = %d\n",
			__func__,
			veth_pdata_p->state);