diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/char/pcmcia/synclink_cs.c | 20 | 
1 files changed, 13 insertions, 7 deletions
| diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c index 0a484b4a1b02..a6b8ddea2227 100644 --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c | |||
| @@ -891,6 +891,14 @@ static void rx_ready_async(MGSLPC_INFO *info, int tcd, struct tty_struct *tty) | |||
| 891 | int work = 0; | 891 | int work = 0; | 
| 892 | struct mgsl_icount *icount = &info->icount; | 892 | struct mgsl_icount *icount = &info->icount; | 
| 893 | 893 | ||
| 894 | if (!tty) { | ||
| 895 | /* tty is not available anymore */ | ||
| 896 | issue_command(info, CHA, CMD_RXRESET); | ||
| 897 | if (debug_level >= DEBUG_LEVEL_ISR) | ||
| 898 | printk("%s(%d):rx_ready_async(tty=NULL)\n",__FILE__,__LINE__); | ||
| 899 | return; | ||
| 900 | } | ||
| 901 | |||
| 894 | if (tcd) { | 902 | if (tcd) { | 
| 895 | /* early termination, get FIFO count from RBCL register */ | 903 | /* early termination, get FIFO count from RBCL register */ | 
| 896 | fifo_count = (unsigned char)(read_reg(info, CHA+RBCL) & 0x1f); | 904 | fifo_count = (unsigned char)(read_reg(info, CHA+RBCL) & 0x1f); | 
| @@ -980,7 +988,7 @@ static void tx_done(MGSLPC_INFO *info, struct tty_struct *tty) | |||
| 980 | else | 988 | else | 
| 981 | #endif | 989 | #endif | 
| 982 | { | 990 | { | 
| 983 | if (tty->stopped || tty->hw_stopped) { | 991 | if (tty && (tty->stopped || tty->hw_stopped)) { | 
| 984 | tx_stop(info); | 992 | tx_stop(info); | 
| 985 | return; | 993 | return; | 
| 986 | } | 994 | } | 
| @@ -1000,7 +1008,7 @@ static void tx_ready(MGSLPC_INFO *info, struct tty_struct *tty) | |||
| 1000 | if (!info->tx_active) | 1008 | if (!info->tx_active) | 
| 1001 | return; | 1009 | return; | 
| 1002 | } else { | 1010 | } else { | 
| 1003 | if (tty->stopped || tty->hw_stopped) { | 1011 | if (tty && (tty->stopped || tty->hw_stopped)) { | 
| 1004 | tx_stop(info); | 1012 | tx_stop(info); | 
| 1005 | return; | 1013 | return; | 
| 1006 | } | 1014 | } | 
| @@ -1050,13 +1058,12 @@ static void cts_change(MGSLPC_INFO *info, struct tty_struct *tty) | |||
| 1050 | wake_up_interruptible(&info->status_event_wait_q); | 1058 | wake_up_interruptible(&info->status_event_wait_q); | 
| 1051 | wake_up_interruptible(&info->event_wait_q); | 1059 | wake_up_interruptible(&info->event_wait_q); | 
| 1052 | 1060 | ||
| 1053 | if (info->port.flags & ASYNC_CTS_FLOW) { | 1061 | if (tty && (info->port.flags & ASYNC_CTS_FLOW)) { | 
| 1054 | if (tty->hw_stopped) { | 1062 | if (tty->hw_stopped) { | 
| 1055 | if (info->serial_signals & SerialSignal_CTS) { | 1063 | if (info->serial_signals & SerialSignal_CTS) { | 
| 1056 | if (debug_level >= DEBUG_LEVEL_ISR) | 1064 | if (debug_level >= DEBUG_LEVEL_ISR) | 
| 1057 | printk("CTS tx start..."); | 1065 | printk("CTS tx start..."); | 
| 1058 | if (tty) | 1066 | tty->hw_stopped = 0; | 
| 1059 | tty->hw_stopped = 0; | ||
| 1060 | tx_start(info, tty); | 1067 | tx_start(info, tty); | 
| 1061 | info->pending_bh |= BH_TRANSMIT; | 1068 | info->pending_bh |= BH_TRANSMIT; | 
| 1062 | return; | 1069 | return; | 
| @@ -1065,8 +1072,7 @@ static void cts_change(MGSLPC_INFO *info, struct tty_struct *tty) | |||
| 1065 | if (!(info->serial_signals & SerialSignal_CTS)) { | 1072 | if (!(info->serial_signals & SerialSignal_CTS)) { | 
| 1066 | if (debug_level >= DEBUG_LEVEL_ISR) | 1073 | if (debug_level >= DEBUG_LEVEL_ISR) | 
| 1067 | printk("CTS tx stop..."); | 1074 | printk("CTS tx stop..."); | 
| 1068 | if (tty) | 1075 | tty->hw_stopped = 1; | 
| 1069 | tty->hw_stopped = 1; | ||
| 1070 | tx_stop(info); | 1076 | tx_stop(info); | 
| 1071 | } | 1077 | } | 
| 1072 | } | 1078 | } | 
