From owner-freebsd-scsi@FreeBSD.ORG Tue Aug 9 20:18:31 2011 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 07371106566C for ; Tue, 9 Aug 2011 20:18:31 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id C6ED68FC0C for ; Tue, 9 Aug 2011 20:18:30 +0000 (UTC) Received: from [192.168.135.110] (c-24-7-47-62.hsd1.ca.comcast.net [24.7.47.62]) (authenticated bits=0) by ns1.feral.com (8.14.4/8.14.4) with ESMTP id p79KITck038249 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Tue, 9 Aug 2011 13:18:30 -0700 (PDT) (envelope-from mj@feral.com) Message-ID: <4E41960F.9040203@feral.com> Date: Tue, 09 Aug 2011 13:18:23 -0700 From: Matthew Jacob User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: freebsd-scsi@freebsd.org References: <4E3F0332.7030004@feral.com> <20110809193949.GA93077@nargothrond.kdm.org> In-Reply-To: <20110809193949.GA93077@nargothrond.kdm.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (ns1.feral.com [192.67.166.1]); Tue, 09 Aug 2011 13:18:30 -0700 (PDT) Subject: Re: some changes to xpt to help make unloading sim modules safer 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: Tue, 09 Aug 2011 20:18:31 -0000 On 8/9/2011 12:39 PM, Kenneth D. Merry wrote: > >> I added a few after that to guard against overrunning some counters so >> that they would wrap. > Just out of curiosity, have you seen instances where the counters have > gone negative? No- but it's one of those things you'd be unlikely to notice w/o unloads :-) > > I would think you'd want to wait until the periph is closed, but perhaps > there is a way to get away with it if there aren't any commands outstanding > in the SIM. > > You could send async notifications that all of the devices on the bus have > gone away, and then once everything disappears, you could finish the > unload. > > \ Either would work, but I'm inclined to think it'd be better if we finish newbusifying all of this. > Ken