From owner-freebsd-scsi Tue Jan 25 9:39:14 2000 Delivered-To: freebsd-scsi@freebsd.org Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by hub.freebsd.org (Postfix) with ESMTP id 3E98A151A1 for ; Tue, 25 Jan 2000 09:39:05 -0800 (PST) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.9.3/8.9.1) id KAA95528; Tue, 25 Jan 2000 10:38:49 -0700 (MST) (envelope-from ken) Date: Tue, 25 Jan 2000 10:38:48 -0700 From: "Kenneth D. Merry" To: Nick Hibma Cc: FreeBSD SCSI Mailing List Subject: Re: bug in cam_periph.c Message-ID: <20000125103848.A95459@panzer.kdm.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from n_hibma@webweaving.org on Mon, Jan 24, 2000 at 10:36:48AM +0000 Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Mon, Jan 24, 2000 at 10:36:48 +0000, Nick Hibma wrote: > > the following diff code does not make sense to me. first check for a > retry count larger than zero and return EIO when it is. I guess that > this piee of code has not been exercised very much, because changing it > did not make a difference for the SCSI devices I have here. [ ... ] > Patch below: > > --- cam_periph.c.orig Mon Jan 24 10:34:23 2000 > +++ cam_periph.c Mon Jan 24 10:34:27 2000 > @@ -1439,7 +1439,7 @@ > "CAM_AUTOSENSE_FAILED"); > /* NOTREACHED */ > error = EIO; > - } else if (ccb->ccb_h.retry_count > 0) { > + } else if (ccb->ccb_h.retry_count == 0) { > /* > * XXX KDM shouldn't there be a better > * argument to return?? > Believe it or not, you're not the first person to find that one. See PR kern/15975 -- Carl Mascott found it last month. I didn't fix it before, since I didn't have an easy way to verify the fix. Anyway, I'll go ahead and check it in. Ken -- Kenneth Merry ken@kdm.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message