Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b7e773b869f49bbd69e9dad76b34d3552627fac5
Commit:     b7e773b869f49bbd69e9dad76b34d3552627fac5
Parent:     c0cfe7faa12f189ef1024fce5a710791d0062355
Author:     G. Liakhovetski <[EMAIL PROTECTED]>
AuthorDate: Fri Jun 8 19:15:56 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Fri Jun 8 19:15:56 2007 -0700

    [IrDA]: f-timer reloading when sending rejected frames.
    
    Jean II was right: you have to re-charge the final timer when
    resending rejected frames. Otherwise it triggers at a wrong time and
    can break the currently running communication. Reproducible under
    rt-preempt.
    
    Signed-off-by: G. Liakhovetski <[EMAIL PROTECTED]>
    Signed-off-by: Samuel Ortiz <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/irda/irlap_event.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/net/irda/irlap_event.c b/net/irda/irlap_event.c
index 71c8055..a8b8873 100644
--- a/net/irda/irlap_event.c
+++ b/net/irda/irlap_event.c
@@ -1418,14 +1418,14 @@ static int irlap_state_nrm_p(struct irlap_cb *self, 
IRLAP_EVENT event,
                 */
                self->remote_busy = FALSE;
 
+               /* Stop final timer */
+               del_timer(&self->final_timer);
+
                /*
                 *  Nr as expected?
                 */
                ret = irlap_validate_nr_received(self, info->nr);
                if (ret == NR_EXPECTED) {
-                       /* Stop final timer */
-                       del_timer(&self->final_timer);
-
                        /* Update Nr received */
                        irlap_update_nr_received(self, info->nr);
 
@@ -1457,14 +1457,12 @@ static int irlap_state_nrm_p(struct irlap_cb *self, 
IRLAP_EVENT event,
 
                        /* Resend rejected frames */
                        irlap_resend_rejected_frames(self, CMD_FRAME);
-
-                       /* Final timer ??? Jean II */
+                       irlap_start_final_timer(self, self->final_timeout * 2);
 
                        irlap_next_state(self, LAP_NRM_P);
                } else if (ret == NR_INVALID) {
                        IRDA_DEBUG(1, "%s(), Received RR with "
                                   "invalid nr !\n", __FUNCTION__);
-                       del_timer(&self->final_timer);
 
                        irlap_next_state(self, LAP_RESET_WAIT);
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to