diff options
author | Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> | 2023-11-27 11:18:54 +0100 |
---|---|---|
committer | Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> | 2023-12-14 07:28:53 +0100 |
commit | 5424be958b446601d6176396d9dbaad2178db610 (patch) | |
tree | a939da065abb66d927c5cd99b99447a992d58c93 /drivers | |
parent | bus: mhi: ep: Introduce async read/write callbacks (diff) | |
download | linux-5424be958b446601d6176396d9dbaad2178db610.tar.xz linux-5424be958b446601d6176396d9dbaad2178db610.zip |
PCI: epf-mhi: Simulate async read/write using iATU
Even though iATU only supports synchronous read/write, the MHI stack may
call async read/write callbacks without knowing the limitations of the
controller driver. So in order to maintain compatibility, let's simulate
async read/write operation with iATU by invoking the completion callback
after memcpy.
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Krzysztof WilczyĆski <kw@linux.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/endpoint/functions/pci-epf-mhi.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/pci/endpoint/functions/pci-epf-mhi.c b/drivers/pci/endpoint/functions/pci-epf-mhi.c index 2c5b627eb5ee..d9f45822e670 100644 --- a/drivers/pci/endpoint/functions/pci-epf-mhi.c +++ b/drivers/pci/endpoint/functions/pci-epf-mhi.c @@ -234,6 +234,9 @@ static int pci_epf_mhi_iatu_read(struct mhi_ep_cntrl *mhi_cntrl, mutex_unlock(&epf_mhi->lock); + if (buf_info->cb) + buf_info->cb(buf_info); + return 0; } @@ -262,6 +265,9 @@ static int pci_epf_mhi_iatu_write(struct mhi_ep_cntrl *mhi_cntrl, mutex_unlock(&epf_mhi->lock); + if (buf_info->cb) + buf_info->cb(buf_info); + return 0; } |