Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Nov 2004 18:47:16 +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:  <20041103154716.GJ2312@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

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

... and one more patch.

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

--6WlEvdN9Dv0WHSBl
Content-Type: text/plain; charset=koi8-r
Content-Disposition: attachment; filename="ng_hci.diff"

Index: ng_hci_misc.c
===================================================================
RCS file: /home/ncvs/src/sys/netgraph/bluetooth/hci/ng_hci_misc.c,v
retrieving revision 1.7
diff -u -r1.7 ng_hci_misc.c
--- ng_hci_misc.c	27 Apr 2004 16:38:14 -0000	1.7
+++ ng_hci_misc.c	3 Nov 2004 15:44:49 -0000
@@ -289,7 +289,7 @@
 
 		NG_BT_ITEMQ_INIT(&con->conq, num_pkts);
 
-		callout_handle_init(&con->con_timo);
+		ng_callout_init(&con->con_timo);
 
 		LIST_INSERT_HEAD(&unit->con_list, con, next);
 	}
@@ -357,7 +357,6 @@
 
 /*
  * Set HCI command timeout
- * XXX FIXME: check unit->cmd_timo.callout != NULL
  */
 
 int
@@ -368,7 +367,9 @@
 "%s: %s - Duplicated command timeout!\n", __func__, NG_NODE_NAME(unit->node));
 
 	unit->state |= NG_HCI_UNIT_COMMAND_PENDING;
-	unit->cmd_timo = ng_timeout(unit->node, NULL,
+	/* XXX: is this correct place for init? */
+	ng_callout_init(&unit->cmd_timo);
+	ng_timeout(&unit->cmd_timo, unit->node, NULL,
 				bluetooth_hci_command_timeout(),
 				ng_hci_process_command_timeout, NULL, 0);
 
@@ -386,7 +387,7 @@
 		panic(
 "%s: %s - No command timeout!\n", __func__, NG_NODE_NAME(unit->node));
 
-	if (ng_untimeout(unit->cmd_timo, unit->node) == 0)
+	if (ng_untimeout(&unit->cmd_timo, unit->node) == 0)
 		return (ETIMEDOUT);
 
 	unit->state &= ~NG_HCI_UNIT_COMMAND_PENDING;
@@ -396,7 +397,6 @@
 
 /*
  * Set HCI connection timeout
- * XXX FIXME: check unit->cmd_timo.callout != NULL
  */
 
 int
@@ -408,7 +408,7 @@
 			__func__, NG_NODE_NAME(con->unit->node));
 
 	con->flags |= NG_HCI_CON_TIMEOUT_PENDING;
-	con->con_timo = ng_timeout(con->unit->node, NULL,
+	ng_timeout(&con->con_timo, con->unit->node, NULL,
 				bluetooth_hci_connect_timeout(),
 				ng_hci_process_con_timeout, NULL,
 				con->con_handle);
@@ -427,7 +427,7 @@
 		panic(
 "%s: %s - No connection timeout!\n", __func__, NG_NODE_NAME(con->unit->node));
 
-	if (ng_untimeout(con->con_timo, con->unit->node) == 0)
+	if (ng_untimeout(&con->con_timo, con->unit->node) == 0)
 		return (ETIMEDOUT);
 
 	con->flags &= ~NG_HCI_CON_TIMEOUT_PENDING;
Index: ng_hci_var.h
===================================================================
RCS file: /home/ncvs/src/sys/netgraph/bluetooth/hci/ng_hci_var.h,v
retrieving revision 1.4
diff -u -r1.4 ng_hci_var.h
--- ng_hci_var.h	9 Apr 2004 23:01:39 -0000	1.4
+++ ng_hci_var.h	3 Nov 2004 15:43:52 -0000
@@ -148,7 +148,7 @@
 
 	ng_hci_unit_buff_t		buffer;         /* buffer info */
 
-	struct callout_handle		cmd_timo;       /* command timeout */
+	struct callout			cmd_timo;       /* command timeout */
 	ng_bt_mbufq_t			cmdq;           /* command queue */
 #define NG_HCI_CMD_QUEUE_LEN		12		/* max. size of cmd q */
 
@@ -183,7 +183,7 @@
 	u_int8_t			mode;            /* ACTIVE, HOLD ... */
 	u_int8_t			role;            /* MASTER/SLAVE */
 
-	struct callout_handle		con_timo;        /* con. timeout */
+	struct callout			con_timo;        /* con. timeout */
 
 	int				pending;         /* # of data pkts */
 	ng_bt_itemq_t			conq;            /* con. queue */

--6WlEvdN9Dv0WHSBl--



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