From owner-cvs-all@FreeBSD.ORG Wed Jan 11 02:06:09 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8548E16A41F; Wed, 11 Jan 2006 02:06:09 +0000 (GMT) (envelope-from iedowse@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 55BF143D48; Wed, 11 Jan 2006 02:06:09 +0000 (GMT) (envelope-from iedowse@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k0B269mL020080; Wed, 11 Jan 2006 02:06:09 GMT (envelope-from iedowse@repoman.freebsd.org) Received: (from iedowse@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k0B2699N020079; Wed, 11 Jan 2006 02:06:09 GMT (envelope-from iedowse) Message-Id: <200601110206.k0B2699N020079@repoman.freebsd.org> From: Ian Dowse Date: Wed, 11 Jan 2006 02:06:09 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/cam cam_xpt.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2006 02:06:09 -0000 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. Revision Changes Path 1.157 +111 -8 src/sys/cam/cam_xpt.c