Title: [4159] branches/2007R1: Fix bug[#3585] Poll RTS/CTS in DMA mode as well.
- Revision
- 4159
- Author
- sonicz
- Date
- 2008-01-29 02:13:19 -0600 (Tue, 29 Jan 2008)
Log Message
Fix bug[#3585] Poll RTS/CTS in DMA mode as well.
Diffstat
drivers/serial/bfin_5xx.c | 17 ++++++-----------
include/asm-blackfin/mach-bf533/bfin_serial_5xx.h | 2 +-
include/asm-blackfin/mach-bf537/bfin_serial_5xx.h | 3 +--
include/asm-blackfin/mach-bf561/bfin_serial_5xx.h | 2 +-
4 files changed, 9 insertions(+), 15 deletions(-)
Modified Paths
Diff
Modified: branches/2007R1/drivers/serial/bfin_5xx.c (4158 => 4159)
--- branches/2007R1/drivers/serial/bfin_5xx.c 2008-01-29 08:05:53 UTC (rev 4158)
+++ branches/2007R1/drivers/serial/bfin_5xx.c 2008-01-29 08:13:19 UTC (rev 4159)
@@ -74,7 +74,6 @@
#ifdef CONFIG_SERIAL_BFIN_DMA
static void bfin_serial_dma_tx_chars(struct bfin_serial_port *uart);
#else
-static void bfin_serial_do_work(void *);
static void bfin_serial_tx_chars(struct bfin_serial_port *uart);
#endif
@@ -371,7 +370,9 @@
spin_unlock(&uart->port.lock);
return IRQ_HANDLED;
}
+#endif
+#ifdef CONFIG_SERIAL_BFIN_CTSRTS
static void bfin_serial_do_work(void *port)
{
struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
@@ -598,22 +599,17 @@
{
#ifdef CONFIG_SERIAL_BFIN_CTSRTS
unsigned int status;
-# ifdef CONFIG_SERIAL_BFIN_DMA
struct uart_info *info = uart->port.info;
struct tty_struct *tty = info->tty;
status = bfin_serial_get_mctrl(&uart->port);
+ uart_handle_cts_change(&uart->port, status & TIOCM_CTS);
if (!(status & TIOCM_CTS)) {
tty->hw_stopped = 1;
+ schedule_work(&uart->cts_workqueue);
} else {
tty->hw_stopped = 0;
}
-# else
- status = bfin_serial_get_mctrl(&uart->port);
- uart_handle_cts_change(&uart->port, status & TIOCM_CTS);
- if (!(status & TIOCM_CTS))
- schedule_work(&uart->cts_workqueue);
-# endif
#endif
}
@@ -904,11 +900,10 @@
bfin_serial_ports[i].rx_dma_channel =
bfin_serial_resource[i].uart_rx_dma_channel;
init_timer(&(bfin_serial_ports[i].rx_dma_timer));
-#else
- INIT_WORK(&bfin_serial_ports[i].cts_workqueue,
- bfin_serial_do_work, &bfin_serial_ports[i]);
#endif
#ifdef CONFIG_SERIAL_BFIN_CTSRTS
+ INIT_WORK(&bfin_serial_ports[i].cts_workqueue,
+ bfin_serial_do_work, &bfin_serial_ports[i]);
bfin_serial_ports[i].cts_pin =
bfin_serial_resource[i].uart_cts_pin;
bfin_serial_ports[i].rts_pin =
Modified: branches/2007R1/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h (4158 => 4159)
--- branches/2007R1/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h 2008-01-29 08:05:53 UTC (rev 4158)
+++ branches/2007R1/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h 2008-01-29 08:13:19 UTC (rev 4159)
@@ -56,12 +56,12 @@
unsigned int rx_dma_channel;
struct work_struct tx_dma_workqueue;
#else
- struct work_struct cts_workqueue;
# ifdef ANOMALY_05000230
unsigned int anomaly_threshold;
# endif
#endif
#ifdef CONFIG_SERIAL_BFIN_CTSRTS
+ struct work_struct cts_workqueue;
int cts_pin;
int rts_pin;
#endif
Modified: branches/2007R1/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h (4158 => 4159)
--- branches/2007R1/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h 2008-01-29 08:05:53 UTC (rev 4158)
+++ branches/2007R1/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h 2008-01-29 08:13:19 UTC (rev 4159)
@@ -67,10 +67,9 @@
unsigned int tx_dma_channel;
unsigned int rx_dma_channel;
struct work_struct tx_dma_workqueue;
-#else
- struct work_struct cts_workqueue;
#endif
#ifdef CONFIG_SERIAL_BFIN_CTSRTS
+ struct work_struct cts_workqueue;
int cts_pin;
int rts_pin;
#endif
Modified: branches/2007R1/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h (4158 => 4159)
--- branches/2007R1/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h 2008-01-29 08:05:53 UTC (rev 4158)
+++ branches/2007R1/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h 2008-01-29 08:13:19 UTC (rev 4159)
@@ -56,12 +56,12 @@
unsigned int rx_dma_channel;
struct work_struct tx_dma_workqueue;
#else
- struct work_struct cts_workqueue;
# ifdef ANOMALY_05000230
unsigned int anomaly_threshold;
# endif
#endif
#ifdef CONFIG_SERIAL_BFIN_CTSRTS
+ struct work_struct cts_workqueue;
int cts_pin;
int rts_pin;
#endif
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
http://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits