netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] gigaset: accept connection establishment messages in any order
  2009-07-01 21:20 [PATCH 0/2] Gigaset driver patches for 2.6.31-rc1 Tilman Schmidt
  2009-07-01 21:20 ` [PATCH 2/2] gigaset: drop pointless check Tilman Schmidt
@ 2009-07-01 21:20 ` Tilman Schmidt
  2009-07-02 20:17 ` [PATCH 0/2] Gigaset driver patches for 2.6.31-rc1 David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Tilman Schmidt @ 2009-07-01 21:20 UTC (permalink / raw)
  To: davem, linux-kernel, netdev; +Cc: Hansjoerg Lipp

ISDN connection setup failed if the "connection active" and
"B channel up" messages from the device arrived in a different
order than expected. Modify the state machine to accept them in
any order.

Impact: bugfix
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
CC: stable <stable@kernel.org>
---
 drivers/isdn/gigaset/ev-layer.c |   44 +++++++++++++++++---------------------
 1 files changed, 20 insertions(+), 24 deletions(-)

diff --git a/drivers/isdn/gigaset/ev-layer.c b/drivers/isdn/gigaset/ev-layer.c
index ec51696..2d91049 100644
--- a/drivers/isdn/gigaset/ev-layer.c
+++ b/drivers/isdn/gigaset/ev-layer.c
@@ -294,32 +294,33 @@ struct reply_t gigaset_tab_cid[] =
 	{RSP_OK,      604,604, -1,                605, 5, {ACT_CMD+AT_MSN}},
 	{RSP_OK,      605,605, -1,                606, 5, {ACT_CMD+AT_ISO}},
 	{RSP_NULL,    605,605, -1,                606, 5, {ACT_CMD+AT_ISO}},
-	{RSP_OK,      606,606, -1,                607, 5, {0},             "+VLS=17\r"}, /* set "Endgeraetemodus" */
+	{RSP_OK,      606,606, -1,                607, 5, {0}, "+VLS=17\r"},
 	{RSP_OK,      607,607, -1,                608,-1},
-	//{RSP_ZSAU,    608,608,ZSAU_PROCEEDING,    608, 0, {ACT_ERROR}},//DELETE
 	{RSP_ZSAU,    608,608,ZSAU_PROCEEDING,    609, 5, {ACT_CMD+AT_DIAL}},
 	{RSP_OK,      609,609, -1,                650, 0, {ACT_DIALING}},
 
-	{RSP_ZVLS,    608,608, 17,                 -1,-1, {ACT_DEBUG}},
-	{RSP_ZCTP,    609,609, -1,                 -1,-1, {ACT_DEBUG}},
-	{RSP_ZCPN,    609,609, -1,                 -1,-1, {ACT_DEBUG}},
 	{RSP_ERROR,   601,609, -1,                  0, 0, {ACT_ABORTDIAL}},
 	{EV_TIMEOUT,  601,609, -1,                  0, 0, {ACT_ABORTDIAL}},
 
-	/* dialing */
-	{RSP_ZCTP,    650,650, -1,                 -1,-1, {ACT_DEBUG}},
-	{RSP_ZCPN,    650,650, -1,                 -1,-1, {ACT_DEBUG}},
-	{RSP_ZSAU,    650,650,ZSAU_CALL_DELIVERED, -1,-1, {ACT_DEBUG}}, /* some devices don't send this */
-
-	/* connection established  */
-	{RSP_ZSAU,    650,650,ZSAU_ACTIVE,        800,-1, {ACT_CONNECT}}, //FIXME -> DLE1
-	{RSP_ZSAU,    750,750,ZSAU_ACTIVE,        800,-1, {ACT_CONNECT}}, //FIXME -> DLE1
-
-	{EV_BC_OPEN,  800,800, -1,                800,-1, {ACT_NOTIFY_BC_UP}}, //FIXME new constate + timeout
+	/* optional dialing responses */
+	{EV_BC_OPEN,  650,650, -1,                651,-1},
+	{RSP_ZVLS,    608,651, 17,                 -1,-1, {ACT_DEBUG}},
+	{RSP_ZCTP,    609,651, -1,                 -1,-1, {ACT_DEBUG}},
+	{RSP_ZCPN,    609,651, -1,                 -1,-1, {ACT_DEBUG}},
+	{RSP_ZSAU,    650,651,ZSAU_CALL_DELIVERED, -1,-1, {ACT_DEBUG}},
+
+	/* connect */
+	{RSP_ZSAU,    650,650,ZSAU_ACTIVE,        800,-1, {ACT_CONNECT}},
+	{RSP_ZSAU,    651,651,ZSAU_ACTIVE,        800,-1, {ACT_CONNECT,
+							   ACT_NOTIFY_BC_UP}},
+	{RSP_ZSAU,    750,750,ZSAU_ACTIVE,        800,-1, {ACT_CONNECT}},
+	{RSP_ZSAU,    751,751,ZSAU_ACTIVE,        800,-1, {ACT_CONNECT,
+							   ACT_NOTIFY_BC_UP}},
+	{EV_BC_OPEN,  800,800, -1,                800,-1, {ACT_NOTIFY_BC_UP}},
 
 	/* remote hangup */
-	{RSP_ZSAU,    650,650,ZSAU_DISCONNECT_IND,  0, 0, {ACT_REMOTEREJECT}},
-	{RSP_ZSAU,    750,750,ZSAU_DISCONNECT_IND,  0, 0, {ACT_REMOTEHUP}},
+	{RSP_ZSAU,    650,651,ZSAU_DISCONNECT_IND,  0, 0, {ACT_REMOTEREJECT}},
+	{RSP_ZSAU,    750,751,ZSAU_DISCONNECT_IND,  0, 0, {ACT_REMOTEHUP}},
 	{RSP_ZSAU,    800,800,ZSAU_DISCONNECT_IND,  0, 0, {ACT_REMOTEHUP}},
 
 	/* hangup */
@@ -358,7 +359,8 @@ struct reply_t gigaset_tab_cid[] =
 	{RSP_ZSAU,    700,729,ZSAU_ACTIVE,          0, 0, {ACT_ABORTACCEPT}},
 	{RSP_ZSAU,    700,729,ZSAU_DISCONNECT_IND,  0, 0, {ACT_ABORTACCEPT}},
 
-	{EV_TIMEOUT,  750,750, -1,                  0, 0, {ACT_CONNTIMEOUT}},
+	{EV_BC_OPEN,  750,750, -1,                751,-1},
+	{EV_TIMEOUT,  750,751, -1,                  0, 0, {ACT_CONNTIMEOUT}},
 
 	/* B channel closed (general case) */
 	{EV_BC_CLOSED, -1, -1, -1,                 -1,-1, {ACT_NOTIFY_BC_DOWN}}, //FIXME
@@ -876,12 +878,6 @@ static void bchannel_down(struct bc_state *bcs)
 
 static void bchannel_up(struct bc_state *bcs)
 {
-	if (!(bcs->chstate & CHS_D_UP)) {
-		dev_notice(bcs->cs->dev, "%s: D channel not up\n", __func__);
-		bcs->chstate |= CHS_D_UP;
-		gigaset_i4l_channel_cmd(bcs, ISDN_STAT_DCONN);
-	}
-
 	if (bcs->chstate & CHS_B_UP) {
 		dev_notice(bcs->cs->dev, "%s: B channel already up\n",
 			   __func__);
-- 
1.6.2.1.214.ge986c


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 0/2] Gigaset driver patches for 2.6.31-rc1
@ 2009-07-01 21:20 Tilman Schmidt
  2009-07-01 21:20 ` [PATCH 2/2] gigaset: drop pointless check Tilman Schmidt
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Tilman Schmidt @ 2009-07-01 21:20 UTC (permalink / raw)
  To: davem, linux-kernel, netdev; +Cc: Hansjoerg Lipp

Dave,

following are 2 patches for the Gigaset driver which I would
appreciate getting into 2.6.31. The first one is a bugfix which
should also go into stable.

Thanks,
Tilman

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/2] gigaset: drop pointless check
  2009-07-01 21:20 [PATCH 0/2] Gigaset driver patches for 2.6.31-rc1 Tilman Schmidt
@ 2009-07-01 21:20 ` Tilman Schmidt
  2009-07-01 21:20 ` [PATCH 1/2] gigaset: accept connection establishment messages in any order Tilman Schmidt
  2009-07-02 20:17 ` [PATCH 0/2] Gigaset driver patches for 2.6.31-rc1 David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Tilman Schmidt @ 2009-07-01 21:20 UTC (permalink / raw)
  To: davem, linux-kernel, netdev; +Cc: Hansjoerg Lipp

Drop a sanity check which doesn't serve any useful purpose anymore.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
---
 drivers/isdn/gigaset/isocdata.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/drivers/isdn/gigaset/isocdata.c b/drivers/isdn/gigaset/isocdata.c
index db3a1e4..bed38fc 100644
--- a/drivers/isdn/gigaset/isocdata.c
+++ b/drivers/isdn/gigaset/isocdata.c
@@ -174,12 +174,6 @@ int gigaset_isowbuf_getbytes(struct isowbuf_t *iwb, int size)
 		pr_err("invalid size %d\n", size);
 		return -EINVAL;
 	}
-	src = iwb->read;
-	if (unlikely(limit >= BAS_OUTBUFSIZE + BAS_OUTBUFPAD ||
-		     (read < src && limit >= src))) {
-		pr_err("isoc write buffer frame reservation violated\n");
-		return -EFAULT;
-	}
 #endif
 
 	if (read < write) {
-- 
1.6.2.1.214.ge986c


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] Gigaset driver patches for 2.6.31-rc1
  2009-07-01 21:20 [PATCH 0/2] Gigaset driver patches for 2.6.31-rc1 Tilman Schmidt
  2009-07-01 21:20 ` [PATCH 2/2] gigaset: drop pointless check Tilman Schmidt
  2009-07-01 21:20 ` [PATCH 1/2] gigaset: accept connection establishment messages in any order Tilman Schmidt
@ 2009-07-02 20:17 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2009-07-02 20:17 UTC (permalink / raw)
  To: tilman; +Cc: linux-kernel, netdev, hjlipp

From: Tilman Schmidt <tilman@imap.cc>
Date: Wed,  1 Jul 2009 23:20:57 +0200 (CEST)

> following are 2 patches for the Gigaset driver which I would
> appreciate getting into 2.6.31. The first one is a bugfix which
> should also go into stable.

Applied, and first patch queued to -stable, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-07-02 20:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-01 21:20 [PATCH 0/2] Gigaset driver patches for 2.6.31-rc1 Tilman Schmidt
2009-07-01 21:20 ` [PATCH 2/2] gigaset: drop pointless check Tilman Schmidt
2009-07-01 21:20 ` [PATCH 1/2] gigaset: accept connection establishment messages in any order Tilman Schmidt
2009-07-02 20:17 ` [PATCH 0/2] Gigaset driver patches for 2.6.31-rc1 David Miller

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).