summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0035-spi-topcliff-pch-add-recovery-processing-in-case-wai.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0035-spi-topcliff-pch-add-recovery-processing-in-case-wai.patch')
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0035-spi-topcliff-pch-add-recovery-processing-in-case-wai.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0035-spi-topcliff-pch-add-recovery-processing-in-case-wai.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0035-spi-topcliff-pch-add-recovery-processing-in-case-wai.patch
new file mode 100644
index 00000000..5370de52
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0035-spi-topcliff-pch-add-recovery-processing-in-case-wai.patch
@@ -0,0 +1,43 @@
1From 0c6c9c1d69fbdd6a1f54668a2c9f8f306c702728 Mon Sep 17 00:00:00 2001
2From: Tomoya MORINAGA <tomoya.rohm@gmail.com>
3Date: Fri, 9 Dec 2011 13:13:29 +0900
4Subject: [PATCH 35/56] spi-topcliff-pch: add recovery processing in case
5 wait-event timeout
6
7commit 0f57e168aa109775430c76cc663fb64909813d84 upstream.
8
9Currently, pch_spi_start_transfer failure is not anticipated.
10This patch adds the processing.
11
12Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
13Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
14Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
15---
16 drivers/spi/spi-topcliff-pch.c | 10 +++++++++-
17 1 files changed, 9 insertions(+), 1 deletions(-)
18
19diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c
20index 0c4efed..1590dbd 100644
21--- a/drivers/spi/spi-topcliff-pch.c
22+++ b/drivers/spi/spi-topcliff-pch.c
23@@ -1266,8 +1266,16 @@ static void pch_spi_process_messages(struct work_struct *pwork)
24 char *save_rx_buf = data->cur_trans->rx_buf;
25 for (i = 0; i < cnt; i ++) {
26 pch_spi_handle_dma(data, &bpw);
27- if (!pch_spi_start_transfer(data))
28+ if (!pch_spi_start_transfer(data)) {
29+ data->transfer_complete = true;
30+ data->current_msg->status = -EIO;
31+ data->current_msg->complete
32+ (data->current_msg->context);
33+ data->bcurrent_msg_processing = false;
34+ data->current_msg = NULL;
35+ data->cur_trans = NULL;
36 goto out;
37+ }
38 pch_spi_copy_rx_data_for_dma(data, bpw);
39 }
40 data->cur_trans->rx_buf = save_rx_buf;
41--
421.7.7.6
43