From owner-freebsd-scsi@FreeBSD.ORG Thu Aug 21 00:23:56 2008 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E99541065671 for ; Thu, 21 Aug 2008 00:23:56 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id A339B8FC13 for ; Thu, 21 Aug 2008 00:23:56 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.local ([192.168.254.200]) (authenticated bits=0) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id m7L0NrlI044532; Wed, 20 Aug 2008 18:23:53 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <48ACB599.8040603@samsco.org> Date: Wed, 20 Aug 2008 18:23:53 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.13) Gecko/20080313 SeaMonkey/1.1.9 MIME-Version: 1.0 To: Sean Bruno References: <48AC974B.2020203@miralink.com> In-Reply-To: <48AC974B.2020203@miralink.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=3.8 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: freebsd-scsi@freebsd.org Subject: Re: RELENG_6 patch for MPT X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2008 00:23:57 -0000 Sean Bruno wrote: > Hmmm...RELENG_6 looks like it has a locking issue at this time. > > The patch below removes the panic due to dead lock, but I'm not sure > how safe it is. > > > Index: /trunk/src/ankeny/src/FreeBSD_RELENG6/sys/dev/mpt/mpt_user.c > =================================================================== > --- /trunk/src/ankeny/src/FreeBSD_RELENG6/sys/dev/mpt/mpt_user.c > (revision 5657) > +++ /trunk/src/ankeny/src/FreeBSD_RELENG6/sys/dev/mpt/mpt_user.c > (revision 5761) > @@ -106,15 +106,13 @@ > mpt_user_attach(struct mpt_softc *mpt) > { > mpt_handler_t handler; > int error, unit; > > - MPT_LOCK(mpt); > handler.reply_handler = mpt_user_reply_handler; > error = mpt_register_handler(mpt, MPT_HANDLER_REPLY, handler, > &user_handler_id); > - MPT_UNLOCK(mpt); > if (error != 0) { > mpt_prt(mpt, "Unable to register user handler!\n"); > return (error); > } > unit = device_get_unit(mpt->dev); > I think this is fine to commit. I fixed it differently in FreeBSD7, but there's real locking there and enough differences to make it hard to directly compare. Go ahead and check it in, if you want. Scott