From owner-freebsd-scsi@FreeBSD.ORG Tue Mar 3 06:51:00 2015 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C47A4F1D for ; Tue, 3 Mar 2015 06:51:00 +0000 (UTC) Received: from mithlond.kdm.org (mithlond.kdm.org [70.56.43.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "A1-33714", Issuer "A1-33714" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7C7D8986 for ; Tue, 3 Mar 2015 06:50:59 +0000 (UTC) Received: from mithlond.kdm.org (localhost [127.0.0.1]) by mithlond.kdm.org (8.14.9/8.14.9) with ESMTP id t236oqSd098791 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 2 Mar 2015 23:50:52 -0700 (MST) (envelope-from ken@mithlond.kdm.org) Received: (from ken@localhost) by mithlond.kdm.org (8.14.9/8.14.9/Submit) id t236oqDV098790; Mon, 2 Mar 2015 23:50:52 -0700 (MST) (envelope-from ken) Date: Mon, 2 Mar 2015 23:50:52 -0700 From: "Kenneth D. Merry" To: fengyd Subject: Re: What does the error code 82 mean? Message-ID: <20150303065052.GA98687@mithlond.kdm.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (mithlond.kdm.org [127.0.0.1]); Mon, 02 Mar 2015 23:50:53 -0700 (MST) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS autolearn=ham autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mithlond.kdm.org Cc: freebsd-scsi@freebsd.org X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2015 06:51:01 -0000 An overrun is exactly what the comment below indicates. It is when the target sends back more data than you asked for. You will generally see it on commands that receive data from a target. How are you sending the INQUIRY command? Are you sending it via the pass(4) driver? How many bytes are you asking for in the CDB? How many bytes are you setting in the dxfer_len field in the CCB? What kind of device are you talking to? Obviously, you're using the sym(4) driver, so I'm guessing this is a parallel SCSI device (unless there is a virtualization stack that emulates the sym(4) hardware). Ken On Mon, Mar 02, 2015 at 15:49:57 +0800, fengyd wrote: > Hi, > > I found the related code in the function sym_int_sir: > /* > * The device wants us to tranfer more data than > * expected or in the wrong direction. > * The number of extra bytes is in scratcha. > * It is a data overrun condition. > */ > case *SIR_DATA_OVERRUN*: > if (cp) { > OUTONB (HF_PRT, HF_EXT_ERR); > * cp->xerr_status |= XE_EXTRA_DATA;* > cp->extra_bytes += INL (nc_scratcha); > } > goto out; > > I'm not familiar with SCSI. > What does DATA_OVERRUN actually mean? > How can it be triggered? > Could you give more details about it? > > Thanks for your help. > > Br. > Yafeng > > > > On Sat, Feb 28, 2015 at 4:50 PM, fengyd wrote: > > > Hi, > > > > It seems the error code 82 & 3F is 0x12. > > And the definition of the error code in the file cam.h: > > CAM_AUTOSENSE_FAIL = 0x10,/* Autosense: request sense cmd fail */ > > CAM_NO_HBA, /* No HBA Detected error */ > > CAM_DATA_RUN_ERR, /* Data Overrun error */ > > > > So, it means data overrun error? > > > > Thanks. > > > > Br. > > Yafeng > > > > On Sat, Feb 28, 2015 at 4:32 PM, fengyd wrote: > > > >> Hi, > >> > >> INQUIRY command is sent to the target, but error code 82 is returned. > >> I added some log in the driver: > >> SIR_COMPLETE_ERROR > >> (pass0:sym0:0:0:0): sym_complete_error status = 18 > >> (pass0:sym0:0:0:0): status = 82 > >> > >> Do you know what does the error code 82 mean? > >> > >> Thanks in advance. > >> > >> Br. > >> Yafeng > >> > > > > > _______________________________________________ > freebsd-scsi@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-scsi > To unsubscribe, send any mail to "freebsd-scsi-unsubscribe@freebsd.org" -- Kenneth Merry ken@FreeBSD.ORG