Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Nov 2004 14:03:27 +0300
From:      Gleb Smirnoff <glebius@freebsd.org>
To:        Vincent Poy <vincepoy@gmail.com>
Cc:        freebsd-current@freebsd.org
Subject:   Re: -CURRENT kernel build fails
Message-ID:  <20041103110327.GC1104@cell.sick.ru>
In-Reply-To: <429af92e0411022120361dfee7@mail.gmail.com>
References:  <429af92e0411022034133d9c1a@mail.gmail.com> <429af92e0411022120361dfee7@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--w7PDEPdKQumQfZlR
Content-Type: text/plain; charset=koi8-r
Content-Disposition: inline

On Tue, Nov 02, 2004 at 09:20:01PM -0800, Vincent Poy wrote:
V> On Tue, 2 Nov 2004 20:34:21 -0800, Vincent Poy <vincepoy@gmail.com> wrote:
V> > In today's -CURRENT about 5:00PM -800, my GENERIC kernel build fails
V> > at the following:
V> I think it might be caused by this commit:

You are right. I believe attached patches will help. I've already sent
them to maintainers of the code.

I'm very sorry.

-- 
Totus tuus, Glebius.
GLEBIUS-RIPN GLEB-RIPE

--w7PDEPdKQumQfZlR
Content-Type: text/plain; charset=koi8-r
Content-Disposition: attachment; filename="ng_sscop_cust.h.diff"

Index: ng_sscop_cust.h
===================================================================
RCS file: /home/ncvs/src/sys/netgraph/atm/sscop/ng_sscop_cust.h,v
retrieving revision 1.1
diff -u -r1.1 ng_sscop_cust.h
--- ng_sscop_cust.h	24 Oct 2003 07:39:11 -0000	1.1
+++ ng_sscop_cust.h	3 Nov 2004 10:39:27 -0000
@@ -105,18 +105,18 @@
 /*
  * Timer support.
  */
-typedef struct callout_handle sscop_timer_t;
-#define	TIMER_INIT(S, T)	callout_handle_init(&(S)->t_##T)
+typedef struct callout sscop_timer_t;
+#define	TIMER_INIT(S, T)	ng_callout_init(&(S)->t_##T)
 #define	TIMER_STOP(S,T)	do {						\
-	ng_untimeout((S)->t_##T, (S)->aarg);				\
-	callout_handle_init(&(S)->t_##T);				\
+	ng_untimeout(&(S)->t_##T, (S)->aarg);				\
     } while (0)
 #define	TIMER_RESTART(S, T) do {					\
 	TIMER_STOP(S, T);						\
-	(S)->t_##T = ng_timeout((S)->aarg, NULL,			\
+	ng_timeout(&(S)->t_##T, (S)->aarg, NULL,			\
 	    hz * (S)->timer##T / 1000, T##_func, (S), 0);		\
     } while (0)
-#define	TIMER_ISACT(S, T) ((S)->t_##T.callout != NULL)
+#define	TIMER_ISACT(S, T) ((S)->t_##T.c_flags & (CALLOUT_ACTIVE |	\
+							CALLOUT_PENDING))
 
 /*
  * This assumes, that the user argument is the node pointer.
@@ -127,7 +127,6 @@
 {									\
 	struct sscop *sscop = arg1;					\
 									\
-	callout_handle_init(&sscop->t_##T);				\
 	VERBOSE(sscop, SSCOP_DBG_TIMER, (sscop, sscop->aarg,		\
 	    "timer_" #T " expired"));					\
 	sscop_signal(sscop, SIG_T_##N, NULL);				\

--w7PDEPdKQumQfZlR
Content-Type: text/plain; charset=koi8-r
Content-Disposition: attachment; filename="ng_l2cap.diff"

Index: ng_l2cap_misc.c
===================================================================
RCS file: /home/ncvs/src/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c,v
retrieving revision 1.7
diff -u -r1.7 ng_l2cap_misc.c
--- ng_l2cap_misc.c	27 Apr 2004 16:38:15 -0000	1.7
+++ ng_l2cap_misc.c	3 Nov 2004 10:56:53 -0000
@@ -129,7 +129,7 @@
 		fake_con_handle = 0x0f00;
 
 	bcopy(bdaddr, &con->remote, sizeof(con->remote));
-	callout_handle_init(&con->con_timo);
+	ng_callout_init(&con->con_timo);
 
 	con->ident = NG_L2CAP_FIRST_IDENT - 1;
 	TAILQ_INIT(&con->cmd_list);
@@ -191,7 +191,6 @@
 
 /*
  * Set auto disconnect timeout
- * XXX FIXME: check con->con_timo.callout != NULL
  */
 
 int
@@ -204,7 +203,7 @@
 			con->state, con->flags);
 
 	con->flags |= NG_L2CAP_CON_AUTO_DISCON_TIMO;
-	con->con_timo = ng_timeout(con->l2cap->node, NULL,
+	ng_timeout(&con->con_timo, con->l2cap->node, NULL,
 				con->l2cap->discon_timo * hz,
 				ng_l2cap_process_discon_timeout, NULL,
 				con->con_handle);
@@ -225,7 +224,7 @@
 			__func__,  NG_NODE_NAME(con->l2cap->node),
 			con->state, con->flags);
 	
-	if (ng_untimeout(con->con_timo, con->l2cap->node) == 0)
+	if (ng_untimeout(&con->con_timo, con->l2cap->node) == 0)
 		return (ETIMEDOUT);
 
 	con->flags &= ~NG_L2CAP_CON_AUTO_DISCON_TIMO;
@@ -424,7 +423,7 @@
 	cmd->ident = ident;
 	cmd->code = code;
 	cmd->token = token;
-	callout_handle_init(&cmd->timo);
+	ng_callout_init(&cmd->timo);
 
 	return (cmd);
 } /* ng_l2cap_new_cmd */
@@ -453,7 +452,6 @@
 
 /*
  * Set LP timeout
- * XXX FIXME: check con->con_timo.callout != NULL
  */
 
 int
@@ -466,7 +464,7 @@
 			con->state, con->flags);
 
 	con->flags |= NG_L2CAP_CON_LP_TIMO;
-	con->con_timo = ng_timeout(con->l2cap->node, NULL,
+	ng_timeout(&con->con_timo, con->l2cap->node, NULL,
 				bluetooth_hci_connect_timeout(),
 				ng_l2cap_process_lp_timeout, NULL,
 				con->con_handle);
@@ -487,7 +485,7 @@
 			__func__,  NG_NODE_NAME(con->l2cap->node),
 			con->state, con->flags);
 	
-	if (ng_untimeout(con->con_timo, con->l2cap->node) == 0)
+	if (ng_untimeout(&con->con_timo, con->l2cap->node) == 0)
 		return (ETIMEDOUT);
 
 	con->flags &= ~NG_L2CAP_CON_LP_TIMO;
@@ -497,7 +495,6 @@
 
 /*
  * Set L2CAP command timeout
- * XXX FIXME: check cmd->timo.callout != NULL
  */
 
 int
@@ -513,7 +510,7 @@
 
 	arg = ((cmd->ident << 16) | cmd->con->con_handle);
 	cmd->flags |= NG_L2CAP_CMD_PENDING;
-	cmd->timo = ng_timeout(cmd->con->l2cap->node, NULL, timo,
+	ng_timeout(&cmd->timo, cmd->con->l2cap->node, NULL, timo,
 				ng_l2cap_process_command_timeout, NULL, arg);
 
 	return (0);
@@ -532,7 +529,7 @@
 			__func__, NG_NODE_NAME(cmd->con->l2cap->node),
 			cmd->code, cmd->flags);
 
-	if (ng_untimeout(cmd->timo, cmd->con->l2cap->node) == 0)
+	if (ng_untimeout(&cmd->timo, cmd->con->l2cap->node) == 0)
 		return (ETIMEDOUT);
 
 	cmd->flags &= ~NG_L2CAP_CMD_PENDING;
Index: ng_l2cap_var.h
===================================================================
RCS file: /home/ncvs/src/sys/netgraph/bluetooth/l2cap/ng_l2cap_var.h,v
retrieving revision 1.4
diff -u -r1.4 ng_l2cap_var.h
--- ng_l2cap_var.h	9 Apr 2004 23:01:40 -0000	1.4
+++ ng_l2cap_var.h	3 Nov 2004 10:47:43 -0000
@@ -111,7 +111,7 @@
 
 	bdaddr_t			 remote;     /* remote unit address */
 	u_int16_t			 con_handle; /* ACL connection handle */
-	struct callout_handle		 con_timo;   /* connection timeout */
+	struct callout			con_timo;   /* connection timeout */
 
 	u_int8_t			 ident;      /* last allocated ident */
 	TAILQ_HEAD(, ng_l2cap_cmd)	 cmd_list;   /* pending L2CAP cmds */
@@ -174,7 +174,7 @@
 	u_int8_t			 ident;     /* L2CAP command ident */
 	u_int32_t			 token;     /* L2CA message token */
 
-	struct callout_handle		 timo;      /* RTX/ERTX timeout */
+	struct callout			 timo;      /* RTX/ERTX timeout */
 
 	struct mbuf			*aux;       /* optional data */
 

--w7PDEPdKQumQfZlR--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041103110327.GC1104>