From: samuel-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org
To: davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org
Cc: irda-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
"G. Liakhovetski" <gl-o/hVf8ie6tKzQB+pC5nmwQ@public.gmane.org>,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH 2/2] [IrDA] f-timer reloading when sending rejected frames
Date: Sat, 09 Jun 2007 04:08:17 +0300 [thread overview]
Message-ID: <20070609011020.439675215@sortiz.org> (raw)
In-Reply-To: 20070609010815.963618030@sortiz.org
[-- Attachment #1: final-timer-recharge.patch --]
[-- Type: text/plain, Size: 1764 bytes --]
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 <gl-o/hVf8ie6tKzQB+pC5nmwQ@public.gmane.org>
Signed-off-by: Samuel Ortiz <samuel-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>
Index: net-2.6-quilt/net/irda/irlap_event.c
===================================================================
--- net-2.6-quilt.orig/net/irda/irlap_event.c 2007-05-29 09:36:09.000000000 +0300
+++ net-2.6-quilt/net/irda/irlap_event.c 2007-05-29 09:38:19.000000000 +0300
@@ -1418,14 +1418,14 @@
*/
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 @@
/* 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);
--
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
next prev parent reply other threads:[~2007-06-09 1:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-09 1:08 [PATCH 0/2] [IrDA] Updates for net-2.6 samuel
2007-06-09 1:08 ` [PATCH 1/2] [IrDA] Fix Rx/Tx path race samuel-jcdQHdrhKHMdnm+yROfE0A
2007-06-09 1:08 ` samuel-jcdQHdrhKHMdnm+yROfE0A [this message]
[not found] ` <20070609010815.963618030-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>
2007-06-09 2:17 ` [PATCH 0/2] [IrDA] Updates for net-2.6 David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070609011020.439675215@sortiz.org \
--to=samuel-jcdqhdrhkhmdnm+yrofe0a@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=gl-o/hVf8ie6tKzQB+pC5nmwQ@public.gmane.org \
--cc=irda-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).