Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Dec 2002 14:59:42 +0300
From:      Yar Tikhiy <yar@freebsd.org>
To:        Nate Lawson <nate@root.org>
Cc:        freebsd-scsi@freebsd.org
Subject:   Re: {da,sa,...}open bug?
Message-ID:  <20021206145942.I80257@comp.chem.msu.su>
In-Reply-To: <Pine.BSF.4.21.0212011657400.1744-100000@root.org>; from nate@root.org on Sun, Dec 01, 2002 at 04:59:17PM -0800
References:  <20021129223817.D34288@comp.chem.msu.su> <Pine.BSF.4.21.0212011657400.1744-100000@root.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021206145942.I80257>