diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1998-05-07 02:55:41 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1998-05-07 02:55:41 +0000 |
commit | dcec8a13bf565e47942a1751a9cec21bec5648fe (patch) | |
tree | 548b69625b18cc2e88c3e68d0923be546c9ebb03 /net/x25/x25_in.c | |
parent | 2e0f55e79c49509b7ff70ff1a10e1e9e90a3dfd4 (diff) |
o Merge with Linux 2.1.99.
o Fix ancient bug in the ELF loader making ldd crash.
o Fix ancient bug in the keyboard code for SGI, SNI and Jazz.
Diffstat (limited to 'net/x25/x25_in.c')
-rw-r--r-- | net/x25/x25_in.c | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/net/x25/x25_in.c b/net/x25/x25_in.c index b9a66103c..ae98e95ec 100644 --- a/net/x25/x25_in.c +++ b/net/x25/x25_in.c @@ -184,11 +184,6 @@ static int x25_state3_machine(struct sock *sk, struct sk_buff *skb, int frametyp case X25_RR: case X25_RNR: - if (frametype == X25_RNR) { - sk->protinfo.x25->condition |= X25_COND_PEER_RX_BUSY; - } else { - sk->protinfo.x25->condition &= ~X25_COND_PEER_RX_BUSY; - } if (!x25_validate_nr(sk, nr)) { x25_clear_queues(sk); x25_write_internal(sk, X25_RESET_REQUEST); @@ -201,8 +196,11 @@ static int x25_state3_machine(struct sock *sk, struct sk_buff *skb, int frametyp sk->protinfo.x25->state = X25_STATE_4; } else { x25_frames_acked(sk, nr); - if (frametype == X25_RNR) - x25_requeue_frames(sk); + if (frametype == X25_RNR) { + sk->protinfo.x25->condition |= X25_COND_PEER_RX_BUSY; + } else { + sk->protinfo.x25->condition &= ~X25_COND_PEER_RX_BUSY; + } } break; @@ -221,15 +219,25 @@ static int x25_state3_machine(struct sock *sk, struct sk_buff *skb, int frametyp break; } x25_frames_acked(sk, nr); - if (sk->protinfo.x25->condition & X25_COND_OWN_RX_BUSY) - break; if (ns == sk->protinfo.x25->vr) { if (x25_queue_rx_frame(sk, skb, m) == 0) { sk->protinfo.x25->vr = (sk->protinfo.x25->vr + 1) % modulus; queued = 1; } else { - sk->protinfo.x25->condition |= X25_COND_OWN_RX_BUSY; + /* Should never happen */ + x25_clear_queues(sk); + x25_write_internal(sk, X25_RESET_REQUEST); + x25_start_t22timer(sk); + sk->protinfo.x25->condition = 0x00; + sk->protinfo.x25->vs = 0; + sk->protinfo.x25->vr = 0; + sk->protinfo.x25->va = 0; + sk->protinfo.x25->vl = 0; + sk->protinfo.x25->state = X25_STATE_4; + break; } + if (atomic_read(&sk->rmem_alloc) > (sk->rcvbuf / 2)) + sk->protinfo.x25->condition |= X25_COND_OWN_RX_BUSY; } /* * If the window is full Ack it immediately, else |