From owner-svn-src-user@FreeBSD.ORG Sun Sep 12 00:53:10 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B7341065672; Sun, 12 Sep 2010 00:53:10 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7ABBE8FC0C; Sun, 12 Sep 2010 00:53:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8C0rAVP060269; Sun, 12 Sep 2010 00:53:10 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8C0rARk060267; Sun, 12 Sep 2010 00:53:10 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201009120053.o8C0rARk060267@svn.freebsd.org> From: Weongyo Jeong Date: Sun, 12 Sep 2010 00:53:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212489 - user/weongyo/usb/sys/dev/usb/controller X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2010 00:53:10 -0000 Author: weongyo Date: Sun Sep 12 00:53:10 2010 New Revision: 212489 URL: http://svn.freebsd.org/changeset/base/212489 Log: Adds a comment why the thread count should be 1. Modified: user/weongyo/usb/sys/dev/usb/controller/usb_controller.c Modified: user/weongyo/usb/sys/dev/usb/controller/usb_controller.c ============================================================================== --- user/weongyo/usb/sys/dev/usb/controller/usb_controller.c Sun Sep 12 00:49:16 2010 (r212488) +++ user/weongyo/usb/sys/dev/usb/controller/usb_controller.c Sun Sep 12 00:53:10 2010 (r212489) @@ -402,6 +402,10 @@ usb_attach_sub(device_t dev, struct usb_ /* Initialise USB explore taskqueue and tasks */ bus->explore_tq = taskqueue_create("usb_explore_taskq", M_WAITOK, taskqueue_thread_enqueue, &bus->explore_tq); + /* + * NOTE: the thread count always should be 1. If more, it couldn't + * guarantee the serialization between attach, detach and explore. + */ taskqueue_start_threads(&bus->explore_tq, 1, USB_PRI_MED, "USB explore taskq"); TASK_INIT(&bus->attach_task, 0, usb_bus_attach, bus);