Re: [PATCH] spi-topcliff-pch: Fix count calculation issue

2011-12-08 Thread Tomoya MORINAGA
2011/12/8, Wolfram Sang w.s...@pengutronix.de:

 Signed-off-by: Tomoya MORINAGA tomoya.r...@gmail.com

 Which branch is this patch based on?

This patch was created for linux-3.2.
However, other patches which have dependency are not sent to upstream yet.
So, I'll send the patch series again.
Sorry, for inconvenience.

thanks,
tomoya

--
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


[PATCH] spi-topcliff-pch: Fix count calculation issue

2011-11-16 Thread Tomoya MORINAGA
Currently, count value is not correct more than len=8193 like below.

len Current-cnt New-cnt Anticipated-cnt
40951   1   1
40961   1   1
40972   2   2

81912   2   2
81922   2   2
81932(NG)   3   3

12287   3   3   3
12288   3   3   3
12289   3(NG)   4   4

This patch fixes the issue.

Signed-off-by: Tomoya MORINAGA tomoya.r...@gmail.com
---
 drivers/spi/spi-topcliff-pch.c |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c
index 9fb0541..08b5f31 100644
--- a/drivers/spi/spi-topcliff-pch.c
+++ b/drivers/spi/spi-topcliff-pch.c
@@ -1247,7 +1247,9 @@ static void pch_spi_process_messages(struct work_struct 
*pwork)
}
spin_unlock(data-lock);
 
-   cnt = data-cur_trans-len / (PCH_BUF_SIZE + 1) + 1;
+   if (!data-cur_trans-len)
+   goto out;
+   cnt = (data-cur_trans-len - 1) / PCH_BUF_SIZE + 1;
data-save_total_len = data-cur_trans-len;
if (data-use_dma) {
int i;
-- 
1.7.4.4


--
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general