From owner-freebsd-scsi@FreeBSD.ORG Sun Aug 27 14:07:31 2006 Return-Path: X-Original-To: scsi@freebsd.org 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 1722D16A4DD; Sun, 27 Aug 2006 14:07:31 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 865A94476F; Sun, 27 Aug 2006 14:07:29 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id k7RE7GQI033372; Sun, 27 Aug 2006 08:07:21 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <44F1A712.40609@samsco.org> Date: Sun, 27 Aug 2006 08:07:14 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.13) Gecko/20060414 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Danny Braniss References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on pooker.samsco.org Cc: "Kenneth D. Merry" , scsi@freebsd.org Subject: Re: iSCSI/luns/check-condition 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: Sun, 27 Aug 2006 14:07:31 -0000 Danny Braniss wrote: > i guess what this just proves, yet again, that programs work, > even if the programmer was _____ (fill in the blanks) > > ... > >> ccb_h->status |= CAM_AUTOSNS_VALID; <---------------------- >> >>and >>... >> case 0x02: // Check Condition >> if(pq != NULL) // XXX: check for data ... >> getSenseData(status, ccb, pq); >> >> case 0x14: // Intermediate-Condition Met >> case 0x10: // Intermediate >> case 0x04: // Condition Met >> ccb_h->status = CAM_REQ_CMP_ERR; //CAM_SCSI_STATUS_ERROR; <-------------- >> break; >>... >> > > > danny > > Good catch. That is a common mistake when dealing with CAM =-) Arguably, cam_periph_error() shouldn't be so fragile and prone to loops. Scott