From owner-cvs-src@FreeBSD.ORG Mon Jan 16 23:57:45 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from green.homeunix.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 7B1B916A41F; Mon, 16 Jan 2006 23:57:45 +0000 (GMT) (envelope-from green@green.homeunix.org) Received: from green.homeunix.org (green@localhost [127.0.0.1]) by green.homeunix.org (8.13.4/8.13.1) with ESMTP id k0GNviIm047981; Mon, 16 Jan 2006 18:57:44 -0500 (EST) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.13.4/8.13.1/Submit) id k0GNviRX047980; Mon, 16 Jan 2006 18:57:44 -0500 (EST) (envelope-from green) Date: Mon, 16 Jan 2006 18:57:44 -0500 From: Brian Fundakowski Feldman To: Ian Dowse Message-ID: <20060116235744.GH27794@green.homeunix.org> References: <200601110206.k0B2699N020079@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200601110206.k0B2699N020079@repoman.freebsd.org> User-Agent: Mutt/1.5.11 Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/cam cam_xpt.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jan 2006 23:57:45 -0000 On Wed, Jan 11, 2006 at 02:06:09AM +0000, Ian Dowse wrote: > iedowse 2006-01-11 02:06:09 UTC > > FreeBSD src repository > > Modified files: > sys/cam cam_xpt.c > Log: > When deregistering a bus, attempt to flush out all outstanding > operations before returning. Point the bus at a dummy cam_sim > structure so that any CCBs will complete immediately with a > CAM_DEV_NOT_THERE status, and ensure that any xpt_schedule() calls > on the bus's devices will immediately call the peripheral's > periph_start() routine. Also repeat the async messages because > devices that were part of the way through being probed may appear > after the original AC_LOST_DEVICE was sent, and would otherwise > never go away. > > These changes make it possible to deregister a bus and free the SIM > at most stages during bus probing without the usual crashes in > camisr(). In particular, plugging in a umass device and then > unplugging it as soon as the first probe messages appeared would > almost always result in a crash. Now the device just goes away with > a few CAM errors and all references to the CAM bus, target and > device are dropped correctly. Good job -- thankless work to fix these kinds of problems but so nice to have fixed once and for all after they happen to you the umpteenth time. -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\