diff options
Diffstat (limited to 'drivers/char/synclinkmp.c')
-rw-r--r-- | drivers/char/synclinkmp.c | 34 |
1 files changed, 10 insertions, 24 deletions
diff --git a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c index a9467e7d3747..960adb256fbb 100644 --- a/drivers/char/synclinkmp.c +++ b/drivers/char/synclinkmp.c | |||
@@ -2196,7 +2196,7 @@ void isr_rxint(SLMP_INFO * info) | |||
2196 | if ( tty ) { | 2196 | if ( tty ) { |
2197 | if (!(status & info->ignore_status_mask1)) { | 2197 | if (!(status & info->ignore_status_mask1)) { |
2198 | if (info->read_status_mask1 & BRKD) { | 2198 | if (info->read_status_mask1 & BRKD) { |
2199 | *tty->flip.flag_buf_ptr = TTY_BREAK; | 2199 | tty_insert_flip_char(tty, 0, TTY_BREAK); |
2200 | if (info->flags & ASYNC_SAK) | 2200 | if (info->flags & ASYNC_SAK) |
2201 | do_SAK(tty); | 2201 | do_SAK(tty); |
2202 | } | 2202 | } |
@@ -2240,16 +2240,10 @@ void isr_rxrdy(SLMP_INFO * info) | |||
2240 | 2240 | ||
2241 | while((status = read_reg(info,CST0)) & BIT0) | 2241 | while((status = read_reg(info,CST0)) & BIT0) |
2242 | { | 2242 | { |
2243 | int flag = 0; | ||
2244 | int over = 0; | ||
2243 | DataByte = read_reg(info,TRB); | 2245 | DataByte = read_reg(info,TRB); |
2244 | 2246 | ||
2245 | if ( tty ) { | ||
2246 | if (tty->flip.count >= TTY_FLIPBUF_SIZE) | ||
2247 | continue; | ||
2248 | |||
2249 | *tty->flip.char_buf_ptr = DataByte; | ||
2250 | *tty->flip.flag_buf_ptr = 0; | ||
2251 | } | ||
2252 | |||
2253 | icount->rx++; | 2247 | icount->rx++; |
2254 | 2248 | ||
2255 | if ( status & (PE + FRME + OVRN) ) { | 2249 | if ( status & (PE + FRME + OVRN) ) { |
@@ -2272,42 +2266,34 @@ void isr_rxrdy(SLMP_INFO * info) | |||
2272 | 2266 | ||
2273 | if ( tty ) { | 2267 | if ( tty ) { |
2274 | if (status & PE) | 2268 | if (status & PE) |
2275 | *tty->flip.flag_buf_ptr = TTY_PARITY; | 2269 | flag = TTY_PARITY; |
2276 | else if (status & FRME) | 2270 | else if (status & FRME) |
2277 | *tty->flip.flag_buf_ptr = TTY_FRAME; | 2271 | flag = TTY_FRAME; |
2278 | if (status & OVRN) { | 2272 | if (status & OVRN) { |
2279 | /* Overrun is special, since it's | 2273 | /* Overrun is special, since it's |
2280 | * reported immediately, and doesn't | 2274 | * reported immediately, and doesn't |
2281 | * affect the current character | 2275 | * affect the current character |
2282 | */ | 2276 | */ |
2283 | if (tty->flip.count < TTY_FLIPBUF_SIZE) { | 2277 | over = 1; |
2284 | tty->flip.count++; | ||
2285 | tty->flip.flag_buf_ptr++; | ||
2286 | tty->flip.char_buf_ptr++; | ||
2287 | *tty->flip.flag_buf_ptr = TTY_OVERRUN; | ||
2288 | } | ||
2289 | } | 2278 | } |
2290 | } | 2279 | } |
2291 | } /* end of if (error) */ | 2280 | } /* end of if (error) */ |
2292 | 2281 | ||
2293 | if ( tty ) { | 2282 | if ( tty ) { |
2294 | tty->flip.flag_buf_ptr++; | 2283 | tty_insert_flip_char(tty, DataByte, flag); |
2295 | tty->flip.char_buf_ptr++; | 2284 | if (over) |
2296 | tty->flip.count++; | 2285 | tty_insert_flip_char(tty, 0, TTY_OVERRUN); |
2297 | } | 2286 | } |
2298 | } | 2287 | } |
2299 | 2288 | ||
2300 | if ( debug_level >= DEBUG_LEVEL_ISR ) { | 2289 | if ( debug_level >= DEBUG_LEVEL_ISR ) { |
2301 | printk("%s(%d):%s isr_rxrdy() flip count=%d\n", | ||
2302 | __FILE__,__LINE__,info->device_name, | ||
2303 | tty ? tty->flip.count : 0); | ||
2304 | printk("%s(%d):%s rx=%d brk=%d parity=%d frame=%d overrun=%d\n", | 2290 | printk("%s(%d):%s rx=%d brk=%d parity=%d frame=%d overrun=%d\n", |
2305 | __FILE__,__LINE__,info->device_name, | 2291 | __FILE__,__LINE__,info->device_name, |
2306 | icount->rx,icount->brk,icount->parity, | 2292 | icount->rx,icount->brk,icount->parity, |
2307 | icount->frame,icount->overrun); | 2293 | icount->frame,icount->overrun); |
2308 | } | 2294 | } |
2309 | 2295 | ||
2310 | if ( tty && tty->flip.count ) | 2296 | if ( tty ) |
2311 | tty_flip_buffer_push(tty); | 2297 | tty_flip_buffer_push(tty); |
2312 | } | 2298 | } |
2313 | 2299 | ||