summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/ifx6x60.h
diff options
context:
space:
mode:
authorchao bi <chao.bi@intel.com>2012-10-31 12:54:07 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-01 19:50:01 +0400
commit31fe99048859b13a87f476016e7bb5c2b5220c36 (patch)
tree425b1ce34168d16470530f21b87f92b1ec077093 /drivers/tty/serial/ifx6x60.h
parent2ac4ad2a1468123f6bb439a547880a9c0d302e0a (diff)
downloadlinux-31fe99048859b13a87f476016e7bb5c2b5220c36.tar.xz
serial:ifx6x60:Prevent data transfer when IFX6x60 port is shutdown
This patch is to implement following 2 places to avoid potential error when IFX6x60 port shutdown: 1) Clear Flag IFX_SPI_STATE_IO_AVAILABLE to disable data transfer when Modem port is shutdown; 2) Clear Flag IFX_SPI_STATE_IO_IN_PROGRESS and IFX_SPI_STATE_IO_READY when reopen port. This is because last port shutdown may happen when SPI/DMA transfer is in progress, if the last data transfer is not completed(for example due to modem reset), the Flag IFX_SPI_STATE_IO_IN_PROGRESS will be set forever, so when IFX port is activated again, IFX_SPI_STATE_IO_IN_PROGRESS will prevent transferring data forever. And if don't clear IFX_SPI_STATE_IO_READY, it may cause one more SPI frame transferring in spit there is not data need to be transfer. cc: liu chuansheng <chuansheng.liu@intel.com> cc: Chen Jun <jun.d.chen@intel.com> Signed-off-by: channing <chao.bi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/ifx6x60.h')
-rw-r--r--drivers/tty/serial/ifx6x60.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/tty/serial/ifx6x60.h b/drivers/tty/serial/ifx6x60.h
index d8869f5a4632..4fbddc297839 100644
--- a/drivers/tty/serial/ifx6x60.h
+++ b/drivers/tty/serial/ifx6x60.h
@@ -41,6 +41,7 @@
#define IFX_SPI_STATE_IO_IN_PROGRESS 1
#define IFX_SPI_STATE_IO_READY 2
#define IFX_SPI_STATE_TIMER_PENDING 3
+#define IFX_SPI_STATE_IO_AVAILABLE 4
/* flow control bitfields */
#define IFX_SPI_DCD 0