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

Commit 77dc5875 authored by jiad's avatar jiad
Browse files

mhi: core: fix sequence for new transfer



sequence for both rddm and fw download are initialized to be 0.
They are incremented by 1 in bhi_probe() and upon real transfer
takes place.

Issue is in SSR case, sequence is incrementing in a way like 1,
3, 5 and etc as observed. The increment in bhi_probe() seems
unnecessay as there's no real transfer.

Fix is to initialize sequence to 1 and increment by 1 when real
transfer takes place in bhi_bhie_transfer().

Change-Id: I210840cd1f7fecc300ecb69da8a50fbb1d200562
Signed-off-by: default avatarJia Ding <jiad@codeaurora.org>
CRs-Fixed: 2147433
parent d33ed6b2
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -641,7 +641,6 @@ int bhi_probe(struct mhi_device_ctxt *mhi_dev_ctxt)
		image += to_copy;
	}

	fw_table->sequence++;
	release_firmware(firmware);

	/* allocate memory and setup rddm table */
@@ -662,7 +661,6 @@ int bhi_probe(struct mhi_device_ctxt *mhi_dev_ctxt)
					rddm_table->bhie_mem_info[i].phys_addr;
				sg_dma_len(itr) = size;
			}
			rddm_table->sequence++;
		} else {
			/* out of memory for rddm, not fatal error */
			mhi_log(mhi_dev_ctxt, MHI_MSG_INFO,
+1 −0
Original line number Diff line number Diff line
@@ -459,6 +459,7 @@ static int mhi_plat_probe(struct platform_device *pdev)
			return r;
		}
		INIT_WORK(&bhi_ctxt->fw_load_work, bhi_firmware_download);
		bhi_ctxt->fw_table.sequence = 1;
	}

	mhi_dev_ctxt->flags.bb_required =
+1 −0
Original line number Diff line number Diff line
@@ -1898,6 +1898,7 @@ int mhi_register_device(struct mhi_device *mhi_device,
	if (mhi_device->support_rddm) {
		mhi_dev_ctxt->bhi_ctxt.support_rddm = true;
		mhi_dev_ctxt->bhi_ctxt.rddm_size = mhi_device->rddm_size;
		mhi_dev_ctxt->bhi_ctxt.rddm_table.sequence = 1;

		mhi_log(mhi_dev_ctxt, MHI_MSG_INFO,
			"Device support rddm of size:0x%lx bytes\n",