|
@@ -529,7 +529,6 @@ void jsm_input(struct jsm_channel *ch)
|
|
int data_len;
|
|
int data_len;
|
|
unsigned long lock_flags;
|
|
unsigned long lock_flags;
|
|
int len = 0;
|
|
int len = 0;
|
|
- int n = 0;
|
|
|
|
int s = 0;
|
|
int s = 0;
|
|
int i = 0;
|
|
int i = 0;
|
|
|
|
|
|
@@ -597,16 +596,15 @@ void jsm_input(struct jsm_channel *ch)
|
|
jsm_dbg(READ, &ch->ch_bd->pci_dev, "start 2\n");
|
|
jsm_dbg(READ, &ch->ch_bd->pci_dev, "start 2\n");
|
|
|
|
|
|
len = tty_buffer_request_room(port, data_len);
|
|
len = tty_buffer_request_room(port, data_len);
|
|
- n = len;
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
- * n now contains the most amount of data we can copy,
|
|
|
|
|
|
+ * len now contains the most amount of data we can copy,
|
|
* bounded either by the flip buffer size or the amount
|
|
* bounded either by the flip buffer size or the amount
|
|
* of data the card actually has pending...
|
|
* of data the card actually has pending...
|
|
*/
|
|
*/
|
|
- while (n) {
|
|
|
|
|
|
+ while (len) {
|
|
s = ((head >= tail) ? head : RQUEUESIZE) - tail;
|
|
s = ((head >= tail) ? head : RQUEUESIZE) - tail;
|
|
- s = min(s, n);
|
|
|
|
|
|
+ s = min(s, len);
|
|
|
|
|
|
if (s <= 0)
|
|
if (s <= 0)
|
|
break;
|
|
break;
|
|
@@ -637,7 +635,7 @@ void jsm_input(struct jsm_channel *ch)
|
|
tty_insert_flip_string(port, ch->ch_rqueue + tail, s);
|
|
tty_insert_flip_string(port, ch->ch_rqueue + tail, s);
|
|
}
|
|
}
|
|
tail += s;
|
|
tail += s;
|
|
- n -= s;
|
|
|
|
|
|
+ len -= s;
|
|
/* Flip queue if needed */
|
|
/* Flip queue if needed */
|
|
tail &= rmask;
|
|
tail &= rmask;
|
|
}
|
|
}
|