linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c: qcom-geni: Fix return value for master_xfer
@ 2022-02-09 21:03 jorcrous
  2022-02-18  9:44 ` Wolfram Sang
  0 siblings, 1 reply; 3+ messages in thread
From: jorcrous @ 2022-02-09 21:03 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: Jordan Crouse, Akash Asthana, Andy Gross, Bjorn Andersson,
	Mukesh Savaliya, Vinod Koul, linux-i2c, linux-kernel

From: Jordan Crouse <jorcrous@amazon.com>

The master_xfer function is supposed to return the number of messages that
were processed. Both  geni_i2c_gpi_xfer and geni_i2c_fifo_xfer are
returning 0 which is being interpeted as a error in the upper layers.

Fixes: 8133682618cb ("i2c: qcom-geni: Add support for GPI DMA")
Signed-off-by: Jordan Crouse <jorcrous@amazon.com>
---

 drivers/i2c/busses/i2c-qcom-geni.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c
index c5345f3421a8..e008161e1a67 100644
--- a/drivers/i2c/busses/i2c-qcom-geni.c
+++ b/drivers/i2c/busses/i2c-qcom-geni.c
@@ -619,7 +619,7 @@ static int geni_i2c_gpi_xfer(struct geni_i2c_dev *gi2c, struct i2c_msg msgs[], i
 		geni_i2c_gpi_unmap(gi2c, &msgs[i], tx_buf, tx_addr, rx_buf, rx_addr);
 	}
 
-	return 0;
+	return num;
 
 err:
 	dmaengine_terminate_sync(gi2c->rx_c);
@@ -645,10 +645,10 @@ static int geni_i2c_fifo_xfer(struct geni_i2c_dev *gi2c,
 			ret = geni_i2c_tx_one_msg(gi2c, &msgs[i], m_param);
 
 		if (ret)
-			break;
+			return ret;
 	}
 
-	return ret;
+	return num;
 }
 
 static int geni_i2c_xfer(struct i2c_adapter *adap,
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] i2c: qcom-geni: Fix return value for master_xfer
  2022-02-09 21:03 [PATCH] i2c: qcom-geni: Fix return value for master_xfer jorcrous
@ 2022-02-18  9:44 ` Wolfram Sang
  2022-02-18 11:05   ` Vinod Koul
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfram Sang @ 2022-02-18  9:44 UTC (permalink / raw)
  To: jorcrous
  Cc: linux-arm-msm, Akash Asthana, Andy Gross, Bjorn Andersson,
	Mukesh Savaliya, Vinod Koul, linux-i2c, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 594 bytes --]

On Wed, Feb 09, 2022 at 09:03:56PM +0000, jorcrous@amazon.com wrote:
> From: Jordan Crouse <jorcrous@amazon.com>
> 
> The master_xfer function is supposed to return the number of messages that
> were processed. Both  geni_i2c_gpi_xfer and geni_i2c_fifo_xfer are
> returning 0 which is being interpeted as a error in the upper layers.
> 
> Fixes: 8133682618cb ("i2c: qcom-geni: Add support for GPI DMA")
> Signed-off-by: Jordan Crouse <jorcrous@amazon.com>

For the record, this patch is not upstream yet and needs to be folded
into the next version of the GPI DMA patch by Vinod.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] i2c: qcom-geni: Fix return value for master_xfer
  2022-02-18  9:44 ` Wolfram Sang
@ 2022-02-18 11:05   ` Vinod Koul
  0 siblings, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2022-02-18 11:05 UTC (permalink / raw)
  To: Wolfram Sang, jorcrous, linux-arm-msm, Akash Asthana, Andy Gross,
	Bjorn Andersson, Mukesh Savaliya, linux-i2c, linux-kernel

On 18-02-22, 10:44, Wolfram Sang wrote:
> On Wed, Feb 09, 2022 at 09:03:56PM +0000, jorcrous@amazon.com wrote:
> > From: Jordan Crouse <jorcrous@amazon.com>
> > 
> > The master_xfer function is supposed to return the number of messages that
> > were processed. Both  geni_i2c_gpi_xfer and geni_i2c_fifo_xfer are
> > returning 0 which is being interpeted as a error in the upper layers.
> > 
> > Fixes: 8133682618cb ("i2c: qcom-geni: Add support for GPI DMA")
> > Signed-off-by: Jordan Crouse <jorcrous@amazon.com>
> 
> For the record, this patch is not upstream yet and needs to be folded
> into the next version of the GPI DMA patch by Vinod.

I have folder this into into my patch and will be posting updated one
(this was also in Dmitry's review)

Thanks
-- 
~Vinod

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-18 11:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-09 21:03 [PATCH] i2c: qcom-geni: Fix return value for master_xfer jorcrous
2022-02-18  9:44 ` Wolfram Sang
2022-02-18 11:05   ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).