From nobody Wed Dec 17 14:20:36 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D011BC4167B for ; Mon, 27 Nov 2023 12:45:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233397AbjK0Mpu (ORCPT ); Mon, 27 Nov 2023 07:45:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233405AbjK0Mpn (ORCPT ); Mon, 27 Nov 2023 07:45:43 -0500 Received: from mail-qv1-xf33.google.com (mail-qv1-xf33.google.com [IPv6:2607:f8b0:4864:20::f33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 585FF10F for ; Mon, 27 Nov 2023 04:45:49 -0800 (PST) Received: by mail-qv1-xf33.google.com with SMTP id 6a1803df08f44-677f832d844so21992876d6.2 for ; Mon, 27 Nov 2023 04:45:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701089148; x=1701693948; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=no0VTw7AaZRHaEYiXHFJsL4mdLmGMlJqeRVIKxNTTiA=; b=tI7iWclB75NeVByt/ZumuGf8SutG07BYCTzXF84OO+tks/LGUIgFZUChblMVyoUwh5 Z9y8r2Zk6Fgb0YKn6LueXNK0DBxILp18b9M6vRShEYEUNHGezHkJO7HYWLRt4SobBF6q 29II976loJCqCIOJ8y/PdnB7IpFHLjAhZZyxnNOTFJbZgsy2uej4zJGnxm+HLOKRS1XA R3qTVLixahPR2oyw6CR3zTslzeQoouf5yh3jFb+pJTw1vUtF+asaMmN1vmsWsJ0RgURe QyQJ5RY6aNjl1GCxw3BPtiK/+mhFq6xwjBiovWn6Hbz0Izkm/Gv5CdkdIgO8ucuYic/d Gafg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701089148; x=1701693948; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=no0VTw7AaZRHaEYiXHFJsL4mdLmGMlJqeRVIKxNTTiA=; b=qTwg01iorlDAbSNjaNsbCqHrA/Lkwdh0HwZ/pW2jDCn71X+XpXeBT83Aovhf9ktDRk iT3/8x2mxZ8xC9vdWM2T2Kpixlh5cQ5lMkyNdg7GCH2D9r1/8vOS3bhC60CZhDNeL+vL uPUxDVg9qBzp5oNlCju0RYR4uP6ar88yUGGj5qTDTl3DxvhP4jwY2/oc04ZoCMJjj8dY hDy5K7R0qCSaXk4JAeGHF/ujVkQy6dNwCK/lnZspjdLzxrLHmBNU7uYF8ZzsRJ9btA0J xtBPfY7Q87ZRvkbGVgpbMGSINtmZuCrIdzwz/Blp40FsPj9EqrJovEOld6gH8fkK1hKr 5lyw== X-Gm-Message-State: AOJu0YymcojlMs8taMei2x+RBWkbROwDKKVBF0XUZM9xZWcjFXE3/lrt 7A7u+hjbZw1fkFoNP0RMaVDS X-Google-Smtp-Source: AGHT+IEDsR6fqa+PkwYSpn0j413uev3E0r+IobYut8mCcD//Br+4lRGXm5ATAklV35mB//KZGADMyw== X-Received: by 2002:a0c:e887:0:b0:67a:2ae3:a971 with SMTP id b7-20020a0ce887000000b0067a2ae3a971mr6857772qvo.2.1701089148388; Mon, 27 Nov 2023 04:45:48 -0800 (PST) Received: from localhost.localdomain ([117.213.103.241]) by smtp.gmail.com with ESMTPSA id er10-20020a056214190a00b0067a204b4688sm2832231qvb.18.2023.11.27.04.45.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 04:45:47 -0800 (PST) From: Manivannan Sadhasivam To: lpieralisi@kernel.org, kw@linux.com Cc: kishon@kernel.org, bhelgaas@google.com, mhi@lists.linux.dev, linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Manivannan Sadhasivam Subject: [PATCH 1/9] bus: mhi: ep: Pass mhi_ep_buf_info struct to read/write APIs Date: Mon, 27 Nov 2023 18:15:21 +0530 Message-Id: <20231127124529.78203-2-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231127124529.78203-1-manivannan.sadhasivam@linaro.org> References: <20231127124529.78203-1-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" In the preparation of DMA async support, let's pass the parameters to read_from_host() and write_to_host() APIs using mhi_ep_buf_info structure. No functional change. Signed-off-by: Manivannan Sadhasivam --- drivers/bus/mhi/ep/main.c | 23 +++---- drivers/bus/mhi/ep/ring.c | 41 ++++++------ drivers/pci/endpoint/functions/pci-epf-mhi.c | 66 +++++++++++--------- include/linux/mhi_ep.h | 16 ++++- 4 files changed, 84 insertions(+), 62 deletions(-) diff --git a/drivers/bus/mhi/ep/main.c b/drivers/bus/mhi/ep/main.c index 4c8773881e1f..cdf5a84d1f21 100644 --- a/drivers/bus/mhi/ep/main.c +++ b/drivers/bus/mhi/ep/main.c @@ -344,10 +344,9 @@ static int mhi_ep_read_channel(struct mhi_ep_cntrl *mh= i_cntrl, struct mhi_ep_chan *mhi_chan =3D &mhi_cntrl->mhi_chan[ring->ch_id]; struct device *dev =3D &mhi_cntrl->mhi_dev->dev; size_t tr_len, read_offset, write_offset; + struct mhi_ep_buf_info buf_info =3D {}; struct mhi_ring_element *el; bool tr_done =3D false; - void *write_addr; - u64 read_addr; u32 buf_left; int ret; =20 @@ -376,11 +375,13 @@ static int mhi_ep_read_channel(struct mhi_ep_cntrl *m= hi_cntrl, =20 read_offset =3D mhi_chan->tre_size - mhi_chan->tre_bytes_left; write_offset =3D len - buf_left; - read_addr =3D mhi_chan->tre_loc + read_offset; - write_addr =3D result->buf_addr + write_offset; + + buf_info.host_addr =3D mhi_chan->tre_loc + read_offset; + buf_info.dev_addr =3D result->buf_addr + write_offset; + buf_info.size =3D tr_len; =20 dev_dbg(dev, "Reading %zd bytes from channel (%u)\n", tr_len, ring->ch_i= d); - ret =3D mhi_cntrl->read_from_host(mhi_cntrl, read_addr, write_addr, tr_l= en); + ret =3D mhi_cntrl->read_from_host(mhi_cntrl, &buf_info); if (ret < 0) { dev_err(&mhi_chan->mhi_dev->dev, "Error reading from channel\n"); return ret; @@ -503,12 +504,11 @@ int mhi_ep_queue_skb(struct mhi_ep_device *mhi_dev, s= truct sk_buff *skb) struct mhi_ep_cntrl *mhi_cntrl =3D mhi_dev->mhi_cntrl; struct mhi_ep_chan *mhi_chan =3D mhi_dev->dl_chan; struct device *dev =3D &mhi_chan->mhi_dev->dev; + struct mhi_ep_buf_info buf_info =3D {}; struct mhi_ring_element *el; u32 buf_left, read_offset; struct mhi_ep_ring *ring; enum mhi_ev_ccs code; - void *read_addr; - u64 write_addr; size_t tr_len; u32 tre_len; int ret; @@ -537,11 +537,13 @@ int mhi_ep_queue_skb(struct mhi_ep_device *mhi_dev, s= truct sk_buff *skb) =20 tr_len =3D min(buf_left, tre_len); read_offset =3D skb->len - buf_left; - read_addr =3D skb->data + read_offset; - write_addr =3D MHI_TRE_DATA_GET_PTR(el); + + buf_info.dev_addr =3D skb->data + read_offset; + buf_info.host_addr =3D MHI_TRE_DATA_GET_PTR(el); + buf_info.size =3D tr_len; =20 dev_dbg(dev, "Writing %zd bytes to channel (%u)\n", tr_len, ring->ch_id); - ret =3D mhi_cntrl->write_to_host(mhi_cntrl, read_addr, write_addr, tr_le= n); + ret =3D mhi_cntrl->write_to_host(mhi_cntrl, &buf_info); if (ret < 0) { dev_err(dev, "Error writing to the channel\n"); goto err_exit; @@ -1449,7 +1451,6 @@ int mhi_ep_register_controller(struct mhi_ep_cntrl *m= hi_cntrl, ret =3D -ENOMEM; goto err_destroy_tre_buf_cache; } - INIT_WORK(&mhi_cntrl->state_work, mhi_ep_state_worker); INIT_WORK(&mhi_cntrl->reset_work, mhi_ep_reset_worker); INIT_WORK(&mhi_cntrl->cmd_ring_work, mhi_ep_cmd_ring_worker); diff --git a/drivers/bus/mhi/ep/ring.c b/drivers/bus/mhi/ep/ring.c index a1071c13761b..7ea952860def 100644 --- a/drivers/bus/mhi/ep/ring.c +++ b/drivers/bus/mhi/ep/ring.c @@ -30,7 +30,8 @@ static int __mhi_ep_cache_ring(struct mhi_ep_ring *ring, = size_t end) { struct mhi_ep_cntrl *mhi_cntrl =3D ring->mhi_cntrl; struct device *dev =3D &mhi_cntrl->mhi_dev->dev; - size_t start, copy_size; + struct mhi_ep_buf_info buf_info =3D {}; + size_t start; int ret; =20 /* Don't proceed in the case of event ring. This happens during mhi_ep_ri= ng_start(). */ @@ -43,30 +44,34 @@ static int __mhi_ep_cache_ring(struct mhi_ep_ring *ring= , size_t end) =20 start =3D ring->wr_offset; if (start < end) { - copy_size =3D (end - start) * sizeof(struct mhi_ring_element); - ret =3D mhi_cntrl->read_from_host(mhi_cntrl, ring->rbase + - (start * sizeof(struct mhi_ring_element)), - &ring->ring_cache[start], copy_size); + buf_info.size =3D (end - start) * sizeof(struct mhi_ring_element); + buf_info.host_addr =3D ring->rbase + (start * sizeof(struct mhi_ring_ele= ment)); + buf_info.dev_addr =3D &ring->ring_cache[start]; + + ret =3D mhi_cntrl->read_from_host(mhi_cntrl, &buf_info); if (ret < 0) return ret; } else { - copy_size =3D (ring->ring_size - start) * sizeof(struct mhi_ring_element= ); - ret =3D mhi_cntrl->read_from_host(mhi_cntrl, ring->rbase + - (start * sizeof(struct mhi_ring_element)), - &ring->ring_cache[start], copy_size); + buf_info.size =3D (ring->ring_size - start) * sizeof(struct mhi_ring_ele= ment); + buf_info.host_addr =3D ring->rbase + (start * sizeof(struct mhi_ring_ele= ment)); + buf_info.dev_addr =3D &ring->ring_cache[start]; + + ret =3D mhi_cntrl->read_from_host(mhi_cntrl, &buf_info); if (ret < 0) return ret; =20 if (end) { - ret =3D mhi_cntrl->read_from_host(mhi_cntrl, ring->rbase, - &ring->ring_cache[0], - end * sizeof(struct mhi_ring_element)); + buf_info.host_addr =3D ring->rbase; + buf_info.dev_addr =3D &ring->ring_cache[0]; + buf_info.size =3D end * sizeof(struct mhi_ring_element); + + ret =3D mhi_cntrl->read_from_host(mhi_cntrl, &buf_info); if (ret < 0) return ret; } } =20 - dev_dbg(dev, "Cached ring: start %zu end %zu size %zu\n", start, end, cop= y_size); + dev_dbg(dev, "Cached ring: start %zu end %zu size %zu\n", start, end, buf= _info.size); =20 return 0; } @@ -102,6 +107,7 @@ int mhi_ep_ring_add_element(struct mhi_ep_ring *ring, s= truct mhi_ring_element *e { struct mhi_ep_cntrl *mhi_cntrl =3D ring->mhi_cntrl; struct device *dev =3D &mhi_cntrl->mhi_dev->dev; + struct mhi_ep_buf_info buf_info =3D {}; size_t old_offset =3D 0; u32 num_free_elem; __le64 rp; @@ -133,12 +139,11 @@ int mhi_ep_ring_add_element(struct mhi_ep_ring *ring,= struct mhi_ring_element *e rp =3D cpu_to_le64(ring->rd_offset * sizeof(*el) + ring->rbase); memcpy_toio((void __iomem *) &ring->ring_ctx->generic.rp, &rp, sizeof(u64= )); =20 - ret =3D mhi_cntrl->write_to_host(mhi_cntrl, el, ring->rbase + (old_offset= * sizeof(*el)), - sizeof(*el)); - if (ret < 0) - return ret; + buf_info.host_addr =3D ring->rbase + (old_offset * sizeof(*el)); + buf_info.dev_addr =3D el; + buf_info.size =3D sizeof(*el); =20 - return 0; + return mhi_cntrl->write_to_host(mhi_cntrl, &buf_info); } =20 void mhi_ep_ring_init(struct mhi_ep_ring *ring, enum mhi_ep_ring_type type= , u32 id) diff --git a/drivers/pci/endpoint/functions/pci-epf-mhi.c b/drivers/pci/end= point/functions/pci-epf-mhi.c index daa09289eede..6dc918a8a023 100644 --- a/drivers/pci/endpoint/functions/pci-epf-mhi.c +++ b/drivers/pci/endpoint/functions/pci-epf-mhi.c @@ -209,28 +209,28 @@ static void pci_epf_mhi_raise_irq(struct mhi_ep_cntrl= *mhi_cntrl, u32 vector) vector + 1); } =20 -static int pci_epf_mhi_iatu_read(struct mhi_ep_cntrl *mhi_cntrl, u64 from, - void *to, size_t size) +static int pci_epf_mhi_iatu_read(struct mhi_ep_cntrl *mhi_cntrl, + struct mhi_ep_buf_info *buf_info) { struct pci_epf_mhi *epf_mhi =3D to_epf_mhi(mhi_cntrl); - size_t offset =3D get_align_offset(epf_mhi, from); + size_t offset =3D get_align_offset(epf_mhi, buf_info->host_addr); void __iomem *tre_buf; phys_addr_t tre_phys; int ret; =20 mutex_lock(&epf_mhi->lock); =20 - ret =3D __pci_epf_mhi_alloc_map(mhi_cntrl, from, &tre_phys, &tre_buf, - offset, size); + ret =3D __pci_epf_mhi_alloc_map(mhi_cntrl, buf_info->host_addr, &tre_phys, + &tre_buf, offset, buf_info->size); if (ret) { mutex_unlock(&epf_mhi->lock); return ret; } =20 - memcpy_fromio(to, tre_buf, size); + memcpy_fromio(buf_info->dev_addr, tre_buf, buf_info->size); =20 - __pci_epf_mhi_unmap_free(mhi_cntrl, from, tre_phys, tre_buf, offset, - size); + __pci_epf_mhi_unmap_free(mhi_cntrl, buf_info->host_addr, tre_phys, + tre_buf, offset, buf_info->size); =20 mutex_unlock(&epf_mhi->lock); =20 @@ -238,27 +238,27 @@ static int pci_epf_mhi_iatu_read(struct mhi_ep_cntrl = *mhi_cntrl, u64 from, } =20 static int pci_epf_mhi_iatu_write(struct mhi_ep_cntrl *mhi_cntrl, - void *from, u64 to, size_t size) + struct mhi_ep_buf_info *buf_info) { struct pci_epf_mhi *epf_mhi =3D to_epf_mhi(mhi_cntrl); - size_t offset =3D get_align_offset(epf_mhi, to); + size_t offset =3D get_align_offset(epf_mhi, buf_info->host_addr); void __iomem *tre_buf; phys_addr_t tre_phys; int ret; =20 mutex_lock(&epf_mhi->lock); =20 - ret =3D __pci_epf_mhi_alloc_map(mhi_cntrl, to, &tre_phys, &tre_buf, - offset, size); + ret =3D __pci_epf_mhi_alloc_map(mhi_cntrl, buf_info->host_addr, &tre_phys, + &tre_buf, offset, buf_info->size); if (ret) { mutex_unlock(&epf_mhi->lock); return ret; } =20 - memcpy_toio(tre_buf, from, size); + memcpy_toio(tre_buf, buf_info->dev_addr, buf_info->size); =20 - __pci_epf_mhi_unmap_free(mhi_cntrl, to, tre_phys, tre_buf, offset, - size); + __pci_epf_mhi_unmap_free(mhi_cntrl, buf_info->host_addr, tre_phys, + tre_buf, offset, buf_info->size); =20 mutex_unlock(&epf_mhi->lock); =20 @@ -270,8 +270,8 @@ static void pci_epf_mhi_dma_callback(void *param) complete(param); } =20 -static int pci_epf_mhi_edma_read(struct mhi_ep_cntrl *mhi_cntrl, u64 from, - void *to, size_t size) +static int pci_epf_mhi_edma_read(struct mhi_ep_cntrl *mhi_cntrl, + struct mhi_ep_buf_info *buf_info) { struct pci_epf_mhi *epf_mhi =3D to_epf_mhi(mhi_cntrl); struct device *dma_dev =3D epf_mhi->epf->epc->dev.parent; @@ -284,13 +284,13 @@ static int pci_epf_mhi_edma_read(struct mhi_ep_cntrl = *mhi_cntrl, u64 from, dma_addr_t dst_addr; int ret; =20 - if (size < SZ_4K) - return pci_epf_mhi_iatu_read(mhi_cntrl, from, to, size); + if (buf_info->size < SZ_4K) + return pci_epf_mhi_iatu_read(mhi_cntrl, buf_info); =20 mutex_lock(&epf_mhi->lock); =20 config.direction =3D DMA_DEV_TO_MEM; - config.src_addr =3D from; + config.src_addr =3D buf_info->host_addr; =20 ret =3D dmaengine_slave_config(chan, &config); if (ret) { @@ -298,14 +298,16 @@ static int pci_epf_mhi_edma_read(struct mhi_ep_cntrl = *mhi_cntrl, u64 from, goto err_unlock; } =20 - dst_addr =3D dma_map_single(dma_dev, to, size, DMA_FROM_DEVICE); + dst_addr =3D dma_map_single(dma_dev, buf_info->dev_addr, buf_info->size, + DMA_FROM_DEVICE); ret =3D dma_mapping_error(dma_dev, dst_addr); if (ret) { dev_err(dev, "Failed to map remote memory\n"); goto err_unlock; } =20 - desc =3D dmaengine_prep_slave_single(chan, dst_addr, size, DMA_DEV_TO_MEM, + desc =3D dmaengine_prep_slave_single(chan, dst_addr, buf_info->size, + DMA_DEV_TO_MEM, DMA_CTRL_ACK | DMA_PREP_INTERRUPT); if (!desc) { dev_err(dev, "Failed to prepare DMA\n"); @@ -332,15 +334,15 @@ static int pci_epf_mhi_edma_read(struct mhi_ep_cntrl = *mhi_cntrl, u64 from, } =20 err_unmap: - dma_unmap_single(dma_dev, dst_addr, size, DMA_FROM_DEVICE); + dma_unmap_single(dma_dev, dst_addr, buf_info->size, DMA_FROM_DEVICE); err_unlock: mutex_unlock(&epf_mhi->lock); =20 return ret; } =20 -static int pci_epf_mhi_edma_write(struct mhi_ep_cntrl *mhi_cntrl, void *fr= om, - u64 to, size_t size) +static int pci_epf_mhi_edma_write(struct mhi_ep_cntrl *mhi_cntrl, + struct mhi_ep_buf_info *buf_info) { struct pci_epf_mhi *epf_mhi =3D to_epf_mhi(mhi_cntrl); struct device *dma_dev =3D epf_mhi->epf->epc->dev.parent; @@ -353,13 +355,13 @@ static int pci_epf_mhi_edma_write(struct mhi_ep_cntrl= *mhi_cntrl, void *from, dma_addr_t src_addr; int ret; =20 - if (size < SZ_4K) - return pci_epf_mhi_iatu_write(mhi_cntrl, from, to, size); + if (buf_info->size < SZ_4K) + return pci_epf_mhi_iatu_write(mhi_cntrl, buf_info); =20 mutex_lock(&epf_mhi->lock); =20 config.direction =3D DMA_MEM_TO_DEV; - config.dst_addr =3D to; + config.dst_addr =3D buf_info->host_addr; =20 ret =3D dmaengine_slave_config(chan, &config); if (ret) { @@ -367,14 +369,16 @@ static int pci_epf_mhi_edma_write(struct mhi_ep_cntrl= *mhi_cntrl, void *from, goto err_unlock; } =20 - src_addr =3D dma_map_single(dma_dev, from, size, DMA_TO_DEVICE); + src_addr =3D dma_map_single(dma_dev, buf_info->dev_addr, buf_info->size, + DMA_TO_DEVICE); ret =3D dma_mapping_error(dma_dev, src_addr); if (ret) { dev_err(dev, "Failed to map remote memory\n"); goto err_unlock; } =20 - desc =3D dmaengine_prep_slave_single(chan, src_addr, size, DMA_MEM_TO_DEV, + desc =3D dmaengine_prep_slave_single(chan, src_addr, buf_info->size, + DMA_MEM_TO_DEV, DMA_CTRL_ACK | DMA_PREP_INTERRUPT); if (!desc) { dev_err(dev, "Failed to prepare DMA\n"); @@ -401,7 +405,7 @@ static int pci_epf_mhi_edma_write(struct mhi_ep_cntrl *= mhi_cntrl, void *from, } =20 err_unmap: - dma_unmap_single(dma_dev, src_addr, size, DMA_TO_DEVICE); + dma_unmap_single(dma_dev, src_addr, buf_info->size, DMA_TO_DEVICE); err_unlock: mutex_unlock(&epf_mhi->lock); =20 diff --git a/include/linux/mhi_ep.h b/include/linux/mhi_ep.h index ce85d42b685d..96f3a133540d 100644 --- a/include/linux/mhi_ep.h +++ b/include/linux/mhi_ep.h @@ -49,6 +49,18 @@ struct mhi_ep_db_info { u32 status; }; =20 +/** + * struct mhi_ep_buf_info - MHI Endpoint transfer buffer info + * @dev_addr: Address of the buffer in endpoint + * @host_addr: Address of the bufffer in host + * @size: Size of the buffer + */ +struct mhi_ep_buf_info { + void *dev_addr; + u64 host_addr; + size_t size; +}; + /** * struct mhi_ep_cntrl - MHI Endpoint controller structure * @cntrl_dev: Pointer to the struct device of physical bus acting as the = MHI @@ -137,8 +149,8 @@ struct mhi_ep_cntrl { void __iomem **virt, size_t size); void (*unmap_free)(struct mhi_ep_cntrl *mhi_cntrl, u64 pci_addr, phys_add= r_t phys, void __iomem *virt, size_t size); - int (*read_from_host)(struct mhi_ep_cntrl *mhi_cntrl, u64 from, void *to,= size_t size); - int (*write_to_host)(struct mhi_ep_cntrl *mhi_cntrl, void *from, u64 to, = size_t size); + int (*read_from_host)(struct mhi_ep_cntrl *mhi_cntrl, struct mhi_ep_buf_i= nfo *buf_info); + int (*write_to_host)(struct mhi_ep_cntrl *mhi_cntrl, struct mhi_ep_buf_in= fo *buf_info); =20 enum mhi_state mhi_state; =20 --=20 2.25.1