From owner-svn-src-all@FreeBSD.ORG Wed Apr 28 18:49:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B60B1065673; Wed, 28 Apr 2010 18:49:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3A2398FC0C; Wed, 28 Apr 2010 18:49:46 +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 o3SInk0c014271; Wed, 28 Apr 2010 18:49:46 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3SInkv3014269; Wed, 28 Apr 2010 18:49:46 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201004281849.o3SInkv3014269@svn.freebsd.org> From: John Baldwin Date: Wed, 28 Apr 2010 18:49:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207335 - head/sys/dev/ciss X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Apr 2010 18:49:46 -0000 Author: jhb Date: Wed Apr 28 18:49:45 2010 New Revision: 207335 URL: http://svn.freebsd.org/changeset/base/207335 Log: Initialize the callout structure earlier in attach before calling any routines that can fail since ciss_free() always tries to stop and drain the callout. Modified: head/sys/dev/ciss/ciss.c Modified: head/sys/dev/ciss/ciss.c ============================================================================== --- head/sys/dev/ciss/ciss.c Wed Apr 28 18:29:48 2010 (r207334) +++ head/sys/dev/ciss/ciss.c Wed Apr 28 18:49:45 2010 (r207335) @@ -417,6 +417,7 @@ ciss_attach(device_t dev) sc = device_get_softc(dev); sc->ciss_dev = dev; mtx_init(&sc->ciss_mtx, "cissmtx", NULL, MTX_DEF); + callout_init_mtx(&sc->ciss_periodic, &sc->ciss_mtx, 0); /* * Do PCI-specific init. @@ -429,7 +430,6 @@ ciss_attach(device_t dev) */ ciss_initq_free(sc); ciss_initq_notify(sc); - callout_init_mtx(&sc->ciss_periodic, &sc->ciss_mtx, 0); /* * Initalize device sysctls.