From owner-freebsd-scsi Fri Dec 6 3:57:54 2002 Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3754137B401 for ; Fri, 6 Dec 2002 03:57:53 -0800 (PST) Received: from comp.chem.msu.su (comp-ext.chem.msu.su [158.250.32.157]) by mx1.FreeBSD.org (Postfix) with ESMTP id ACF7043EBE for ; Fri, 6 Dec 2002 03:57:50 -0800 (PST) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.12.3/8.12.3) with ESMTP id gB6Bxkg7089026; Fri, 6 Dec 2002 14:59:47 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.12.3/8.12.3/Submit) id gB6BxgQ5089025; Fri, 6 Dec 2002 14:59:42 +0300 (MSK) Date: Fri, 6 Dec 2002 14:59:42 +0300 From: Yar Tikhiy To: Nate Lawson Cc: freebsd-scsi@freebsd.org Subject: Re: {da,sa,...}open bug? Message-ID: <20021206145942.I80257@comp.chem.msu.su> References: <20021129223817.D34288@comp.chem.msu.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from nate@root.org on Sun, Dec 01, 2002 at 04:59:17PM -0800 Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi there, Yet another daopen() issue came to my attention. The DA_OPEN_FLAG bit won't be reset back to 0 if daopen() has failed, thus leaving the device marked as open. Isn't the below patch necessary? The rest of scsi_* modules seem to not have this bug. -- Yar Index: scsi_da.c =================================================================== RCS file: /home/ncvs/src/sys/cam/scsi/scsi_da.c,v retrieving revision 1.116 diff -u -r1.116 scsi_da.c --- scsi_da.c 29 Nov 2002 15:40:10 -0000 1.116 +++ scsi_da.c 6 Dec 2002 11:49:57 -0000 @@ -612,6 +612,7 @@ if ((softc->flags & DA_FLAG_PACK_REMOVABLE) != 0) daprevent(periph, PR_PREVENT); } else { + softc->flags &= ~DA_FLAG_OPEN; cam_periph_release(periph); } cam_periph_unlock(periph); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message