diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/serial/jsm/jsm_neo.c | 14 | ||||
-rw-r--r-- | drivers/serial/jsm/jsm_tty.c | 19 |
2 files changed, 12 insertions, 21 deletions
diff --git a/drivers/serial/jsm/jsm_neo.c b/drivers/serial/jsm/jsm_neo.c index e6390d023634..9dadaa11d266 100644 --- a/drivers/serial/jsm/jsm_neo.c +++ b/drivers/serial/jsm/jsm_neo.c | |||
@@ -533,7 +533,6 @@ static void neo_copy_data_from_queue_to_uart(struct jsm_channel *ch) | |||
533 | if (!(ch->ch_flags & (CH_TX_FIFO_EMPTY | CH_TX_FIFO_LWM))) | 533 | if (!(ch->ch_flags & (CH_TX_FIFO_EMPTY | CH_TX_FIFO_LWM))) |
534 | return; | 534 | return; |
535 | 535 | ||
536 | len_written = 0; | ||
537 | n = UART_17158_TX_FIFOSIZE - ch->ch_t_tlevel; | 536 | n = UART_17158_TX_FIFOSIZE - ch->ch_t_tlevel; |
538 | 537 | ||
539 | /* cache head and tail of queue */ | 538 | /* cache head and tail of queue */ |
@@ -619,14 +618,10 @@ static void neo_parse_modem(struct jsm_channel *ch, u8 signals) | |||
619 | /* Make the UART raise any of the output signals we want up */ | 618 | /* Make the UART raise any of the output signals we want up */ |
620 | static void neo_assert_modem_signals(struct jsm_channel *ch) | 619 | static void neo_assert_modem_signals(struct jsm_channel *ch) |
621 | { | 620 | { |
622 | u8 out; | ||
623 | |||
624 | if (!ch) | 621 | if (!ch) |
625 | return; | 622 | return; |
626 | 623 | ||
627 | out = ch->ch_mostat; | 624 | writeb(ch->ch_mostat, &ch->ch_neo_uart->mcr); |
628 | |||
629 | writeb(out, &ch->ch_neo_uart->mcr); | ||
630 | 625 | ||
631 | /* flush write operation */ | 626 | /* flush write operation */ |
632 | neo_pci_posting_flush(ch->ch_bd); | 627 | neo_pci_posting_flush(ch->ch_bd); |
@@ -936,10 +931,9 @@ static inline void neo_parse_lsr(struct jsm_board *brd, u32 port) | |||
936 | static void neo_param(struct jsm_channel *ch) | 931 | static void neo_param(struct jsm_channel *ch) |
937 | { | 932 | { |
938 | u8 lcr = 0; | 933 | u8 lcr = 0; |
939 | u8 uart_lcr = 0; | 934 | u8 uart_lcr, ier; |
940 | u8 ier = 0; | 935 | u32 baud; |
941 | u32 baud = 9600; | 936 | int quot; |
942 | int quot = 0; | ||
943 | struct jsm_board *bd; | 937 | struct jsm_board *bd; |
944 | 938 | ||
945 | bd = ch->ch_bd; | 939 | bd = ch->ch_bd; |
diff --git a/drivers/serial/jsm/jsm_tty.c b/drivers/serial/jsm/jsm_tty.c index 330696309f76..31496dc0a0d1 100644 --- a/drivers/serial/jsm/jsm_tty.c +++ b/drivers/serial/jsm/jsm_tty.c | |||
@@ -183,7 +183,6 @@ static void jsm_tty_break(struct uart_port *port, int break_state) | |||
183 | static int jsm_tty_open(struct uart_port *port) | 183 | static int jsm_tty_open(struct uart_port *port) |
184 | { | 184 | { |
185 | struct jsm_board *brd; | 185 | struct jsm_board *brd; |
186 | int rc = 0; | ||
187 | struct jsm_channel *channel = (struct jsm_channel *)port; | 186 | struct jsm_channel *channel = (struct jsm_channel *)port; |
188 | struct ktermios *termios; | 187 | struct ktermios *termios; |
189 | 188 | ||
@@ -265,7 +264,7 @@ static int jsm_tty_open(struct uart_port *port) | |||
265 | channel->ch_open_count++; | 264 | channel->ch_open_count++; |
266 | 265 | ||
267 | jsm_printk(OPEN, INFO, &channel->ch_bd->pci_dev, "finish\n"); | 266 | jsm_printk(OPEN, INFO, &channel->ch_bd->pci_dev, "finish\n"); |
268 | return rc; | 267 | return 0; |
269 | } | 268 | } |
270 | 269 | ||
271 | static void jsm_tty_close(struct uart_port *port) | 270 | static void jsm_tty_close(struct uart_port *port) |
@@ -748,7 +747,7 @@ static void jsm_carrier(struct jsm_channel *ch) | |||
748 | void jsm_check_queue_flow_control(struct jsm_channel *ch) | 747 | void jsm_check_queue_flow_control(struct jsm_channel *ch) |
749 | { | 748 | { |
750 | struct board_ops *bd_ops = ch->ch_bd->bd_ops; | 749 | struct board_ops *bd_ops = ch->ch_bd->bd_ops; |
751 | int qleft = 0; | 750 | int qleft; |
752 | 751 | ||
753 | /* Store how much space we have left in the queue */ | 752 | /* Store how much space we have left in the queue */ |
754 | if ((qleft = ch->ch_r_tail - ch->ch_r_head - 1) < 0) | 753 | if ((qleft = ch->ch_r_tail - ch->ch_r_head - 1) < 0) |
@@ -834,7 +833,7 @@ void jsm_check_queue_flow_control(struct jsm_channel *ch) | |||
834 | */ | 833 | */ |
835 | int jsm_tty_write(struct uart_port *port) | 834 | int jsm_tty_write(struct uart_port *port) |
836 | { | 835 | { |
837 | int bufcount = 0, n = 0; | 836 | int bufcount; |
838 | int data_count = 0,data_count1 =0; | 837 | int data_count = 0,data_count1 =0; |
839 | u16 head; | 838 | u16 head; |
840 | u16 tail; | 839 | u16 tail; |
@@ -850,14 +849,12 @@ int jsm_tty_write(struct uart_port *port) | |||
850 | if ((bufcount = tail - head - 1) < 0) | 849 | if ((bufcount = tail - head - 1) < 0) |
851 | bufcount += WQUEUESIZE; | 850 | bufcount += WQUEUESIZE; |
852 | 851 | ||
853 | n = bufcount; | 852 | bufcount = min(bufcount, 56); |
854 | |||
855 | n = min(n, 56); | ||
856 | remain = WQUEUESIZE - head; | 853 | remain = WQUEUESIZE - head; |
857 | 854 | ||
858 | data_count = 0; | 855 | data_count = 0; |
859 | if (n >= remain) { | 856 | if (bufcount >= remain) { |
860 | n -= remain; | 857 | bufcount -= remain; |
861 | while ((port->info->xmit.head != temp_tail) && | 858 | while ((port->info->xmit.head != temp_tail) && |
862 | (data_count < remain)) { | 859 | (data_count < remain)) { |
863 | channel->ch_wqueue[head++] = | 860 | channel->ch_wqueue[head++] = |
@@ -871,8 +868,8 @@ int jsm_tty_write(struct uart_port *port) | |||
871 | } | 868 | } |
872 | 869 | ||
873 | data_count1 = 0; | 870 | data_count1 = 0; |
874 | if (n > 0) { | 871 | if (bufcount > 0) { |
875 | remain = n; | 872 | remain = bufcount; |
876 | while ((port->info->xmit.head != temp_tail) && | 873 | while ((port->info->xmit.head != temp_tail) && |
877 | (data_count1 < remain)) { | 874 | (data_count1 < remain)) { |
878 | channel->ch_wqueue[head++] = | 875 | channel->ch_wqueue[head++] = |