From: Jean Tourrilhes <jt@bougret.hpl.hp.com>
To: "David S. Miller" <davem@redhat.com>,
Linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: [PATCH 2.6 IrDA] IrLAP disconnection pending race
Date: Mon, 9 Feb 2004 17:10:15 -0800 [thread overview]
Message-ID: <20040210011015.GC673@bougret.hpl.hp.com> (raw)
ir260_irlap_discon_pend_race.diff :
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
o [FEATURE] Don't drop IrLAP connection is we *just* received an
incomming IrLMP connection request.
diff -u -p linux/include/net/irda/irlap.d4.h linux/include/net/irda/irlap.h
--- linux/include/net/irda/irlap.d4.h Wed Jan 7 16:27:07 2004
+++ linux/include/net/irda/irlap.h Wed Jan 7 16:29:31 2004
@@ -283,4 +283,10 @@ static inline int irlap_is_primary(struc
return(ret);
}
+/* Clear a pending IrLAP disconnect. - Jean II */
+static inline void irlap_clear_disconnect(struct irlap_cb *self)
+{
+ self->disconnect_pending = FALSE;
+}
+
#endif
diff -u -p linux/net/irda/irlmp_event.d4.c linux/net/irda/irlmp_event.c
--- linux/net/irda/irlmp_event.d4.c Wed Jan 7 16:25:13 2004
+++ linux/net/irda/irlmp_event.c Wed Jan 7 16:32:08 2004
@@ -391,6 +391,14 @@ static void irlmp_state_active(struct la
IRDA_DEBUG(4, "%s(), LS_CONNECT_REQUEST\n", __FUNCTION__);
/*
+ * IrLAP may have a pending disconnect. We tried to close
+ * IrLAP, but it was postponed because the link was
+ * busy or we were still sending packets. As we now
+ * need it, make sure it stays on. Jean II
+ */
+ irlap_clear_disconnect(self->irlap);
+
+ /*
* LAP connection already active, just bounce back! Since we
* don't know which LSAP that tried to do this, we have to
* notify all LSAPs using this LAP, but that should be safe to
reply other threads:[~2004-02-10 1:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20040210011015.GC673@bougret.hpl.hp.com \
--to=jt@bougret.hpl.hp.com \
--cc=davem@redhat.com \
--cc=jt@hpl.hp.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®