From owner-freebsd-scsi@FreeBSD.ORG Fri Aug 25 16:56:13 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 C2F3116A4DD; Fri, 25 Aug 2006 16:56:13 +0000 (UTC) (envelope-from wrstuden@wasabisystems.com) Received: from mononoke.wasabisystems.com (mononoke.wasabisystems.com [66.173.145.228]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB08643D6A; Fri, 25 Aug 2006 16:56:09 +0000 (GMT) (envelope-from wrstuden@wasabisystems.com) Received: from [10.0.0.10] (h-66-166-188-91.sndacagl.covad.net [66.166.188.91]) by mononoke.wasabisystems.com (Postfix) with ESMTP id 42321871F7; Fri, 25 Aug 2006 12:56:08 -0400 (EDT) In-Reply-To: References: <000201c6c7df$cb0e8a40$0200a8c0@mrbill5> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: William Studenmund Date: Fri, 25 Aug 2006 09:56:00 -0700 To: Danny Braniss X-Pgp-Agent: GPGMail 1.1.2 (Tiger) X-Mailer: Apple Mail (2.752.2) 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: Fri, 25 Aug 2006 16:56:13 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Aug 25, 2006, at 2:28 AM, Danny Braniss wrote: >> Danny, >> >> LUN 1 should not be returning a chk condition in response to an >> INQUIRY >> command with the page code and EVPD both 0 in the cdb. The device >> server should return the inquiry response data with the peripheral >> device qualifier set to 001b or 011b (1 or 3) per the scsi specs. >> >> Bill >> > hi Bill, > that's 'wishfull thinking' :-), I can only fix the initiator, the > target > I have to live with :-( Actually, I believe the target is behaving correctly. See below. >> -----Original Message----- >> From: owner-freebsd-scsi@freebsd.org >> [mailto:owner-freebsd-scsi@freebsd.org] On Behalf Of Kenneth D. Merry >> Sent: Thursday, August 24, 2006 11:15 AM >> To: Danny Braniss >> Cc: scsi@freebsd.org >> Subject: Re: iSCSI/luns/check-condition >> >> On Thu, Aug 24, 2006 at 18:05:41 +0300, Danny Braniss wrote: >>> hi, >>> this target (Wasabi) is returning Check Condition for >>> a INQ. LUN 1, (which probably is ok, since it does not exist), I >> return >>> ccb_h->status = CAM_SCSI_STATUS_ERROR; >>> but it seems that the CAM is ignoring it, since it will try >>> again, and >>> again, etc. [or i'm doing something wrong :-] >> >> If this is a result of the inquiry on initial probe (most likely), >> you >> shouldn't get any more than 4 retries. >> >> What SCSI status byte, sense key, ASC and ASCQ are you returning? You really need to answer this question. It's always the first thing to do when trying to figure out a SCSI issue. The only non-good status the target will give out of this command is Check Condition, Illegal request, Invalid Field in CDB (ASC/Q 0x24/0x00). It will also give you a sense-key-specific field indicating which byte upset the target. So fire up wireshark and see what's going on. Nothing happens to be trying to put the LUN in bits 5 through 7 of byte 1 perchance? They have been reserved since SPC2 or earlier. Trying to put the LUN there will cause the issue you're seeing. Take care, Bill -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) iD8DBQFE7yulDJT2Egh26K0RApKHAJ9H1IKB2zzBh9ZDF3QeIpTG4HrCeQCcDdlL WQa7cQqEAZkee7T0RYF/RqQ= =XOxS -----END PGP SIGNATURE-----